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

Commit a3f89c68 authored by Roshan Pius's avatar Roshan Pius
Browse files

Window: Mark SHOW_FOR_ALL_USERS flag as @SystemApi

Bug: 142090228
Test: Compiles
Change-Id: I850c7759dc909727f73e40fb6331871a9de25f20
parent 243c9bd0
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -9761,9 +9761,10 @@ package android.view {
    method public final long getUserActivityTimeout();
    method public final void setUserActivityTimeout(long);
    field @RequiresPermission(android.Manifest.permission.HIDE_NON_SYSTEM_OVERLAY_WINDOWS) public static final int SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS = 524288; // 0x80000
    field @RequiresPermission(android.Manifest.permission.INTERNAL_SYSTEM_WINDOW) public static final int SYSTEM_FLAG_SHOW_FOR_ALL_USERS = 16; // 0x10
  }
  @IntDef(flag=true, prefix={"SYSTEM_FLAG_"}, value={android.view.WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface WindowManager.LayoutParams.SystemFlags {
  @IntDef(flag=true, prefix={"SYSTEM_FLAG_"}, value={android.view.WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS, android.view.WindowManager.LayoutParams.SYSTEM_FLAG_SHOW_FOR_ALL_USERS}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface WindowManager.LayoutParams.SystemFlags {
  }
}
+6 −4
Original line number Diff line number Diff line
@@ -1680,8 +1680,9 @@ public interface WindowManager extends ViewManager {
         * to determine its default behavior.
         *
         * {@hide} */
        @UnsupportedAppUsage
        public static final int PRIVATE_FLAG_SHOW_FOR_ALL_USERS = 0x00000010;
        @SystemApi
        @RequiresPermission(permission.INTERNAL_SYSTEM_WINDOW)
        public static final int SYSTEM_FLAG_SHOW_FOR_ALL_USERS = 0x00000010;

        /**
         * Never animate position changes of the window.
@@ -1842,6 +1843,7 @@ public interface WindowManager extends ViewManager {
        @Retention(RetentionPolicy.SOURCE)
        @IntDef(flag = true, prefix = { "SYSTEM_FLAG_" }, value = {
                SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS,
                SYSTEM_FLAG_SHOW_FOR_ALL_USERS,
        })
        public @interface SystemFlags {}

@@ -1863,8 +1865,8 @@ public interface WindowManager extends ViewManager {
                        equals = PRIVATE_FLAG_WANTS_OFFSET_NOTIFICATIONS,
                        name = "WANTS_OFFSET_NOTIFICATIONS"),
                @ViewDebug.FlagToString(
                        mask = PRIVATE_FLAG_SHOW_FOR_ALL_USERS,
                        equals = PRIVATE_FLAG_SHOW_FOR_ALL_USERS,
                        mask = SYSTEM_FLAG_SHOW_FOR_ALL_USERS,
                        equals = SYSTEM_FLAG_SHOW_FOR_ALL_USERS,
                        name = "SHOW_FOR_ALL_USERS"),
                @ViewDebug.FlagToString(
                        mask = PRIVATE_FLAG_NO_MOVE_ANIMATION,
+1 −1
Original line number Diff line number Diff line
@@ -246,7 +246,7 @@ public class AccessibilityShortcutController {
                Toast warningToast = mFrameworkObjectProvider.makeToastFromText(
                        mContext, toastMessage, Toast.LENGTH_LONG);
                warningToast.getWindowParams().privateFlags |=
                        WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS;
                        WindowManager.LayoutParams.SYSTEM_FLAG_SHOW_FOR_ALL_USERS;
                warningToast.show();
            }

+2 −2
Original line number Diff line number Diff line
@@ -345,9 +345,9 @@ public class AccessibilityShortcutControllerTest {
        accessibilityShortcutController.performAccessibilityShortcut();
        accessibilityShortcutController.performAccessibilityShortcut();
        verify(mToast).show();
        assertEquals(WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS,
        assertEquals(WindowManager.LayoutParams.SYSTEM_FLAG_SHOW_FOR_ALL_USERS,
                mLayoutParams.privateFlags
                        & WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS);
                        & WindowManager.LayoutParams.SYSTEM_FLAG_SHOW_FOR_ALL_USERS);
        verify(mAccessibilityManagerService, times(1)).performAccessibilityShortcut();
    }

+1 −1
Original line number Diff line number Diff line
@@ -460,7 +460,7 @@ public class ScreenDecorations extends SystemUI implements Tunable {
                        | WindowManager.LayoutParams.FLAG_SLIPPERY
                        | WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN,
                PixelFormat.TRANSLUCENT);
        lp.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS
        lp.privateFlags |= WindowManager.LayoutParams.SYSTEM_FLAG_SHOW_FOR_ALL_USERS
                | WindowManager.LayoutParams.PRIVATE_FLAG_NO_MOVE_ANIMATION;

        if (!DEBUG_SCREENSHOT_ROUNDED_CORNERS) {
Loading