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

Commit e6ae6e32 authored by Galia Peycheva's avatar Galia Peycheva Committed by Android (Google) Code Review
Browse files

Merge changes from topic "revert-13350963-blur_system_api-AFRJFBKNBA-sc-dev" into sc-dev

* changes:
  Revert "Add permission for blur SystemApi"
  Revert "Make window background blurs SystemApi"
  Revert "Make BackgroundBlurDrawable a SystemApi"
parents ba8bc8e9 fc49b64e
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -657,7 +657,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
@@ -722,7 +722,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 = 16844323; // 0x1010623
    field public static final int hand_second = 16844322; // 0x1010622
    field public static final int handle = 16843354; // 0x101025a
    field public static final int handleProfiling = 16842786; // 0x1010022
    field public static final int hapticFeedbackEnabled = 16843358; // 0x101025e
@@ -1057,11 +1057,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
@@ -1154,7 +1154,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
@@ -1295,10 +1295,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
@@ -49588,6 +49588,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 −17
Original line number Diff line number Diff line
@@ -263,7 +263,6 @@ package android {
    field public static final String UPDATE_TIME_ZONE_RULES = "android.permission.UPDATE_TIME_ZONE_RULES";
    field public static final String UPGRADE_RUNTIME_PERMISSIONS = "android.permission.UPGRADE_RUNTIME_PERMISSIONS";
    field public static final String USER_ACTIVITY = "android.permission.USER_ACTIVITY";
    field public static final String USE_BACKGROUND_BLUR = "android.permission.USE_BACKGROUND_BLUR";
    field public static final String USE_RESERVED_DISK = "android.permission.USE_RESERVED_DISK";
    field public static final String WHITELIST_AUTO_REVOKE_PERMISSIONS = "android.permission.WHITELIST_AUTO_REVOKE_PERMISSIONS";
    field public static final String WHITELIST_RESTRICTED_PERMISSIONS = "android.permission.WHITELIST_RESTRICTED_PERMISSIONS";
@@ -295,8 +294,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 {
@@ -2759,18 +2756,6 @@ package android.debug {
}
package android.graphics.drawable {
  public final class BackgroundBlurDrawable extends android.graphics.drawable.Drawable {
    ctor @RequiresPermission(android.Manifest.permission.USE_BACKGROUND_BLUR) public BackgroundBlurDrawable();
    method public void setBlurRadius(int);
    method public void setColor(@ColorInt int);
    method public void setCornerRadius(float);
    method public void setCornerRadius(float, float, float, float);
  }
}
package android.graphics.fonts {
  public class FontManager {
@@ -14102,10 +14087,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 {
+0 −20
Original line number Diff line number Diff line
@@ -9806,20 +9806,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        }
    }
    private void notifyAttachForDrawables() {
        if (mBackground != null) mBackground.onAttached(this);
        if (mForegroundInfo != null && mForegroundInfo.mDrawable != null) {
            mForegroundInfo.mDrawable.onAttached(this);
        }
    }
    private void notifyDetachForDrawables() {
        if (mBackground != null) mBackground.onDetached(this);
        if (mForegroundInfo != null && mForegroundInfo.mDrawable != null) {
            mForegroundInfo.mDrawable.onDetached(this);
        }
    }
    private void setNotifiedContentCaptureAppeared() {
        mPrivateFlags4 |= PFLAG4_NOTIFIED_CONTENT_CAPTURE_APPEARED;
        mPrivateFlags4 &= ~PFLAG4_NOTIFIED_CONTENT_CAPTURE_DISAPPEARED;
@@ -20672,7 +20658,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        notifyEnterOrExitForAutoFillIfNeeded(true);
        notifyAppearedOrDisappearedForContentCaptureIfNeeded(true);
        notifyAttachForDrawables();
    }
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
@@ -20722,7 +20707,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        notifyEnterOrExitForAutoFillIfNeeded(false);
        notifyAppearedOrDisappearedForContentCaptureIfNeeded(false);
        notifyDetachForDrawables();
    }
    /**
@@ -23860,7 +23844,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        if (mBackground != null) {
            if (isAttachedToWindow()) {
                mBackground.setVisible(false, false);
                mBackground.onDetached(this);
            }
            mBackground.setCallback(null);
            unscheduleDrawable(mBackground);
@@ -23910,7 +23893,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
                background.setState(getDrawableState());
            }
            if (isAttachedToWindow()) {
                background.onAttached(this);
                background.setVisible(getWindowVisibility() == VISIBLE && isShown(), false);
            }
@@ -24143,7 +24125,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        if (mForegroundInfo.mDrawable != null) {
            if (isAttachedToWindow()) {
                mForegroundInfo.mDrawable.setVisible(false, false);
                mForegroundInfo.mDrawable.onDetached(this);
            }
            mForegroundInfo.mDrawable.setCallback(null);
            unscheduleDrawable(mForegroundInfo.mDrawable);
@@ -24161,7 +24142,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
            }
            applyForegroundTint();
            if (isAttachedToWindow()) {
                foreground.onAttached(this);
                foreground.setVisible(getWindowVisibility() == VISIBLE && isShown(), false);
            }
            // Set callback last, since the view may still be initializing.
+8 −9
Original line number Diff line number Diff line
@@ -115,7 +115,6 @@ import android.graphics.RecordingCanvas;
import android.graphics.Rect;
import android.graphics.Region;
import android.graphics.RenderNode;
import android.graphics.drawable.BackgroundBlurDrawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.GradientDrawable;
import android.hardware.display.DisplayManager;
@@ -187,6 +186,7 @@ import android.window.ClientWindowFrames;
import com.android.internal.R;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.graphics.drawable.BackgroundBlurDrawable;
import com.android.internal.inputmethod.InputMethodDebug;
import com.android.internal.os.IResultReceiver;
import com.android.internal.os.SomeArgs;
@@ -671,14 +671,6 @@ public final class ViewRootImpl implements ViewParent,
    private final BackgroundBlurDrawable.Aggregator mBlurRegionAggregator =
            new BackgroundBlurDrawable.Aggregator(this);

    /**
     * @return {@link BackgroundBlurDrawable.Aggregator} for this instance.
     */
    @NonNull
    public BackgroundBlurDrawable.Aggregator getBlurRegionAggregator() {
        return mBlurRegionAggregator;
    }

    /**
     * @return {@link ImeFocusController} for this instance.
     */
@@ -10084,6 +10076,13 @@ public final class ViewRootImpl implements ViewParent,
        }
    }

    /**
     * Creates a background blur drawable for the backing {@link Surface}.
     */
    public BackgroundBlurDrawable createBackgroundBlurDrawable() {
        return mBlurRegionAggregator.createBackgroundBlurDrawable(mContext);
    }

    @Override
    public void onDescendantUnbufferedRequested() {
        mUnbufferedInputSource = mView.mUnbufferedInputSource;
+4 −12
Original line number Diff line number Diff line
@@ -1511,13 +1511,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
@@ -3237,14 +3233,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;

        /**
Loading