From a2acce76d095e7fe7d21491afe8ea6d22126fbb1 Mon Sep 17 00:00:00 2001 From: Brian Isganitis Date: Fri, 24 Feb 2023 23:45:19 +0000 Subject: Update split screen UI to support light theme. Persistent Taskbar supports light/dark themeing, so split screen should blend with the current mode. Test: Manual Fix: 268052229 Change-Id: I4a2857c89a04bdacb35c2189b82b8396cbf712ee --- .../Shell/res/color-night/taskbar_background.xml | 20 ++++++++++++++++++++ .../Shell/res/color/split_divider_background.xml | 19 ------------------- .../Shell/res/color/taskbar_background.xml | 2 +- libs/WindowManager/Shell/res/values-night/colors.xml | 1 + libs/WindowManager/Shell/res/values/colors.xml | 3 ++- .../android/wm/shell/common/split/SplitLayout.java | 4 ++++ 6 files changed, 28 insertions(+), 21 deletions(-) create mode 100644 libs/WindowManager/Shell/res/color-night/taskbar_background.xml delete mode 100644 libs/WindowManager/Shell/res/color/split_divider_background.xml (limited to 'libs') diff --git a/libs/WindowManager/Shell/res/color-night/taskbar_background.xml b/libs/WindowManager/Shell/res/color-night/taskbar_background.xml new file mode 100644 index 000000000000..9473cdd607d6 --- /dev/null +++ b/libs/WindowManager/Shell/res/color-night/taskbar_background.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/libs/WindowManager/Shell/res/color/split_divider_background.xml b/libs/WindowManager/Shell/res/color/split_divider_background.xml deleted file mode 100644 index 049980803ee3..000000000000 --- a/libs/WindowManager/Shell/res/color/split_divider_background.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - \ No newline at end of file diff --git a/libs/WindowManager/Shell/res/color/taskbar_background.xml b/libs/WindowManager/Shell/res/color/taskbar_background.xml index b3d260299106..0e165fca4fd3 100644 --- a/libs/WindowManager/Shell/res/color/taskbar_background.xml +++ b/libs/WindowManager/Shell/res/color/taskbar_background.xml @@ -16,5 +16,5 @@ --> - + \ No newline at end of file diff --git a/libs/WindowManager/Shell/res/values-night/colors.xml b/libs/WindowManager/Shell/res/values-night/colors.xml index 83c4d93982f4..5c6bb57a7f1c 100644 --- a/libs/WindowManager/Shell/res/values-night/colors.xml +++ b/libs/WindowManager/Shell/res/values-night/colors.xml @@ -15,6 +15,7 @@ --> + #ffffff @color/GM2_grey_200 diff --git a/libs/WindowManager/Shell/res/values/colors.xml b/libs/WindowManager/Shell/res/values/colors.xml index 6e750a3d5e34..85fbdea11807 100644 --- a/libs/WindowManager/Shell/res/values/colors.xml +++ b/libs/WindowManager/Shell/res/values/colors.xml @@ -17,7 +17,8 @@ */ --> - #ffffff + #000000 + @color/taskbar_background #59000000 #60000000 #00000000 diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java index 8a18271b029a..9103dd4f1caa 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java @@ -120,6 +120,7 @@ public final class SplitLayout implements DisplayInsetsController.OnInsetsChange private int mOrientation; private int mRotation; private int mDensity; + private int mUiMode; private final boolean mDimNonImeSide; private ValueAnimator mDividerFlingAnimator; @@ -295,10 +296,12 @@ public final class SplitLayout implements DisplayInsetsController.OnInsetsChange final Rect rootBounds = configuration.windowConfiguration.getBounds(); final int orientation = configuration.orientation; final int density = configuration.densityDpi; + final int uiMode = configuration.uiMode; if (mOrientation == orientation && mRotation == rotation && mDensity == density + && mUiMode == uiMode && mRootBounds.equals(rootBounds)) { return false; } @@ -310,6 +313,7 @@ public final class SplitLayout implements DisplayInsetsController.OnInsetsChange mRootBounds.set(rootBounds); mRotation = rotation; mDensity = density; + mUiMode = uiMode; mDividerSnapAlgorithm = getSnapAlgorithm(mContext, mRootBounds, null); updateDividerConfig(mContext); initDividerPosition(mTempRect); -- cgit v1.2.3-59-g8ed1b