Loading libs/WindowManager/Shell/res/values/colors.xml +2 −0 Original line number Diff line number Diff line Loading @@ -67,4 +67,6 @@ <color name="desktop_mode_caption_menu_text_color">#191C1D</color> <color name="desktop_mode_caption_menu_buttons_color_inactive">#191C1D</color> <color name="desktop_mode_caption_menu_buttons_color_active">#00677E</color> <color name="desktop_mode_resize_veil_light">#EFF1F2</color> <color name="desktop_mode_resize_veil_dark">#1C1C17</color> </resources> libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/ResizeVeil.java +17 −0 Original line number Diff line number Diff line Loading @@ -19,8 +19,10 @@ package com.android.wm.shell.windowdecor; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.ValueAnimator; import android.annotation.ColorRes; import android.app.ActivityManager.RunningTaskInfo; import android.content.Context; import android.content.res.Configuration; import android.graphics.PixelFormat; import android.graphics.Rect; import android.graphics.drawable.Drawable; Loading Loading @@ -109,6 +111,10 @@ public class ResizeVeil { t.reparent(mVeilSurface, parentSurface); mParentSurface = parentSurface; } int backgroundColorId = getBackgroundColorId(); mViewHost.getView().setBackgroundColor(mContext.getColor(backgroundColorId)); t.show(mVeilSurface) .apply(); final ValueAnimator animator = new ValueAnimator(); Loading Loading @@ -158,6 +164,17 @@ public class ResizeVeil { animator.start(); } @ColorRes private int getBackgroundColorId() { Configuration configuration = mContext.getResources().getConfiguration(); if ((configuration.uiMode & Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES) { return R.color.desktop_mode_resize_veil_dark; } else { return R.color.desktop_mode_resize_veil_light; } } /** * Dispose of veil when it is no longer needed, likely on close of its container decor. */ Loading Loading
libs/WindowManager/Shell/res/values/colors.xml +2 −0 Original line number Diff line number Diff line Loading @@ -67,4 +67,6 @@ <color name="desktop_mode_caption_menu_text_color">#191C1D</color> <color name="desktop_mode_caption_menu_buttons_color_inactive">#191C1D</color> <color name="desktop_mode_caption_menu_buttons_color_active">#00677E</color> <color name="desktop_mode_resize_veil_light">#EFF1F2</color> <color name="desktop_mode_resize_veil_dark">#1C1C17</color> </resources>
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/ResizeVeil.java +17 −0 Original line number Diff line number Diff line Loading @@ -19,8 +19,10 @@ package com.android.wm.shell.windowdecor; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.ValueAnimator; import android.annotation.ColorRes; import android.app.ActivityManager.RunningTaskInfo; import android.content.Context; import android.content.res.Configuration; import android.graphics.PixelFormat; import android.graphics.Rect; import android.graphics.drawable.Drawable; Loading Loading @@ -109,6 +111,10 @@ public class ResizeVeil { t.reparent(mVeilSurface, parentSurface); mParentSurface = parentSurface; } int backgroundColorId = getBackgroundColorId(); mViewHost.getView().setBackgroundColor(mContext.getColor(backgroundColorId)); t.show(mVeilSurface) .apply(); final ValueAnimator animator = new ValueAnimator(); Loading Loading @@ -158,6 +164,17 @@ public class ResizeVeil { animator.start(); } @ColorRes private int getBackgroundColorId() { Configuration configuration = mContext.getResources().getConfiguration(); if ((configuration.uiMode & Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES) { return R.color.desktop_mode_resize_veil_dark; } else { return R.color.desktop_mode_resize_veil_light; } } /** * Dispose of veil when it is no longer needed, likely on close of its container decor. */ Loading