diff options
| -rw-r--r-- | api/current.txt | 2 | ||||
| -rw-r--r-- | api/system-current.txt | 2 | ||||
| -rw-r--r-- | core/java/com/android/internal/policy/DecorContext.java | 11 | ||||
| -rw-r--r-- | core/java/com/android/internal/policy/PhoneWindow.java | 22 | ||||
| -rw-r--r-- | core/res/res/values/attrs.xml | 11 | ||||
| -rw-r--r-- | core/res/res/values/config.xml | 3 | ||||
| -rw-r--r-- | core/res/res/values/public.xml | 2 | ||||
| -rw-r--r-- | core/res/res/values/symbols.xml | 2 | ||||
| -rw-r--r-- | packages/SystemUI/res/values/styles.xml | 1 |
9 files changed, 10 insertions, 46 deletions
diff --git a/api/current.txt b/api/current.txt index 195ade13fa31..f75ef0b5580e 100644 --- a/api/current.txt +++ b/api/current.txt @@ -1395,6 +1395,7 @@ package android { field public static final int windowAllowReturnTransitionOverlap = 16843835; // 0x101043b field public static final int windowAnimationStyle = 16842926; // 0x10100ae field public static final int windowBackground = 16842836; // 0x1010054 + field public static final int windowBackgroundFallback = 16844035; // 0x1010503 field public static final int windowClipToOutline = 16843947; // 0x10104ab field public static final int windowCloseOnTouchOutside = 16843611; // 0x101035b field public static final int windowContentOverlay = 16842841; // 0x1010059 @@ -1420,7 +1421,6 @@ package android { field public static final int windowNoTitle = 16842838; // 0x1010056 field public static final int windowOverscan = 16843727; // 0x10103cf field public static final int windowReenterTransition = 16843951; // 0x10104af - field public static final int windowResizingBackground = 16844035; // 0x1010503 field public static final int windowReturnTransition = 16843950; // 0x10104ae field public static final int windowSharedElementEnterTransition = 16843833; // 0x1010439 field public static final int windowSharedElementExitTransition = 16843834; // 0x101043a diff --git a/api/system-current.txt b/api/system-current.txt index 23d2ec072c89..c4c6f1c9edff 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -1491,6 +1491,7 @@ package android { field public static final int windowAllowReturnTransitionOverlap = 16843835; // 0x101043b field public static final int windowAnimationStyle = 16842926; // 0x10100ae field public static final int windowBackground = 16842836; // 0x1010054 + field public static final int windowBackgroundFallback = 16844035; // 0x1010503 field public static final int windowClipToOutline = 16843947; // 0x10104ab field public static final int windowCloseOnTouchOutside = 16843611; // 0x101035b field public static final int windowContentOverlay = 16842841; // 0x1010059 @@ -1516,7 +1517,6 @@ package android { field public static final int windowNoTitle = 16842838; // 0x1010056 field public static final int windowOverscan = 16843727; // 0x10103cf field public static final int windowReenterTransition = 16843951; // 0x10104af - field public static final int windowResizingBackground = 16844035; // 0x1010503 field public static final int windowReturnTransition = 16843950; // 0x10104ae field public static final int windowSharedElementEnterTransition = 16843833; // 0x1010439 field public static final int windowSharedElementExitTransition = 16843834; // 0x101043a diff --git a/core/java/com/android/internal/policy/DecorContext.java b/core/java/com/android/internal/policy/DecorContext.java index aa603c123f8b..4f17c39ddf81 100644 --- a/core/java/com/android/internal/policy/DecorContext.java +++ b/core/java/com/android/internal/policy/DecorContext.java @@ -17,7 +17,6 @@ package com.android.internal.policy; import android.content.Context; -import android.content.res.TypedArray; import android.view.ContextThemeWrapper; import android.view.WindowManager; import android.view.WindowManagerImpl; @@ -31,7 +30,6 @@ import android.view.WindowManagerImpl; class DecorContext extends ContextThemeWrapper { private PhoneWindow mPhoneWindow; private WindowManager mWindowManager; - private TypedArray mWindowStyle; public DecorContext(Context context) { super(context, null); @@ -54,13 +52,4 @@ class DecorContext extends ContextThemeWrapper { } return super.getSystemService(name); } - - public TypedArray getWindowStyle() { - synchronized (this) { - if (mWindowStyle == null) { - mWindowStyle = obtainStyledAttributes(com.android.internal.R.styleable.Window); - } - return mWindowStyle; - } - } } diff --git a/core/java/com/android/internal/policy/PhoneWindow.java b/core/java/com/android/internal/policy/PhoneWindow.java index 8b81812c45a5..46442110aa10 100644 --- a/core/java/com/android/internal/policy/PhoneWindow.java +++ b/core/java/com/android/internal/policy/PhoneWindow.java @@ -31,7 +31,6 @@ import android.animation.Animator; import android.animation.ObjectAnimator; import android.app.ActivityManagerNative; import android.app.SearchManager; -import android.graphics.drawable.ColorDrawable; import android.os.Build; import android.os.UserHandle; @@ -5438,20 +5437,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { * */ private Drawable getResizingBackgroundDrawable() { final Context context = mDecor.getContext(); - final TypedArray windowStyle; - if (context instanceof DecorContext) { - windowStyle = ((DecorContext) context).getWindowStyle(); - } else { - windowStyle = getWindowStyle(); - } - final int resourceId = - windowStyle.getResourceId(R.styleable.Window_windowResizingBackground, 0); - if (resourceId != 0) { - return context.getDrawable(resourceId); - } - // The app didn't set a resizing background color. In this case we try to use the app's - // background drawable for the resizing background. if (mBackgroundResource != 0) { final Drawable drawable = context.getDrawable(mBackgroundResource); if (drawable != null) { @@ -5459,8 +5445,6 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { } } - // The app background drawable isn't currently set. This might be because the app cleared - // it. In this case we try to use the app's background fallback drawable. if (mBackgroundFallbackResource != 0) { final Drawable fallbackDrawable = context.getDrawable(mBackgroundFallbackResource); if (fallbackDrawable != null) { @@ -5468,7 +5452,9 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { } } - return new ColorDrawable(context.getResources().getInteger( - com.android.internal.R.integer.config_windowResizingBackgroundColorARGB)); + // We shouldn't really get here as the background fallback should be always available since + // it is defaulted by the system. + Log.w(TAG, "Failed to find background drawable for PhoneWindow=" + this); + return null; } } diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml index 8e36eb052ee4..093ea80950b7 100644 --- a/core/res/res/values/attrs.xml +++ b/core/res/res/values/attrs.xml @@ -323,14 +323,10 @@ <attr name="windowBackground" format="reference" /> <!-- Drawable to draw selectively within the inset areas when the windowBackground has been set to null. This protects against seeing visual garbage in the - surface when the app has not drawn any content into this area. --> + surface when the app has not drawn any content into this area. One example is + when the user is resizing a window of an activity that has + {@link android.R.attr#resizeableActivity} set for multi-window mode. --> <attr name="windowBackgroundFallback" format="reference" /> - <!-- Drawable used to fill in areas the app has not rendered content to yet when the user is - resizing the window of an activity that has {@link android.R.attr#resizeableActivity} - set for multi-window mode. If unset, the system will try to use windowBackground if - set, then windowBackgroundFallback if set. Otherwise, the system default resizing - background color --> - <attr name="windowResizingBackground" format="reference" /> <!-- Drawable to use as a frame around the window. --> <attr name="windowFrame" format="reference" /> <!-- Flag indicating whether there should be no title on this window. --> @@ -1850,7 +1846,6 @@ i <declare-styleable name="Window"> <attr name="windowBackground" /> <attr name="windowBackgroundFallback" /> - <attr name="windowResizingBackground" /> <attr name="windowContentOverlay" /> <attr name="windowFrame" /> <attr name="windowNoTitle" /> diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index c8d7b6283646..74c745bad8f0 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -2352,9 +2352,6 @@ is non-interactive. --> <bool name="config_cameraDoubleTapPowerGestureEnabled">true</bool> - <!-- Default background color to use when resizing a window if the app didn't specify one. --> - <integer name="config_windowResizingBackgroundColorARGB">0xFF808080</integer> - <!-- Name of the component to handle network policy notifications. If present, disables NetworkPolicyManagerService's presentation of data-usage notifications. --> <string translatable="false" name="config_networkPolicyNotificationComponent"></string> diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml index 839e81b4373a..c05b585be298 100644 --- a/core/res/res/values/public.xml +++ b/core/res/res/values/public.xml @@ -2677,7 +2677,7 @@ <public type="attr" name="level" /> <public type="attr" name="contextPopupMenuStyle" /> <public type="attr" name="textAppearancePopupMenuHeader" /> - <public type="attr" name="windowResizingBackground" /> + <public type="attr" name="windowBackgroundFallback" /> <public type="style" name="Theme.Material.DayNight" /> <public type="style" name="Theme.Material.DayNight.DarkActionBar" /> diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index 6c025b45135f..3baddbb2bff3 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -2333,7 +2333,5 @@ <java-symbol type="string" name="config_iccHotswapPromptForRestartDialogComponent" /> - <java-symbol type="integer" name="config_windowResizingBackgroundColorARGB" /> - <java-symbol type="string" name="config_packagedKeyboardName" /> </resources> diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml index 8f634e1952f7..8241ddf6a378 100644 --- a/packages/SystemUI/res/values/styles.xml +++ b/packages/SystemUI/res/values/styles.xml @@ -36,7 +36,6 @@ <style name="RecentsTheme.Wallpaper"> <!-- Wallpaper --> <item name="android:windowBackground">@color/transparent</item> - <item name="android:windowResizingBackground">@color/transparent</item> <item name="android:colorBackgroundCacheHint">@null</item> <item name="android:windowShowWallpaper">true</item> </style> |