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

Commit 371dd07c authored by Galia Peycheva's avatar Galia Peycheva
Browse files

Revert "Make window background blurs SystemApi"

Revert "Add permission check for blurs in SurfaceFlinger"

Revert "Remove public usages of FLAG_BLUR_BEHIND"

Revert "Add pid and uid to SF::setClientStateLocked"

Revert "Add USE_BACKGROUND_BLUR to cts expected permissions"

Revert submission 13350963-blur_system_api

Reason for revert: This topic made blurs a system api. API council voted against that and we will instead aim to make it public for S. None of these changes are relevant in that case.

Reverted Changes:
I3683db296:Remove public usages of FLAG_BLUR_BEHIND
I23b21b603:Add USE_BACKGROUND_BLUR to cts expected permission...
Id21f03793:Add pid and uid to SF::setClientStateLocked
If5d8344a5:Add permission for blur SystemApi
I70d1e1715:Add permission check for blurs in SurfaceFlinger
Icf98c3607:Make window background blurs SystemApi
I0b881ec6e:Make BackgroundBlurDrawable a SystemApi

Bug: 177523043
Test: m
Change-Id: I0f7bcf34db2986d8d5e08b115a611e8e07db5917
parent 77bf6e07
Loading
Loading
Loading
Loading
+9 −8
Original line number Diff line number Diff line
@@ -572,7 +572,7 @@ package android {
    field public static final int dropDownWidth = 16843362; // 0x1010262
    field public static final int duplicateParentState = 16842985; // 0x10100e9
    field public static final int duration = 16843160; // 0x1010198
    field public static final int edgeEffectType = 16844323; // 0x1010623
    field public static final int edgeEffectType = 16844322; // 0x1010622
    field public static final int editTextBackground = 16843602; // 0x1010352
    field public static final int editTextColor = 16843601; // 0x1010351
    field public static final int editTextPreferenceStyle = 16842898; // 0x1010092
@@ -658,7 +658,7 @@ package android {
    field @Deprecated public static final int fontProviderCerts = 16844125; // 0x101055d
    field @Deprecated public static final int fontProviderPackage = 16844119; // 0x1010557
    field @Deprecated public static final int fontProviderQuery = 16844113; // 0x1010551
    field public static final int fontProviderSystemFontFamily = 16844322; // 0x1010622
    field public static final int fontProviderSystemFontFamily = 16844321; // 0x1010621
    field public static final int fontStyle = 16844095; // 0x101053f
    field public static final int fontVariationSettings = 16844144; // 0x1010570
    field public static final int fontWeight = 16844083; // 0x1010533
@@ -723,7 +723,7 @@ package android {
    field public static final int gwpAsanMode = 16844310; // 0x1010616
    field public static final int hand_hour = 16843011; // 0x1010103
    field public static final int hand_minute = 16843012; // 0x1010104
    field public static final int hand_second = 16844324; // 0x1010624
    field public static final int hand_second = 16844323; // 0x1010623
    field public static final int handle = 16843354; // 0x101025a
    field public static final int handleProfiling = 16842786; // 0x1010022
    field public static final int hapticFeedbackEnabled = 16843358; // 0x101025e
@@ -1058,11 +1058,11 @@ package android {
    field public static final int parentActivityName = 16843687; // 0x10103a7
    field @Deprecated public static final int password = 16843100; // 0x101015c
    field public static final int path = 16842794; // 0x101002a
    field public static final int pathAdvancedPattern = 16844320; // 0x1010620
    field public static final int pathAdvancedPattern = 16844319; // 0x101061f
    field public static final int pathData = 16843781; // 0x1010405
    field public static final int pathPattern = 16842796; // 0x101002c
    field public static final int pathPrefix = 16842795; // 0x101002b
    field public static final int pathSuffix = 16844318; // 0x101061e
    field public static final int pathSuffix = 16844317; // 0x101061d
    field public static final int patternPathData = 16843978; // 0x10104ca
    field public static final int permission = 16842758; // 0x1010006
    field public static final int permissionFlags = 16843719; // 0x10103c7
@@ -1155,7 +1155,7 @@ package android {
    field public static final int reqNavigation = 16843306; // 0x101022a
    field public static final int reqTouchScreen = 16843303; // 0x1010227
    field public static final int requestLegacyExternalStorage = 16844291; // 0x1010603
    field public static final int requireDeviceScreenOn = 16844317; // 0x101061d
    field public static final int requireDeviceScreenOn = 16844316; // 0x101061c
    field public static final int requireDeviceUnlock = 16843756; // 0x10103ec
    field public static final int required = 16843406; // 0x101028e
    field public static final int requiredAccountType = 16843734; // 0x10103d6
@@ -1296,10 +1296,10 @@ package android {
    field public static final int spotShadowAlpha = 16843967; // 0x10104bf
    field public static final int src = 16843033; // 0x1010119
    field public static final int ssp = 16843747; // 0x10103e3
    field public static final int sspAdvancedPattern = 16844321; // 0x1010621
    field public static final int sspAdvancedPattern = 16844320; // 0x1010620
    field public static final int sspPattern = 16843749; // 0x10103e5
    field public static final int sspPrefix = 16843748; // 0x10103e4
    field public static final int sspSuffix = 16844319; // 0x101061f
    field public static final int sspSuffix = 16844318; // 0x101061e
    field public static final int stackFromBottom = 16843005; // 0x10100fd
    field public static final int stackViewStyle = 16843838; // 0x101043e
    field public static final int starStyle = 16842882; // 0x1010082
@@ -49585,6 +49585,7 @@ package android.view {
    field public static final int FLAGS_CHANGED = 4; // 0x4
    field public static final int FLAG_ALLOW_LOCK_WHILE_SCREEN_ON = 1; // 0x1
    field public static final int FLAG_ALT_FOCUSABLE_IM = 131072; // 0x20000
    field @Deprecated public static final int FLAG_BLUR_BEHIND = 4; // 0x4
    field public static final int FLAG_DIM_BEHIND = 2; // 0x2
    field @Deprecated public static final int FLAG_DISMISS_KEYGUARD = 4194304; // 0x400000
    field @Deprecated public static final int FLAG_DITHER = 4096; // 0x1000
+0 −4
Original line number Diff line number Diff line
@@ -295,8 +295,6 @@ package android {
    field public static final int sdkVersion = 16844304; // 0x1010610
    field public static final int supportsAmbientMode = 16844173; // 0x101058d
    field public static final int userRestriction = 16844164; // 0x1010584
    field public static final int windowBackgroundBlurEnabled = 16844316; // 0x101061c
    field public static final int windowBackgroundBlurRadius = 16844315; // 0x101061b
  }
  public static final class R.bool {
@@ -14087,10 +14085,8 @@ package android.view {
    method public boolean isSystemApplicationOverlay();
    method @RequiresPermission(android.Manifest.permission.SYSTEM_APPLICATION_OVERLAY) public void setSystemApplicationOverlay(boolean);
    method public final void setUserActivityTimeout(long);
    field @RequiresPermission(android.Manifest.permission.USE_BACKGROUND_BLUR) public static final int FLAG_BLUR_BEHIND = 4; // 0x4
    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
    field @RequiresPermission(android.Manifest.permission.USE_BACKGROUND_BLUR) public int backgroundBlurRadius;
  }
  @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 {
+4 −12
Original line number Diff line number Diff line
@@ -1509,13 +1509,9 @@ public interface WindowManager extends ViewManager {
         *  Use {@link #dimAmount} to control the amount of dim. */
        public static final int FLAG_DIM_BEHIND        = 0x00000002;

        /** Window flag: enable blurring behind this window.
         * To set the amount of blur, use {@link #backgroundBlurRadius}
         *
         * @hide
         */
        @RequiresPermission(permission.USE_BACKGROUND_BLUR)
        @SystemApi
        /** Window flag: blur everything behind this window.
         * @deprecated Blurring is no longer supported. */
        @Deprecated
        public static final int FLAG_BLUR_BEHIND        = 0x00000004;

        /** Window flag: this window won't ever get key input focus, so the
@@ -3233,14 +3229,10 @@ public interface WindowManager extends ViewManager {
        public boolean preferMinimalPostProcessing = false;

        /**
         * When {@link FLAG_BLUR_BEHIND} is set, this is the amount of blur in pixels that this
         * window will use to blur behind itself.
         * The range is from 0, which means no blur, to 150.
         * Indicates that this window wants to have blurred content behind it.
         *
         * @hide
         */
        @SystemApi
        @RequiresPermission(permission.USE_BACKGROUND_BLUR)
        public int backgroundBlurRadius = 0;

        /**
+2 −8
Original line number Diff line number Diff line
@@ -2540,14 +2540,8 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
            }
        }

        if (a.getBoolean(R.styleable.Window_windowBackgroundBlurEnabled, false)) {
            if ((getForcedWindowFlags() & WindowManager.LayoutParams.FLAG_BLUR_BEHIND) == 0) {
                params.flags |= WindowManager.LayoutParams.FLAG_BLUR_BEHIND;
            }

        params.backgroundBlurRadius = a.getDimensionPixelSize(
                        android.R.styleable.Window_windowBackgroundBlurRadius, 0);
        }
                R.styleable.Window_windowBackgroundBlurRadius, 0);

        if (params.windowAnimations == 0) {
            params.windowAnimations = a.getResourceId(
+4 −12
Original line number Diff line number Diff line
@@ -87,16 +87,6 @@
             theme does not set this value, meaning it is based on whether the
             window is floating. -->
        <attr name="backgroundDimEnabled" format="boolean" />
        <!-- When windowBackgroundBlurEnabled is set, this is the amount of blur to apply
             behind the window. The range is from 0, which means no blur, to 150.
             @hide @SystemApi -->
        <attr name="windowBackgroundBlurRadius" format="dimension"/>
        <!-- If set, the area behind the window will be blurred with radius
             windowBackgroundBlurRadius.
             @hide @SystemApi -->
        <attr name="windowBackgroundBlurEnabled" format="boolean" />
        <!-- Color of background imagery used for popup windows. -->
        <attr name="colorPopupBackground" format="color" />
        <!-- Color used for list divider. -->
@@ -1983,8 +1973,6 @@
        <attr name="textColor" />
        <attr name="backgroundDimEnabled" />
        <attr name="backgroundDimAmount" />
        <attr name="windowBackgroundBlurEnabled" />
        <attr name="windowBackgroundBlurRadius" />
        <attr name="windowActionBar" />
        <attr name="windowActionModeOverlay" />
        <attr name="windowActionBarOverlay" />
@@ -2202,6 +2190,10 @@
             the decor view. -->
        <attr name="windowLightNavigationBar" format="boolean" />
        <!-- @hide -->
        <attr name="windowBackgroundBlurRadius" format="dimension"/>
        <!-- Controls how the window is laid out if there is a {@code DisplayCutout}.
        <p>
        Defaults to {@code default}.
Loading