From d351ada8f93415b09f7536c64e303d55c7b97680 Mon Sep 17 00:00:00 2001 From: Wale Ogunwale Date: Sat, 4 Apr 2015 11:53:14 -0700 Subject: Dismiss recents to home without animation when resizing task. Bug: 19946163 Change-Id: I87441e03556d775119f851f7ad49368fc1be49f7 --- .../src/com/android/systemui/recents/RecentsActivity.java | 6 ++++++ .../android/systemui/recents/RecentsResizeTaskDialog.java | 12 ++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'packages/SystemUI') diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java index f014f09..fc8f8a5 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java +++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java @@ -345,6 +345,12 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView } } + /** Dismisses Recents directly to Home without transition animation. */ + void dismissRecentsToHomeWithoutTransitionAnimation() { + finish(); + overridePendingTransition(0, 0); + } + /** Dismisses Recents directly to Home if we currently aren't transitioning. */ boolean dismissRecentsToHome(boolean animated) { SystemServicesProxy ssp = RecentsTaskLoader.getInstance().getSystemServicesProxy(); diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsResizeTaskDialog.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsResizeTaskDialog.java index 4cd577d..b701e0b 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/RecentsResizeTaskDialog.java +++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsResizeTaskDialog.java @@ -209,6 +209,10 @@ public class RecentsResizeTaskDialog extends DialogFragment { } } + // Get rid of the dialog. + dismiss(); + mRecentsActivity.dismissRecentsToHomeWithoutTransitionAnimation(); + // Resize all tasks beginning from the "oldest" one. for (int i = additionalTasks; i >= 0; --i) { if (mTasks[i] != null) { @@ -216,12 +220,8 @@ public class RecentsResizeTaskDialog extends DialogFragment { } } - // Get rid of the dialog. - dismiss(); - mRecentsActivity.dismissRecentsToHomeRaw(false); - - // Show tasks - beginning with the oldest so that the focus ends on the selected one. - // TODO: Remove this once issue b/19893373 is resolved. + // Show tasks as they might not be currently visible - beginning with the oldest so that + // the focus ends on the selected one. for (int i = additionalTasks; i >= 0; --i) { if (mTasks[i] != null) { mRecentsView.launchTask(mTasks[i]); -- cgit v1.1