Loading packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java +11 −4 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import static android.view.View.MeasureSpec; import android.app.ActivityManager; import android.app.ActivityManager.TaskSnapshot; import android.app.ActivityOptions; import android.app.ActivityOptions.OnAnimationFinishedListener; import android.app.ActivityOptions.OnAnimationStartedListener; import android.content.ActivityNotFoundException; import android.content.Context; Loading Loading @@ -663,7 +664,7 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener mWaitingForTransitionStart = waitingForTransitionStart; if (!waitingForTransitionStart && mToggleFollowingTransitionStart) { toggleRecents(DividerView.INVALID_RECENTS_GROW_TARGET); mHandler.post(() -> toggleRecents(DividerView.INVALID_RECENTS_GROW_TARGET)); } mToggleFollowingTransitionStart = false; } Loading Loading @@ -866,6 +867,7 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener private Pair<ActivityOptions, AppTransitionAnimationSpecsFuture> getThumbnailTransitionActivityOptions(ActivityManager.RunningTaskInfo runningTask, Rect windowOverrideRect) { final boolean isLowRamDevice = Recents.getConfiguration().isLowRamDevice; if (runningTask != null && runningTask.stackId == FREEFORM_WORKSPACE_STACK_ID) { ArrayList<AppTransitionAnimationSpec> specs = new ArrayList<>(); ArrayList<Task> tasks; Loading Loading @@ -896,8 +898,11 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener AppTransitionAnimationSpec[] specsArray = new AppTransitionAnimationSpec[specs.size()]; specs.toArray(specsArray); // For low end ram devices, wait for transition flag is reset when Recents entrance // animation is complete instead of when the transition animation starts return new Pair<>(ActivityOptions.makeThumbnailAspectScaleDownAnimation(mDummyStackView, specsArray, mHandler, mResetToggleFlagListener, this), null); specsArray, mHandler, isLowRamDevice ? null : mResetToggleFlagListener, this), null); } else { // Update the destination rect Task toTask = new Task(); Loading @@ -916,9 +921,11 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener toTask.key.id, thumbnail, rect)); }); // For low end ram devices, wait for transition flag is reset when Recents entrance // animation is complete instead of when the transition animation starts return new Pair<>(ActivityOptions.makeMultiThumbFutureAspectScaleAnimation(mContext, mHandler, future.getFuture(), mResetToggleFlagListener, false /* scaleUp */), future); mHandler, future.getFuture(), isLowRamDevice ? null : mResetToggleFlagListener, false /* scaleUp */), future); } } Loading packages/SystemUI/src/com/android/systemui/recents/views/RecentsTransitionHelper.java +8 −4 Original line number Diff line number Diff line Loading @@ -140,9 +140,11 @@ public class RecentsTransitionHelper { mHandler.postDelayed(mStartScreenPinningRunnable, 350); } if (!Recents.getConfiguration().isLowRamDevice) { // Reset the state where we are waiting for the transition to start EventBus.getDefault().send(new SetWaitingForTransitionStartEvent(false)); } } }; } else { // This is only the case if the task is not on screen (scrolled offscreen for example) Loading @@ -163,9 +165,11 @@ public class RecentsTransitionHelper { EventBus.getDefault().send(new ExitRecentsWindowFirstAnimationFrameEvent()); stackView.cancelAllTaskViewAnimations(); if (!Recents.getConfiguration().isLowRamDevice) { // Reset the state where we are waiting for the transition to start EventBus.getDefault().send(new SetWaitingForTransitionStartEvent(false)); } } }; } Loading packages/SystemUI/src/com/android/systemui/recents/views/TaskStackAnimationHelper.java +11 −1 Original line number Diff line number Diff line Loading @@ -34,6 +34,8 @@ import com.android.systemui.recents.Recents; import com.android.systemui.recents.RecentsActivityLaunchState; import com.android.systemui.recents.RecentsConfiguration; import com.android.systemui.recents.RecentsDebugFlags; import com.android.systemui.recents.events.EventBus; import com.android.systemui.recents.events.component.SetWaitingForTransitionStartEvent; import com.android.systemui.recents.misc.ReferenceCountedTrigger; import com.android.systemui.recents.model.Task; import com.android.systemui.recents.model.TaskStack; Loading Loading @@ -241,6 +243,7 @@ public class TaskStackAnimationHelper { return; } final boolean isLowRamDevice = Recents.getConfiguration().isLowRamDevice; int taskViewEnterFromAppDuration = res.getInteger( R.integer.recents_task_enter_from_app_duration); int taskViewEnterFromAffiliatedAppDuration = res.getInteger( Loading @@ -248,6 +251,13 @@ public class TaskStackAnimationHelper { int dockGestureAnimDuration = appRes.getInteger( R.integer.long_press_dock_anim_duration); // Since low ram devices have an animation when entering app -> recents, do not allow // toggle until the animation is complete if (launchState.launchedFromApp && !launchState.launchedViaDockGesture && isLowRamDevice) { postAnimationTrigger.addLastDecrementRunnable(() -> EventBus.getDefault() .send(new SetWaitingForTransitionStartEvent(false))); } // Create enter animations for each of the views from front to back List<TaskView> taskViews = mStackView.getTaskViews(); int taskViewCount = taskViews.size(); Loading Loading @@ -296,7 +306,7 @@ public class TaskStackAnimationHelper { AnimationProps taskAnimation = new AnimationProps() .setInterpolator(AnimationProps.ALPHA, ENTER_FROM_HOME_ALPHA_INTERPOLATOR) .setListener(postAnimationTrigger.decrementOnAnimationEnd()); if (Recents.getConfiguration().isLowRamDevice) { if (isLowRamDevice) { taskAnimation.setInterpolator(AnimationProps.BOUNDS, Interpolators.FAST_OUT_SLOW_IN) .setDuration(AnimationProps.BOUNDS, 150) Loading Loading
packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java +11 −4 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import static android.view.View.MeasureSpec; import android.app.ActivityManager; import android.app.ActivityManager.TaskSnapshot; import android.app.ActivityOptions; import android.app.ActivityOptions.OnAnimationFinishedListener; import android.app.ActivityOptions.OnAnimationStartedListener; import android.content.ActivityNotFoundException; import android.content.Context; Loading Loading @@ -663,7 +664,7 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener mWaitingForTransitionStart = waitingForTransitionStart; if (!waitingForTransitionStart && mToggleFollowingTransitionStart) { toggleRecents(DividerView.INVALID_RECENTS_GROW_TARGET); mHandler.post(() -> toggleRecents(DividerView.INVALID_RECENTS_GROW_TARGET)); } mToggleFollowingTransitionStart = false; } Loading Loading @@ -866,6 +867,7 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener private Pair<ActivityOptions, AppTransitionAnimationSpecsFuture> getThumbnailTransitionActivityOptions(ActivityManager.RunningTaskInfo runningTask, Rect windowOverrideRect) { final boolean isLowRamDevice = Recents.getConfiguration().isLowRamDevice; if (runningTask != null && runningTask.stackId == FREEFORM_WORKSPACE_STACK_ID) { ArrayList<AppTransitionAnimationSpec> specs = new ArrayList<>(); ArrayList<Task> tasks; Loading Loading @@ -896,8 +898,11 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener AppTransitionAnimationSpec[] specsArray = new AppTransitionAnimationSpec[specs.size()]; specs.toArray(specsArray); // For low end ram devices, wait for transition flag is reset when Recents entrance // animation is complete instead of when the transition animation starts return new Pair<>(ActivityOptions.makeThumbnailAspectScaleDownAnimation(mDummyStackView, specsArray, mHandler, mResetToggleFlagListener, this), null); specsArray, mHandler, isLowRamDevice ? null : mResetToggleFlagListener, this), null); } else { // Update the destination rect Task toTask = new Task(); Loading @@ -916,9 +921,11 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener toTask.key.id, thumbnail, rect)); }); // For low end ram devices, wait for transition flag is reset when Recents entrance // animation is complete instead of when the transition animation starts return new Pair<>(ActivityOptions.makeMultiThumbFutureAspectScaleAnimation(mContext, mHandler, future.getFuture(), mResetToggleFlagListener, false /* scaleUp */), future); mHandler, future.getFuture(), isLowRamDevice ? null : mResetToggleFlagListener, false /* scaleUp */), future); } } Loading
packages/SystemUI/src/com/android/systemui/recents/views/RecentsTransitionHelper.java +8 −4 Original line number Diff line number Diff line Loading @@ -140,9 +140,11 @@ public class RecentsTransitionHelper { mHandler.postDelayed(mStartScreenPinningRunnable, 350); } if (!Recents.getConfiguration().isLowRamDevice) { // Reset the state where we are waiting for the transition to start EventBus.getDefault().send(new SetWaitingForTransitionStartEvent(false)); } } }; } else { // This is only the case if the task is not on screen (scrolled offscreen for example) Loading @@ -163,9 +165,11 @@ public class RecentsTransitionHelper { EventBus.getDefault().send(new ExitRecentsWindowFirstAnimationFrameEvent()); stackView.cancelAllTaskViewAnimations(); if (!Recents.getConfiguration().isLowRamDevice) { // Reset the state where we are waiting for the transition to start EventBus.getDefault().send(new SetWaitingForTransitionStartEvent(false)); } } }; } Loading
packages/SystemUI/src/com/android/systemui/recents/views/TaskStackAnimationHelper.java +11 −1 Original line number Diff line number Diff line Loading @@ -34,6 +34,8 @@ import com.android.systemui.recents.Recents; import com.android.systemui.recents.RecentsActivityLaunchState; import com.android.systemui.recents.RecentsConfiguration; import com.android.systemui.recents.RecentsDebugFlags; import com.android.systemui.recents.events.EventBus; import com.android.systemui.recents.events.component.SetWaitingForTransitionStartEvent; import com.android.systemui.recents.misc.ReferenceCountedTrigger; import com.android.systemui.recents.model.Task; import com.android.systemui.recents.model.TaskStack; Loading Loading @@ -241,6 +243,7 @@ public class TaskStackAnimationHelper { return; } final boolean isLowRamDevice = Recents.getConfiguration().isLowRamDevice; int taskViewEnterFromAppDuration = res.getInteger( R.integer.recents_task_enter_from_app_duration); int taskViewEnterFromAffiliatedAppDuration = res.getInteger( Loading @@ -248,6 +251,13 @@ public class TaskStackAnimationHelper { int dockGestureAnimDuration = appRes.getInteger( R.integer.long_press_dock_anim_duration); // Since low ram devices have an animation when entering app -> recents, do not allow // toggle until the animation is complete if (launchState.launchedFromApp && !launchState.launchedViaDockGesture && isLowRamDevice) { postAnimationTrigger.addLastDecrementRunnable(() -> EventBus.getDefault() .send(new SetWaitingForTransitionStartEvent(false))); } // Create enter animations for each of the views from front to back List<TaskView> taskViews = mStackView.getTaskViews(); int taskViewCount = taskViews.size(); Loading Loading @@ -296,7 +306,7 @@ public class TaskStackAnimationHelper { AnimationProps taskAnimation = new AnimationProps() .setInterpolator(AnimationProps.ALPHA, ENTER_FROM_HOME_ALPHA_INTERPOLATOR) .setListener(postAnimationTrigger.decrementOnAnimationEnd()); if (Recents.getConfiguration().isLowRamDevice) { if (isLowRamDevice) { taskAnimation.setInterpolator(AnimationProps.BOUNDS, Interpolators.FAST_OUT_SLOW_IN) .setDuration(AnimationProps.BOUNDS, 150) Loading