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

Commit 849d1b8a authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix Accessibility Menu Window breaking gesture exclusion API" into main

parents ac46ccdf 70147b09
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -95,5 +95,6 @@
        <permission name="android.permission.START_FOREGROUND_SERVICES_FROM_BACKGROUND" />
        <permission name="android.permission.OVERRIDE_SYSTEM_KEY_BEHAVIOR_IN_FOCUSED_WINDOW"/>
        <permission name="android.permission.SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE" />
        <permission name="android.permission.SET_UNRESTRICTED_GESTURE_EXCLUSION" />
    </privapp-permissions>
</permissions>
+3 −0
Original line number Diff line number Diff line
@@ -392,6 +392,9 @@
    <!-- To be able to decipher default applications for certain roles in shortcut helper -->
    <uses-permission android:name="android.permission.MANAGE_DEFAULT_APPLICATIONS" />

    <!-- To be able to set unrestricted system gesture exclusion rects -->
    <uses-permission android:name="android.permission.SET_UNRESTRICTED_GESTURE_EXCLUSION"/>

    <protected-broadcast android:name="com.android.settingslib.action.REGISTER_SLICE_RECEIVER" />
    <protected-broadcast android:name="com.android.settingslib.action.UNREGISTER_SLICE_RECEIVER" />
    <protected-broadcast android:name="com.android.settings.flashlight.action.FLASHLIGHT_CHANGED" />
+4 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.systemui.accessibility.floatingmenu;

import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_EXCLUDE_FROM_SCREEN_MAGNIFICATION;
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_UNRESTRICTED_GESTURE_EXCLUSION;
import static android.view.WindowManager.LayoutParams.SYSTEM_FLAG_SHOW_FOR_ALL_USERS;

import android.content.Context;
@@ -90,9 +91,11 @@ class MenuViewLayerController implements IAccessibilityFloatingMenu {
                WindowManager.LayoutParams.TYPE_NAVIGATION_BAR_PANEL,
                WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE,
                PixelFormat.TRANSLUCENT);
        params.setTitle("FloatingMenu");
        params.receiveInsetsIgnoringZOrder = true;
        params.privateFlags |=
                PRIVATE_FLAG_EXCLUDE_FROM_SCREEN_MAGNIFICATION | SYSTEM_FLAG_SHOW_FOR_ALL_USERS;
                PRIVATE_FLAG_EXCLUDE_FROM_SCREEN_MAGNIFICATION | SYSTEM_FLAG_SHOW_FOR_ALL_USERS
                        | PRIVATE_FLAG_UNRESTRICTED_GESTURE_EXCLUSION;
        params.windowAnimations = android.R.style.Animation_Translucent;
        // Insets are configured to allow the menu to display over navigation and system bars.
        params.setFitInsetsTypes(0);