Merge changes I9881453b,I57fa88c6 into stage-aosp-master am: c227f6f1e0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16904914 Change-Id: I6e2c1091ad8df9a58368db0ac024bb91a97fab3f
This commit is contained in:
@@ -975,18 +975,23 @@ final class TaskDisplayArea extends DisplayArea<WindowContainer> {
|
|||||||
Color color = Color.valueOf(colorInt);
|
Color color = Color.valueOf(colorInt);
|
||||||
mColorLayerCounter++;
|
mColorLayerCounter++;
|
||||||
|
|
||||||
getPendingTransaction()
|
// Only apply the background color if the TDA is actually attached and has a valid surface
|
||||||
.setColor(mSurfaceControl, new float[]{color.red(), color.green(), color.blue()});
|
// to set the background color on. We still want to keep track of the background color state
|
||||||
|
// even if we are not showing it for when/if the TDA is reattached and gets a valid surface
|
||||||
scheduleAnimation();
|
if (mSurfaceControl != null) {
|
||||||
|
getPendingTransaction()
|
||||||
|
.setColor(mSurfaceControl,
|
||||||
|
new float[]{color.red(), color.green(), color.blue()});
|
||||||
|
scheduleAnimation();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void clearBackgroundColor() {
|
void clearBackgroundColor() {
|
||||||
mColorLayerCounter--;
|
mColorLayerCounter--;
|
||||||
|
|
||||||
// Only clear the color layer if we have received the same amounts of clear as set
|
// Only clear the color layer if we have received the same amounts of clear as set
|
||||||
// requests.
|
// requests and TDA has a non null surface control (i.e. is attached)
|
||||||
if (mColorLayerCounter == 0) {
|
if (mColorLayerCounter == 0 && mSurfaceControl != null) {
|
||||||
getPendingTransaction().unsetColor(mSurfaceControl);
|
getPendingTransaction().unsetColor(mSurfaceControl);
|
||||||
scheduleAnimation();
|
scheduleAnimation();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user