Loading core/java/android/view/View.java +15 −0 Original line number Diff line number Diff line Loading @@ -967,6 +967,19 @@ public class View implements Drawable.Callback, KeyEvent.Callback, */ static boolean sBrokenInsetsDispatch; /** * Prior to Q, calling * {@link com.android.internal.policy.DecorView#setBackgroundDrawable(Drawable)} * did not call update the window format so the opacity of the background was not correctly * applied to the window. Some applications rely on this misbehavior to work properly. * <p> * From Q, {@link com.android.internal.policy.DecorView#setBackgroundDrawable(Drawable)} is * the same as {@link com.android.internal.policy.DecorView#setWindowBackground(Drawable)} * which updates the window format. * @hide */ protected static boolean sBrokenWindowBackground; /** @hide */ @IntDef({NOT_FOCUSABLE, FOCUSABLE, FOCUSABLE_AUTO}) @Retention(RetentionPolicy.SOURCE) Loading Loading @@ -5223,6 +5236,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback, sBrokenInsetsDispatch = ViewRootImpl.sNewInsetsMode != NEW_INSETS_MODE_FULL || targetSdkVersion < Build.VERSION_CODES.Q; sBrokenWindowBackground = targetSdkVersion < Build.VERSION_CODES.Q; sCompatibilityDone = true; } } core/java/com/android/internal/policy/DecorView.java +3 −2 Original line number Diff line number Diff line Loading @@ -983,15 +983,16 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind @Override public void setBackgroundDrawable(Drawable background) { // TODO: This should route through setWindowBackground, but late in the release to make this // change. if (mOriginalBackgroundDrawable != background) { mOriginalBackgroundDrawable = background; updateBackgroundDrawable(); if (!View.sBrokenWindowBackground) { drawableChanged(); } } } public void setWindowFrame(Drawable drawable) { if (getForeground() != drawable) { Loading Loading
core/java/android/view/View.java +15 −0 Original line number Diff line number Diff line Loading @@ -967,6 +967,19 @@ public class View implements Drawable.Callback, KeyEvent.Callback, */ static boolean sBrokenInsetsDispatch; /** * Prior to Q, calling * {@link com.android.internal.policy.DecorView#setBackgroundDrawable(Drawable)} * did not call update the window format so the opacity of the background was not correctly * applied to the window. Some applications rely on this misbehavior to work properly. * <p> * From Q, {@link com.android.internal.policy.DecorView#setBackgroundDrawable(Drawable)} is * the same as {@link com.android.internal.policy.DecorView#setWindowBackground(Drawable)} * which updates the window format. * @hide */ protected static boolean sBrokenWindowBackground; /** @hide */ @IntDef({NOT_FOCUSABLE, FOCUSABLE, FOCUSABLE_AUTO}) @Retention(RetentionPolicy.SOURCE) Loading Loading @@ -5223,6 +5236,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback, sBrokenInsetsDispatch = ViewRootImpl.sNewInsetsMode != NEW_INSETS_MODE_FULL || targetSdkVersion < Build.VERSION_CODES.Q; sBrokenWindowBackground = targetSdkVersion < Build.VERSION_CODES.Q; sCompatibilityDone = true; } }
core/java/com/android/internal/policy/DecorView.java +3 −2 Original line number Diff line number Diff line Loading @@ -983,15 +983,16 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind @Override public void setBackgroundDrawable(Drawable background) { // TODO: This should route through setWindowBackground, but late in the release to make this // change. if (mOriginalBackgroundDrawable != background) { mOriginalBackgroundDrawable = background; updateBackgroundDrawable(); if (!View.sBrokenWindowBackground) { drawableChanged(); } } } public void setWindowFrame(Drawable drawable) { if (getForeground() != drawable) { Loading