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

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

Merge "Update canCreateSystemApplicationOverlay when adding system overlays" into main

parents c96fdab3 94a1ee22
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -83,6 +83,7 @@ import static android.view.WindowManager.LayoutParams.INVALID_WINDOW_TYPE;
import static android.view.WindowManager.LayoutParams.LAST_APPLICATION_WINDOW;
import static android.view.WindowManager.LayoutParams.LAST_SUB_WINDOW;
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_IS_ROUNDED_CORNERS_OVERLAY;
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_SYSTEM_APPLICATION_OVERLAY;
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_TRUSTED_OVERLAY;
import static android.view.WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS;
import static android.view.WindowManager.LayoutParams.TYPE_ACCESSIBILITY_OVERLAY;
@@ -1681,6 +1682,12 @@ public class WindowManagerService extends IWindowManager.Stub
                    return WindowManagerGlobal.ADD_BAD_SUBWINDOW_TOKEN;
                }
            }
            // Update whether the session should be able to add system application overlays for any
            // attempt to add a system application overlay.
            if ((attrs.privateFlags & PRIVATE_FLAG_SYSTEM_APPLICATION_OVERLAY) != 0) {
                session.updateCanCreateSystemApplicationOverlay(mPermissionManager);
            }

            final DisplayContent displayContent = parentWindow != null
                    ? parentWindow.mDisplayContent
                    : getDisplayContentOrCreate(displayId, attrs.token);