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

Commit 30f73993 authored by Massimo Carli's avatar Massimo Carli Committed by Android (Google) Code Review
Browse files

Merge "[30/n] Disable Reachability when keyboard is visible" into main

parents c1e8d636 12955938
Loading
Loading
Loading
Loading
+12 −4
Original line number Diff line number Diff line
@@ -1187,12 +1187,15 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub
                break;
            }
            case HIERARCHY_OP_TYPE_APP_COMPAT_REACHABILITY: {
                int doubleTapX = hop.getAppCompatOptions().getInt(REACHABILITY_EVENT_X);
                int doubleTapY = hop.getAppCompatOptions().getInt(REACHABILITY_EVENT_Y);
                final WindowContainer<?> wc = WindowContainer.fromBinder(hop.getContainer());
                if (wc == null) {
                    break;
                }
                // Disable reachability when an InputMethod is visible.
                final DisplayContent dc = wc.mDisplayContent;
                if (dc != null && dc.mInputMethodWindow.isVisible()) {
                    break;
                }
                final Task currentTask = wc.asTask();
                if (chain.mTransition != null) {
                    chain.mTransition.collect(wc);
@@ -1209,10 +1212,15 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub
                                chain.mTransition.collect(topOpaqueActivity);
                            }
                        }
                        final Bundle bundle = hop.getAppCompatOptions();
                        if (bundle != null) {
                            final int doubleTapX = bundle.getInt(REACHABILITY_EVENT_X);
                            final int doubleTapY = bundle.getInt(REACHABILITY_EVENT_Y);
                            topOpaqueActivity.mAppCompatController.getReachabilityPolicy()
                                    .handleDoubleTap(doubleTapX, doubleTapY);
                        }
                    }
                }
                effects |= TRANSACT_EFFECTS_CLIENT_CONFIG;
                break;
            }