Make sure background drawable callback is cleared during resizing
bug: 27297724
Change-Id: I8ee3d0e093f94a7fc293f64949abbb612e0b2aa4
diff --git a/core/java/com/android/internal/policy/DecorView.java b/core/java/com/android/internal/policy/DecorView.java
index 4832881..aaa800a 100644
--- a/core/java/com/android/internal/policy/DecorView.java
+++ b/core/java/com/android/internal/policy/DecorView.java
@@ -1744,6 +1744,10 @@
mCaptionBackgroundDrawable = getContext().getDrawable(
R.drawable.decor_caption_title_focused);
}
+ if (mResizingBackgroundDrawable != null) {
+ mLastBackgroundDrawableCb = mResizingBackgroundDrawable.getCallback();
+ mResizingBackgroundDrawable.setCallback(null);
+ }
}
// Free floating overlapping windows require a caption.
@@ -1914,11 +1918,6 @@
final ThreadedRenderer renderer = getHardwareRenderer();
if (renderer != null) {
loadBackgroundDrawablesIfNeeded();
- if (mResizingBackgroundDrawable != null) {
- mLastBackgroundDrawableCb = mResizingBackgroundDrawable.getCallback();
- mResizingBackgroundDrawable.setCallback(null);
- }
-
mBackdropFrameRenderer = new BackdropFrameRenderer(this, renderer,
initialBounds, mResizingBackgroundDrawable, mCaptionBackgroundDrawable,
mUserCaptionBackgroundDrawable, getCurrentColor(mStatusColorViewState),