Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/WindowDecoration.java +1 −2 Original line number Diff line number Diff line Loading @@ -527,8 +527,7 @@ public abstract class WindowDecoration<T extends View & TaskFocusStateConsumer> } if (params.mShouldSetBackground) { final int backgroundColorInt = mTaskInfo.taskDescription != null ? mTaskInfo.taskDescription.getBackgroundColor() : Color.BLACK; final int backgroundColorInt = Color.BLACK; mTmpColor[0] = (float) Color.red(backgroundColorInt) / 255.f; mTmpColor[1] = (float) Color.green(backgroundColorInt) / 255.f; mTmpColor[2] = (float) Color.blue(backgroundColorInt) / 255.f; Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/WindowDecoration2.kt +2 −1 Original line number Diff line number Diff line Loading @@ -311,7 +311,8 @@ abstract class WindowDecoration2<T>( } if (params.shouldSetBackground) { val backgroundColorInt = taskInfo.taskDescription?.backgroundColor ?: Color.BLACK // TODO: b/437011322 - Use taskDescription backgroundColor for free resizing val backgroundColorInt = Color.BLACK val tmpColor = floatArrayOf( Color.red(backgroundColorInt).toFloat() / 255f, Loading libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/WindowDecorationTests.java +1 −6 Original line number Diff line number Diff line Loading @@ -697,13 +697,8 @@ public class WindowDecorationTests extends ShellTestCase { createMockSurfaceControlBuilder(captionContainerSurface); mMockSurfaceControlBuilders.add(captionContainerSurfaceBuilder); final ActivityManager.TaskDescription.Builder taskDescriptionBuilder = new ActivityManager.TaskDescription.Builder() .setBackgroundColor(Color.YELLOW); final ActivityManager.RunningTaskInfo taskInfo = new TestRunningTaskInfoBuilder() .setDisplayId(Display.DEFAULT_DISPLAY) .setTaskDescriptionBuilder(taskDescriptionBuilder) .setVisible(true) .setWindowingMode(WINDOWING_MODE_FREEFORM) .build(); Loading @@ -712,7 +707,7 @@ public class WindowDecorationTests extends ShellTestCase { mRelayoutParams.mShouldSetBackground = true; windowDecor.relayout(taskInfo, true /* hasGlobalFocus */); verify(mMockSurfaceControlStartT).setColor(mMockTaskSurface, new float[]{1.f, 1.f, 0.f}); verify(mMockSurfaceControlStartT).setColor(mMockTaskSurface, new float[]{0.f, 0.f, 0.f}); } @Test Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/WindowDecoration.java +1 −2 Original line number Diff line number Diff line Loading @@ -527,8 +527,7 @@ public abstract class WindowDecoration<T extends View & TaskFocusStateConsumer> } if (params.mShouldSetBackground) { final int backgroundColorInt = mTaskInfo.taskDescription != null ? mTaskInfo.taskDescription.getBackgroundColor() : Color.BLACK; final int backgroundColorInt = Color.BLACK; mTmpColor[0] = (float) Color.red(backgroundColorInt) / 255.f; mTmpColor[1] = (float) Color.green(backgroundColorInt) / 255.f; mTmpColor[2] = (float) Color.blue(backgroundColorInt) / 255.f; Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/WindowDecoration2.kt +2 −1 Original line number Diff line number Diff line Loading @@ -311,7 +311,8 @@ abstract class WindowDecoration2<T>( } if (params.shouldSetBackground) { val backgroundColorInt = taskInfo.taskDescription?.backgroundColor ?: Color.BLACK // TODO: b/437011322 - Use taskDescription backgroundColor for free resizing val backgroundColorInt = Color.BLACK val tmpColor = floatArrayOf( Color.red(backgroundColorInt).toFloat() / 255f, Loading
libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/WindowDecorationTests.java +1 −6 Original line number Diff line number Diff line Loading @@ -697,13 +697,8 @@ public class WindowDecorationTests extends ShellTestCase { createMockSurfaceControlBuilder(captionContainerSurface); mMockSurfaceControlBuilders.add(captionContainerSurfaceBuilder); final ActivityManager.TaskDescription.Builder taskDescriptionBuilder = new ActivityManager.TaskDescription.Builder() .setBackgroundColor(Color.YELLOW); final ActivityManager.RunningTaskInfo taskInfo = new TestRunningTaskInfoBuilder() .setDisplayId(Display.DEFAULT_DISPLAY) .setTaskDescriptionBuilder(taskDescriptionBuilder) .setVisible(true) .setWindowingMode(WINDOWING_MODE_FREEFORM) .build(); Loading @@ -712,7 +707,7 @@ public class WindowDecorationTests extends ShellTestCase { mRelayoutParams.mShouldSetBackground = true; windowDecor.relayout(taskInfo, true /* hasGlobalFocus */); verify(mMockSurfaceControlStartT).setColor(mMockTaskSurface, new float[]{1.f, 1.f, 0.f}); verify(mMockSurfaceControlStartT).setColor(mMockTaskSurface, new float[]{0.f, 0.f, 0.f}); } @Test Loading