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

Commit 951bc3b5 authored by Joseph Pirozzo's avatar Joseph Pirozzo Committed by Android (Google) Code Review
Browse files

Merge "Update Activity Manager to prevent popups while driving."

parents b06271db 154a77e3
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -18330,9 +18330,12 @@ public final class ActivityManagerService extends ActivityManagerNative
     * dialog / global actions also might want different behaviors.
     */
    private static final boolean shouldShowDialogs(Configuration config) {
        return !(config.keyboard == Configuration.KEYBOARD_NOKEYS
        final boolean inputMethodExists = !(config.keyboard == Configuration.KEYBOARD_NOKEYS
                                   && config.touchscreen == Configuration.TOUCHSCREEN_NOTOUCH
                                   && config.navigation == Configuration.NAVIGATION_NONAV);
        final boolean uiIsNotCarType = !((config.uiMode & Configuration.UI_MODE_TYPE_MASK)
                                    == Configuration.UI_MODE_TYPE_CAR);
        return inputMethodExists && uiIsNotCarType;
    }
    @Override