Loading libs/WindowManager/Shell/res/drawable/decor_handle_dark.xml +14 −7 Original line number Diff line number Diff line Loading @@ -13,13 +13,20 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24"> <group android:translateY="8.0"> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="128dp" android:height="4dp" android:viewportWidth="128" android:viewportHeight="4" > <group> <clip-path android:pathData="M2 0H126C127.105 0 128 0.895431 128 2C128 3.10457 127.105 4 126 4H2C0.895431 4 0 3.10457 0 2C0 0.895431 0.895431 0 2 0Z" /> <path android:fillColor="@android:color/black" android:pathData="M3,5V3H21V5Z"/> android:pathData="M0 0V4H128V0" android:fillColor="@android:color/black" /> </group> </vector> libs/WindowManager/Shell/res/layout/desktop_mode_focused_window_decor.xml +1 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ android:layout_width="176dp" android:layout_height="42dp" android:paddingHorizontal="24dp" android:paddingVertical="19dp" android:contentDescription="@string/handle_text" android:src="@drawable/decor_handle_dark" tools:tint="@color/desktop_mode_caption_handle_bar_dark" Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/DesktopModeWindowDecorationViewHolder.kt +19 −16 Original line number Diff line number Diff line package com.android.wm.shell.windowdecor.viewholder import android.app.ActivityManager.RunningTaskInfo import android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM import android.content.Context import android.graphics.Color import android.view.View import android.view.WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS /** * Encapsulates the root [View] of a window decoration and its children to facilitate looking up * children (via findViewById) and updating to the latest data from [RunningTaskInfo]. Loading @@ -13,8 +15,8 @@ internal abstract class DesktopModeWindowDecorationViewHolder(rootView: View) { val context: Context = rootView.context /** * A signal to the view holder that new data is available and that the views should be updated * to reflect it. * A signal to the view holder that new data is available and that the views should be updated to * reflect it. */ abstract fun bindData(taskInfo: RunningTaskInfo) Loading @@ -23,7 +25,8 @@ internal abstract class DesktopModeWindowDecorationViewHolder(rootView: View) { * with the caption background color. */ protected fun shouldUseLightCaptionColors(taskInfo: RunningTaskInfo): Boolean { return if (Color.alpha(taskInfo.taskDescription.statusBarColor) != 0) { return if (Color.alpha(taskInfo.taskDescription.statusBarColor) != 0 && taskInfo.windowingMode == WINDOWING_MODE_FREEFORM) { Color.valueOf(taskInfo.taskDescription.statusBarColor).luminance() < 0.5 } else { taskInfo.taskDescription.statusBarAppearance and APPEARANCE_LIGHT_STATUS_BARS == 0 Loading Loading
libs/WindowManager/Shell/res/drawable/decor_handle_dark.xml +14 −7 Original line number Diff line number Diff line Loading @@ -13,13 +13,20 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24"> <group android:translateY="8.0"> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="128dp" android:height="4dp" android:viewportWidth="128" android:viewportHeight="4" > <group> <clip-path android:pathData="M2 0H126C127.105 0 128 0.895431 128 2C128 3.10457 127.105 4 126 4H2C0.895431 4 0 3.10457 0 2C0 0.895431 0.895431 0 2 0Z" /> <path android:fillColor="@android:color/black" android:pathData="M3,5V3H21V5Z"/> android:pathData="M0 0V4H128V0" android:fillColor="@android:color/black" /> </group> </vector>
libs/WindowManager/Shell/res/layout/desktop_mode_focused_window_decor.xml +1 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ android:layout_width="176dp" android:layout_height="42dp" android:paddingHorizontal="24dp" android:paddingVertical="19dp" android:contentDescription="@string/handle_text" android:src="@drawable/decor_handle_dark" tools:tint="@color/desktop_mode_caption_handle_bar_dark" Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/DesktopModeWindowDecorationViewHolder.kt +19 −16 Original line number Diff line number Diff line package com.android.wm.shell.windowdecor.viewholder import android.app.ActivityManager.RunningTaskInfo import android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM import android.content.Context import android.graphics.Color import android.view.View import android.view.WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS /** * Encapsulates the root [View] of a window decoration and its children to facilitate looking up * children (via findViewById) and updating to the latest data from [RunningTaskInfo]. Loading @@ -13,8 +15,8 @@ internal abstract class DesktopModeWindowDecorationViewHolder(rootView: View) { val context: Context = rootView.context /** * A signal to the view holder that new data is available and that the views should be updated * to reflect it. * A signal to the view holder that new data is available and that the views should be updated to * reflect it. */ abstract fun bindData(taskInfo: RunningTaskInfo) Loading @@ -23,7 +25,8 @@ internal abstract class DesktopModeWindowDecorationViewHolder(rootView: View) { * with the caption background color. */ protected fun shouldUseLightCaptionColors(taskInfo: RunningTaskInfo): Boolean { return if (Color.alpha(taskInfo.taskDescription.statusBarColor) != 0) { return if (Color.alpha(taskInfo.taskDescription.statusBarColor) != 0 && taskInfo.windowingMode == WINDOWING_MODE_FREEFORM) { Color.valueOf(taskInfo.taskDescription.statusBarColor).luminance() < 0.5 } else { taskInfo.taskDescription.statusBarAppearance and APPEARANCE_LIGHT_STATUS_BARS == 0 Loading