Loading packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java +8 −3 Original line number Diff line number Diff line Loading @@ -91,6 +91,7 @@ public class RecentsView extends FrameLayout { private static final int DEFAULT_UPDATE_SCRIM_DURATION = 200; private static final float DEFAULT_SCRIM_ALPHA = 0.33f; private static final float GRID_LAYOUT_SCRIM_ALPHA = 0.45f; private static final int SHOW_STACK_ACTION_BUTTON_DURATION = 134; private static final int HIDE_STACK_ACTION_BUTTON_DURATION = 100; Loading @@ -106,8 +107,8 @@ public class RecentsView extends FrameLayout { Rect mSystemInsets = new Rect(); private int mDividerSize; private Drawable mBackgroundScrim = new ColorDrawable( Color.argb((int) (DEFAULT_SCRIM_ALPHA * 255), 0, 0, 0)).mutate(); private final float mScrimAlpha; private final Drawable mBackgroundScrim; private Animator mBackgroundScrimAnimator; private RecentsTransitionHelper mTransitionHelper; Loading Loading @@ -136,6 +137,10 @@ public class RecentsView extends FrameLayout { mDividerSize = ssp.getDockedDividerSize(context); mTouchHandler = new RecentsViewTouchHandler(this); mFlingAnimationUtils = new FlingAnimationUtils(context, 0.3f); mScrimAlpha = Recents.getConfiguration().isGridEnabled ? GRID_LAYOUT_SCRIM_ALPHA : DEFAULT_SCRIM_ALPHA; mBackgroundScrim = new ColorDrawable( Color.argb((int) (mScrimAlpha * 255), 0, 0, 0)).mutate(); LayoutInflater inflater = LayoutInflater.from(context); if (RecentsDebugFlags.Static.EnableStackActionButton) { Loading Loading @@ -758,7 +763,7 @@ public class RecentsView extends FrameLayout { private void animateBackgroundScrim(float alpha, int duration) { Utilities.cancelAnimationWithoutCallbacks(mBackgroundScrimAnimator); // Calculate the absolute alpha to animate from int fromAlpha = (int) ((mBackgroundScrim.getAlpha() / (DEFAULT_SCRIM_ALPHA * 255)) * 255); int fromAlpha = (int) ((mBackgroundScrim.getAlpha() / (mScrimAlpha * 255)) * 255); int toAlpha = (int) (alpha * 255); mBackgroundScrimAnimator = ObjectAnimator.ofInt(mBackgroundScrim, Utilities.DRAWABLE_ALPHA, fromAlpha, toAlpha); Loading Loading
packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java +8 −3 Original line number Diff line number Diff line Loading @@ -91,6 +91,7 @@ public class RecentsView extends FrameLayout { private static final int DEFAULT_UPDATE_SCRIM_DURATION = 200; private static final float DEFAULT_SCRIM_ALPHA = 0.33f; private static final float GRID_LAYOUT_SCRIM_ALPHA = 0.45f; private static final int SHOW_STACK_ACTION_BUTTON_DURATION = 134; private static final int HIDE_STACK_ACTION_BUTTON_DURATION = 100; Loading @@ -106,8 +107,8 @@ public class RecentsView extends FrameLayout { Rect mSystemInsets = new Rect(); private int mDividerSize; private Drawable mBackgroundScrim = new ColorDrawable( Color.argb((int) (DEFAULT_SCRIM_ALPHA * 255), 0, 0, 0)).mutate(); private final float mScrimAlpha; private final Drawable mBackgroundScrim; private Animator mBackgroundScrimAnimator; private RecentsTransitionHelper mTransitionHelper; Loading Loading @@ -136,6 +137,10 @@ public class RecentsView extends FrameLayout { mDividerSize = ssp.getDockedDividerSize(context); mTouchHandler = new RecentsViewTouchHandler(this); mFlingAnimationUtils = new FlingAnimationUtils(context, 0.3f); mScrimAlpha = Recents.getConfiguration().isGridEnabled ? GRID_LAYOUT_SCRIM_ALPHA : DEFAULT_SCRIM_ALPHA; mBackgroundScrim = new ColorDrawable( Color.argb((int) (mScrimAlpha * 255), 0, 0, 0)).mutate(); LayoutInflater inflater = LayoutInflater.from(context); if (RecentsDebugFlags.Static.EnableStackActionButton) { Loading Loading @@ -758,7 +763,7 @@ public class RecentsView extends FrameLayout { private void animateBackgroundScrim(float alpha, int duration) { Utilities.cancelAnimationWithoutCallbacks(mBackgroundScrimAnimator); // Calculate the absolute alpha to animate from int fromAlpha = (int) ((mBackgroundScrim.getAlpha() / (DEFAULT_SCRIM_ALPHA * 255)) * 255); int fromAlpha = (int) ((mBackgroundScrim.getAlpha() / (mScrimAlpha * 255)) * 255); int toAlpha = (int) (alpha * 255); mBackgroundScrimAnimator = ObjectAnimator.ofInt(mBackgroundScrim, Utilities.DRAWABLE_ALPHA, fromAlpha, toAlpha); Loading