Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0f925d0d authored by Clara Bayarri's avatar Clara Bayarri Committed by Android (Google) Code Review
Browse files

Merge "Fallback to old Window.Callback#onWindowStartingActionMode" into mnc-dev

parents 7b8ce2fa 9f8f6e4e
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -2741,7 +2741,14 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
                try {
                    mode = getCallback().onWindowStartingActionMode(wrappedCallback, type);
                } catch (AbstractMethodError ame) {
                    // Older apps might not implement this callback method.
                    // Older apps might not implement the typed version of this method.
                    if (type == ActionMode.TYPE_PRIMARY) {
                        try {
                            mode = getCallback().onWindowStartingActionMode(wrappedCallback);
                        } catch (AbstractMethodError ame2) {
                            // Older apps might not implement this callback method at all.
                        }
                    }
                }
            }
            if (mode != null) {