Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c61d96f7 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Use black only for desktop tasks background" into main

parents c4b4a430 84d868de
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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;
+2 −1
Original line number Diff line number Diff line
@@ -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,
+1 −6
Original line number Diff line number Diff line
@@ -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();
@@ -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