From 3ca1028e74499e9beec33c144ccdd87df7df1171 Mon Sep 17 00:00:00 2001 From: Winson Date: Thu, 21 Apr 2016 15:20:21 -0700 Subject: [PATCH] Closing system windows when dismissing recents to app or home. Bug: 28314924 Change-Id: I35f484c7c594bb39d7983965e0f706175cf92253 --- .../com/android/systemui/recents/RecentsActivity.java | 9 ++------- .../systemui/recents/views/RecentsTransitionHelper.java | 4 +++- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java index e082f20ddf973..6876f31ce79cb 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java +++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java @@ -223,13 +223,8 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD new DismissRecentsToHomeAnimationStarted(animateTaskViews); dismissEvent.addPostAnimationCallback(new LaunchHomeRunnable(mHomeIntent, overrideAnimation)); - dismissEvent.addPostAnimationCallback(new Runnable() { - @Override - public void run() { - Recents.getSystemServices().sendCloseSystemWindows( - BaseStatusBar.SYSTEM_DIALOG_REASON_HOME_KEY); - } - }); + Recents.getSystemServices().sendCloseSystemWindows( + BaseStatusBar.SYSTEM_DIALOG_REASON_HOME_KEY); EventBus.getDefault().send(dismissEvent); } diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/RecentsTransitionHelper.java b/packages/SystemUI/src/com/android/systemui/recents/views/RecentsTransitionHelper.java index cf35a96b38f77..e3c3af0abbd5d 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/views/RecentsTransitionHelper.java +++ b/packages/SystemUI/src/com/android/systemui/recents/views/RecentsTransitionHelper.java @@ -51,6 +51,7 @@ import com.android.systemui.recents.events.component.ScreenPinningRequestEvent; import com.android.systemui.recents.misc.SystemServicesProxy; import com.android.systemui.recents.model.Task; import com.android.systemui.recents.model.TaskStack; +import com.android.systemui.statusbar.BaseStatusBar; import java.util.ArrayList; import java.util.Collections; @@ -167,6 +168,8 @@ public class RecentsTransitionHelper { animStartedListener); } } + Recents.getSystemServices().sendCloseSystemWindows( + BaseStatusBar.SYSTEM_DIALOG_REASON_HOME_KEY); } public IRemoteCallback wrapStartedListener(final OnAnimationStartedListener listener) { @@ -284,7 +287,6 @@ public class RecentsTransitionHelper { } // Calculate the offscreen task rect (for tasks that are not backed by views) - float stackScroll = stackView.getScroller().getStackScroll(); TaskView taskView = stackView.getChildViewForTask(task); TaskStackLayoutAlgorithm stackLayout = stackView.getStackAlgorithm(); Rect offscreenTaskRect = new Rect();