Loading quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java +1 −2 Original line number Original line Diff line number Diff line Loading @@ -16,7 +16,6 @@ package com.android.launcher3.uioverrides.touchcontrollers; package com.android.launcher3.uioverrides.touchcontrollers; import static android.view.MotionEvent.ACTION_DOWN; import static android.view.MotionEvent.ACTION_DOWN; import static android.view.MotionEvent.ACTION_MOVE; import static com.android.app.animation.Interpolators.ACCELERATE_0_75; import static com.android.app.animation.Interpolators.ACCELERATE_0_75; import static com.android.app.animation.Interpolators.DECELERATE_3; import static com.android.app.animation.Interpolators.DECELERATE_3; Loading Loading @@ -262,7 +261,7 @@ public class NoButtonQuickSwitchTouchController implements TouchController, xAnim.setFloat(mRecentsView, ADJACENT_PAGE_HORIZONTAL_OFFSET, scaleAndOffset[1], LINEAR); xAnim.setFloat(mRecentsView, ADJACENT_PAGE_HORIZONTAL_OFFSET, scaleAndOffset[1], LINEAR); // Use QuickSwitchState instead of OverviewState to determine scrim color, // Use QuickSwitchState instead of OverviewState to determine scrim color, // since we need to take potential taskbar into account. // since we need to take potential taskbar into account. xAnim.setViewBackgroundColor(mLauncher.getScrimView(), xAnim.setScrimViewBackgroundColor(mLauncher.getScrimView(), QUICK_SWITCH_FROM_HOME.getWorkspaceScrimColor(mLauncher), LINEAR); QUICK_SWITCH_FROM_HOME.getWorkspaceScrimColor(mLauncher), LINEAR); if (mRecentsView.getTaskViewCount() == 0) { if (mRecentsView.getTaskViewCount() == 0) { xAnim.addFloat(mRecentsView, CONTENT_ALPHA, 0f, 1f, LINEAR); xAnim.addFloat(mRecentsView, CONTENT_ALPHA, 0f, 1f, LINEAR); Loading quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -114,7 +114,7 @@ public class FallbackRecentsStateController implements StateHandler<RecentsState setter.setFloat(mRecentsView, TASK_THUMBNAIL_SPLASH_ALPHA, setter.setFloat(mRecentsView, TASK_THUMBNAIL_SPLASH_ALPHA, state.showTaskThumbnailSplash() ? 1f : 0f, INSTANT); state.showTaskThumbnailSplash() ? 1f : 0f, INSTANT); setter.setViewBackgroundColor(mActivity.getScrimView(), state.getScrimColor(mActivity), setter.setScrimViewBackgroundColor(mActivity.getScrimView(), state.getScrimColor(mActivity), config.getInterpolator(ANIM_SCRIM_FADE, LINEAR)); config.getInterpolator(ANIM_SCRIM_FADE, LINEAR)); RecentsState currentState = mActivity.getStateManager().getState(); RecentsState currentState = mActivity.getStateManager().getState(); Loading src/com/android/launcher3/LauncherAnimUtils.java +5 −0 Original line number Original line Diff line number Diff line Loading @@ -30,6 +30,7 @@ import android.widget.ImageView; import android.widget.TextView; import android.widget.TextView; import com.android.launcher3.util.MultiScalePropertyFactory; import com.android.launcher3.util.MultiScalePropertyFactory; import com.android.launcher3.views.ScrimView; public class LauncherAnimUtils { public class LauncherAnimUtils { /** /** Loading Loading @@ -194,6 +195,10 @@ public class LauncherAnimUtils { @Override @Override public Integer get(View view) { public Integer get(View view) { if (view instanceof ScrimView) { return ((ScrimView) view).getBackgroundColor(); } if (!(view.getBackground() instanceof ColorDrawable)) { if (!(view.getBackground() instanceof ColorDrawable)) { return Color.TRANSPARENT; return Color.TRANSPARENT; } } Loading src/com/android/launcher3/WorkspaceStateTransitionAnimation.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -199,7 +199,7 @@ public class WorkspaceStateTransitionAnimation { propertySetter.setFloat(sysUiScrim.getSysUIProgress(), AnimatedFloat.VALUE, propertySetter.setFloat(sysUiScrim.getSysUIProgress(), AnimatedFloat.VALUE, state.hasFlag(FLAG_HAS_SYS_UI_SCRIM) ? 1 : 0, LINEAR); state.hasFlag(FLAG_HAS_SYS_UI_SCRIM) ? 1 : 0, LINEAR); propertySetter.setViewBackgroundColor(mLauncher.getScrimView(), propertySetter.setScrimViewBackgroundColor(mLauncher.getScrimView(), state.getWorkspaceScrimColor(mLauncher), state.getWorkspaceScrimColor(mLauncher), config.getInterpolator(ANIM_SCRIM_FADE, ACCELERATE_2)); config.getInterpolator(ANIM_SCRIM_FADE, ACCELERATE_2)); } } Loading src/com/android/launcher3/anim/AnimatedPropertySetter.java +5 −4 Original line number Original line Diff line number Diff line Loading @@ -24,13 +24,14 @@ import android.animation.AnimatorSet; import android.animation.ObjectAnimator; import android.animation.ObjectAnimator; import android.animation.TimeInterpolator; import android.animation.TimeInterpolator; import android.animation.ValueAnimator; import android.animation.ValueAnimator; import android.graphics.drawable.ColorDrawable; import android.util.FloatProperty; import android.util.FloatProperty; import android.util.IntProperty; import android.util.IntProperty; import android.view.View; import android.view.View; import androidx.annotation.NonNull; import androidx.annotation.NonNull; import com.android.launcher3.views.ScrimView; import java.util.function.Consumer; import java.util.function.Consumer; /** /** Loading Loading @@ -62,9 +63,9 @@ public class AnimatedPropertySetter extends PropertySetter { } } @Override @Override public Animator setViewBackgroundColor(View view, int color, TimeInterpolator interpolator) { public Animator setScrimViewBackgroundColor(ScrimView view, int color, if (view == null || (view.getBackground() instanceof ColorDrawable TimeInterpolator interpolator) { && ((ColorDrawable) view.getBackground()).getColor() == color)) { if (view == null || view.getBackgroundColor() == color) { return NO_OP; return NO_OP; } } ObjectAnimator anim = ObjectAnimator.ofArgb(view, VIEW_BACKGROUND_COLOR, color); ObjectAnimator anim = ObjectAnimator.ofArgb(view, VIEW_BACKGROUND_COLOR, color); Loading Loading
quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java +1 −2 Original line number Original line Diff line number Diff line Loading @@ -16,7 +16,6 @@ package com.android.launcher3.uioverrides.touchcontrollers; package com.android.launcher3.uioverrides.touchcontrollers; import static android.view.MotionEvent.ACTION_DOWN; import static android.view.MotionEvent.ACTION_DOWN; import static android.view.MotionEvent.ACTION_MOVE; import static com.android.app.animation.Interpolators.ACCELERATE_0_75; import static com.android.app.animation.Interpolators.ACCELERATE_0_75; import static com.android.app.animation.Interpolators.DECELERATE_3; import static com.android.app.animation.Interpolators.DECELERATE_3; Loading Loading @@ -262,7 +261,7 @@ public class NoButtonQuickSwitchTouchController implements TouchController, xAnim.setFloat(mRecentsView, ADJACENT_PAGE_HORIZONTAL_OFFSET, scaleAndOffset[1], LINEAR); xAnim.setFloat(mRecentsView, ADJACENT_PAGE_HORIZONTAL_OFFSET, scaleAndOffset[1], LINEAR); // Use QuickSwitchState instead of OverviewState to determine scrim color, // Use QuickSwitchState instead of OverviewState to determine scrim color, // since we need to take potential taskbar into account. // since we need to take potential taskbar into account. xAnim.setViewBackgroundColor(mLauncher.getScrimView(), xAnim.setScrimViewBackgroundColor(mLauncher.getScrimView(), QUICK_SWITCH_FROM_HOME.getWorkspaceScrimColor(mLauncher), LINEAR); QUICK_SWITCH_FROM_HOME.getWorkspaceScrimColor(mLauncher), LINEAR); if (mRecentsView.getTaskViewCount() == 0) { if (mRecentsView.getTaskViewCount() == 0) { xAnim.addFloat(mRecentsView, CONTENT_ALPHA, 0f, 1f, LINEAR); xAnim.addFloat(mRecentsView, CONTENT_ALPHA, 0f, 1f, LINEAR); Loading
quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -114,7 +114,7 @@ public class FallbackRecentsStateController implements StateHandler<RecentsState setter.setFloat(mRecentsView, TASK_THUMBNAIL_SPLASH_ALPHA, setter.setFloat(mRecentsView, TASK_THUMBNAIL_SPLASH_ALPHA, state.showTaskThumbnailSplash() ? 1f : 0f, INSTANT); state.showTaskThumbnailSplash() ? 1f : 0f, INSTANT); setter.setViewBackgroundColor(mActivity.getScrimView(), state.getScrimColor(mActivity), setter.setScrimViewBackgroundColor(mActivity.getScrimView(), state.getScrimColor(mActivity), config.getInterpolator(ANIM_SCRIM_FADE, LINEAR)); config.getInterpolator(ANIM_SCRIM_FADE, LINEAR)); RecentsState currentState = mActivity.getStateManager().getState(); RecentsState currentState = mActivity.getStateManager().getState(); Loading
src/com/android/launcher3/LauncherAnimUtils.java +5 −0 Original line number Original line Diff line number Diff line Loading @@ -30,6 +30,7 @@ import android.widget.ImageView; import android.widget.TextView; import android.widget.TextView; import com.android.launcher3.util.MultiScalePropertyFactory; import com.android.launcher3.util.MultiScalePropertyFactory; import com.android.launcher3.views.ScrimView; public class LauncherAnimUtils { public class LauncherAnimUtils { /** /** Loading Loading @@ -194,6 +195,10 @@ public class LauncherAnimUtils { @Override @Override public Integer get(View view) { public Integer get(View view) { if (view instanceof ScrimView) { return ((ScrimView) view).getBackgroundColor(); } if (!(view.getBackground() instanceof ColorDrawable)) { if (!(view.getBackground() instanceof ColorDrawable)) { return Color.TRANSPARENT; return Color.TRANSPARENT; } } Loading
src/com/android/launcher3/WorkspaceStateTransitionAnimation.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -199,7 +199,7 @@ public class WorkspaceStateTransitionAnimation { propertySetter.setFloat(sysUiScrim.getSysUIProgress(), AnimatedFloat.VALUE, propertySetter.setFloat(sysUiScrim.getSysUIProgress(), AnimatedFloat.VALUE, state.hasFlag(FLAG_HAS_SYS_UI_SCRIM) ? 1 : 0, LINEAR); state.hasFlag(FLAG_HAS_SYS_UI_SCRIM) ? 1 : 0, LINEAR); propertySetter.setViewBackgroundColor(mLauncher.getScrimView(), propertySetter.setScrimViewBackgroundColor(mLauncher.getScrimView(), state.getWorkspaceScrimColor(mLauncher), state.getWorkspaceScrimColor(mLauncher), config.getInterpolator(ANIM_SCRIM_FADE, ACCELERATE_2)); config.getInterpolator(ANIM_SCRIM_FADE, ACCELERATE_2)); } } Loading
src/com/android/launcher3/anim/AnimatedPropertySetter.java +5 −4 Original line number Original line Diff line number Diff line Loading @@ -24,13 +24,14 @@ import android.animation.AnimatorSet; import android.animation.ObjectAnimator; import android.animation.ObjectAnimator; import android.animation.TimeInterpolator; import android.animation.TimeInterpolator; import android.animation.ValueAnimator; import android.animation.ValueAnimator; import android.graphics.drawable.ColorDrawable; import android.util.FloatProperty; import android.util.FloatProperty; import android.util.IntProperty; import android.util.IntProperty; import android.view.View; import android.view.View; import androidx.annotation.NonNull; import androidx.annotation.NonNull; import com.android.launcher3.views.ScrimView; import java.util.function.Consumer; import java.util.function.Consumer; /** /** Loading Loading @@ -62,9 +63,9 @@ public class AnimatedPropertySetter extends PropertySetter { } } @Override @Override public Animator setViewBackgroundColor(View view, int color, TimeInterpolator interpolator) { public Animator setScrimViewBackgroundColor(ScrimView view, int color, if (view == null || (view.getBackground() instanceof ColorDrawable TimeInterpolator interpolator) { && ((ColorDrawable) view.getBackground()).getColor() == color)) { if (view == null || view.getBackgroundColor() == color) { return NO_OP; return NO_OP; } } ObjectAnimator anim = ObjectAnimator.ofArgb(view, VIEW_BACKGROUND_COLOR, color); ObjectAnimator anim = ObjectAnimator.ofArgb(view, VIEW_BACKGROUND_COLOR, color); Loading