Loading quickstep/src/com/android/quickstep/RecentsActivity.java +1 −2 Original line number Diff line number Diff line Loading @@ -350,8 +350,7 @@ public final class RecentsActivity extends StatefulActivity<RecentsState> { public void startHome() { if (LIVE_TILE.get()) { RecentsView recentsView = getOverviewPanel(); recentsView.switchToScreenshot(() -> recentsView.finishRecentsAnimation(true, this::startHomeInternal)); recentsView.switchToScreenshotAndFinishAnimationToRecents(this::startHomeInternal); } else { startHomeInternal(); } Loading quickstep/src/com/android/quickstep/views/RecentsView.java +22 −9 Original line number Diff line number Diff line Loading @@ -177,6 +177,10 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T TaskThumbnailCache.HighResLoadingState.HighResLoadingStateChangedCallback, TaskVisualsChangeListener, SplitScreenBounds.OnChangeListener { // TODO(b/184899234): We use this timeout to wait a fixed period after switching to the // screenshot when dismissing the current live task to ensure the app can try and get stopped. private static final int REMOVE_TASK_WAIT_FOR_APP_STOP_MS = 100; public static final FloatProperty<RecentsView> CONTENT_ALPHA = new FloatProperty<RecentsView>("contentAlpha") { @Override Loading Loading @@ -2355,8 +2359,12 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T if (success) { if (shouldRemoveTask) { if (taskView.getTask() != null) { UI_HELPER_EXECUTOR.execute(() -> ActivityManagerWrapper.getInstance() .removeTask(taskView.getTask().key.id)); switchToScreenshotAndFinishAnimationToRecents(() -> { UI_HELPER_EXECUTOR.getHandler().postDelayed(() -> ActivityManagerWrapper.getInstance().removeTask( taskView.getTask().key.id), REMOVE_TASK_WAIT_FOR_APP_STOP_MS); }); mActivity.getStatsLogManager().logger() .withItemInfo(taskView.getItemInfo()) .log(LAUNCHER_TASK_DISMISS_SWIPE_UP); Loading Loading @@ -2460,10 +2468,13 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T mPendingAnimation.addEndListener(isSuccess -> { if (isSuccess) { // Remove all the task views now UI_HELPER_EXECUTOR.execute( ActivityManagerWrapper.getInstance()::removeAllRecentTasks); switchToScreenshotAndFinishAnimationToRecents(() -> { UI_HELPER_EXECUTOR.getHandler().postDelayed( ActivityManagerWrapper.getInstance()::removeAllRecentTasks, REMOVE_TASK_WAIT_FOR_APP_STOP_MS); removeTasksViewsAndClearAllButton(); startHome(); }); } mPendingAnimation = null; }); Loading Loading @@ -2618,9 +2629,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T protected void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); if (LIVE_TILE.get() && mEnableDrawingLiveTile && newConfig.orientation != mOrientation) { switchToScreenshot( () -> finishRecentsAnimation(true /* toRecents */, this::updateRecentsRotation)); switchToScreenshotAndFinishAnimationToRecents(this::updateRecentsRotation); mEnableDrawingLiveTile = false; } else { updateRecentsRotation(); Loading Loading @@ -3613,6 +3622,10 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T } } public void switchToScreenshotAndFinishAnimationToRecents(Runnable onFinishRunnable) { switchToScreenshot(() -> finishRecentsAnimation(true /* toRecents */, onFinishRunnable)); } /** * Switch the current running task view to static snapshot mode, * capturing the snapshot at the same time. Loading Loading
quickstep/src/com/android/quickstep/RecentsActivity.java +1 −2 Original line number Diff line number Diff line Loading @@ -350,8 +350,7 @@ public final class RecentsActivity extends StatefulActivity<RecentsState> { public void startHome() { if (LIVE_TILE.get()) { RecentsView recentsView = getOverviewPanel(); recentsView.switchToScreenshot(() -> recentsView.finishRecentsAnimation(true, this::startHomeInternal)); recentsView.switchToScreenshotAndFinishAnimationToRecents(this::startHomeInternal); } else { startHomeInternal(); } Loading
quickstep/src/com/android/quickstep/views/RecentsView.java +22 −9 Original line number Diff line number Diff line Loading @@ -177,6 +177,10 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T TaskThumbnailCache.HighResLoadingState.HighResLoadingStateChangedCallback, TaskVisualsChangeListener, SplitScreenBounds.OnChangeListener { // TODO(b/184899234): We use this timeout to wait a fixed period after switching to the // screenshot when dismissing the current live task to ensure the app can try and get stopped. private static final int REMOVE_TASK_WAIT_FOR_APP_STOP_MS = 100; public static final FloatProperty<RecentsView> CONTENT_ALPHA = new FloatProperty<RecentsView>("contentAlpha") { @Override Loading Loading @@ -2355,8 +2359,12 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T if (success) { if (shouldRemoveTask) { if (taskView.getTask() != null) { UI_HELPER_EXECUTOR.execute(() -> ActivityManagerWrapper.getInstance() .removeTask(taskView.getTask().key.id)); switchToScreenshotAndFinishAnimationToRecents(() -> { UI_HELPER_EXECUTOR.getHandler().postDelayed(() -> ActivityManagerWrapper.getInstance().removeTask( taskView.getTask().key.id), REMOVE_TASK_WAIT_FOR_APP_STOP_MS); }); mActivity.getStatsLogManager().logger() .withItemInfo(taskView.getItemInfo()) .log(LAUNCHER_TASK_DISMISS_SWIPE_UP); Loading Loading @@ -2460,10 +2468,13 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T mPendingAnimation.addEndListener(isSuccess -> { if (isSuccess) { // Remove all the task views now UI_HELPER_EXECUTOR.execute( ActivityManagerWrapper.getInstance()::removeAllRecentTasks); switchToScreenshotAndFinishAnimationToRecents(() -> { UI_HELPER_EXECUTOR.getHandler().postDelayed( ActivityManagerWrapper.getInstance()::removeAllRecentTasks, REMOVE_TASK_WAIT_FOR_APP_STOP_MS); removeTasksViewsAndClearAllButton(); startHome(); }); } mPendingAnimation = null; }); Loading Loading @@ -2618,9 +2629,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T protected void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); if (LIVE_TILE.get() && mEnableDrawingLiveTile && newConfig.orientation != mOrientation) { switchToScreenshot( () -> finishRecentsAnimation(true /* toRecents */, this::updateRecentsRotation)); switchToScreenshotAndFinishAnimationToRecents(this::updateRecentsRotation); mEnableDrawingLiveTile = false; } else { updateRecentsRotation(); Loading Loading @@ -3613,6 +3622,10 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T } } public void switchToScreenshotAndFinishAnimationToRecents(Runnable onFinishRunnable) { switchToScreenshot(() -> finishRecentsAnimation(true /* toRecents */, onFinishRunnable)); } /** * Switch the current running task view to static snapshot mode, * capturing the snapshot at the same time. Loading