Loading core/java/android/view/ViewRootImpl.java +4 −0 Original line number Diff line number Diff line Loading @@ -11382,6 +11382,10 @@ public final class ViewRootImpl implements ViewParent, sendBackKeyEvent(KeyEvent.ACTION_DOWN); sendBackKeyEvent(KeyEvent.ACTION_UP); }; if (mOnBackInvokedDispatcher.hasImeOnBackInvokedDispatcher()) { Log.d(TAG, "Skip registering CompatOnBackInvokedCallback on IME dispatcher"); return; } mOnBackInvokedDispatcher.registerOnBackInvokedCallback( OnBackInvokedDispatcher.PRIORITY_DEFAULT, mCompatOnBackInvokedCallback); } Loading core/java/android/window/WindowOnBackInvokedDispatcher.java +5 −0 Original line number Diff line number Diff line Loading @@ -357,6 +357,11 @@ public class WindowOnBackInvokedDispatcher implements OnBackInvokedDispatcher { mImeDispatcher = imeDispatcher; } /** Returns true if a non-null {@link ImeOnBackInvokedDispatcher} has been set. **/ public boolean hasImeOnBackInvokedDispatcher() { return mImeDispatcher != null; } /** * Class used to check whether a callback can be registered or not. This is meant to be * shared with {@link ProxyOnBackInvokedDispatcher} which needs to do the same checks. Loading Loading
core/java/android/view/ViewRootImpl.java +4 −0 Original line number Diff line number Diff line Loading @@ -11382,6 +11382,10 @@ public final class ViewRootImpl implements ViewParent, sendBackKeyEvent(KeyEvent.ACTION_DOWN); sendBackKeyEvent(KeyEvent.ACTION_UP); }; if (mOnBackInvokedDispatcher.hasImeOnBackInvokedDispatcher()) { Log.d(TAG, "Skip registering CompatOnBackInvokedCallback on IME dispatcher"); return; } mOnBackInvokedDispatcher.registerOnBackInvokedCallback( OnBackInvokedDispatcher.PRIORITY_DEFAULT, mCompatOnBackInvokedCallback); } Loading
core/java/android/window/WindowOnBackInvokedDispatcher.java +5 −0 Original line number Diff line number Diff line Loading @@ -357,6 +357,11 @@ public class WindowOnBackInvokedDispatcher implements OnBackInvokedDispatcher { mImeDispatcher = imeDispatcher; } /** Returns true if a non-null {@link ImeOnBackInvokedDispatcher} has been set. **/ public boolean hasImeOnBackInvokedDispatcher() { return mImeDispatcher != null; } /** * Class used to check whether a callback can be registered or not. This is meant to be * shared with {@link ProxyOnBackInvokedDispatcher} which needs to do the same checks. Loading