Fix wrong transition when dock minimized and docked app launched
When having an app docked and then going home, and then launching
the app from the homescreen, we had a wrong transition because
getTopMost task was already set to the launched app, because
getRunningTasks doesn't exclude the docked stack. Instead of adding
flags for getRunningTasks, which sounds risky, we just pass a "force"
value when we launch recents in this state.
Bug: 27154882
Change-Id: Iee4512fed13115dbbe8b74413ff1fa9b87afa0ef
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
index cc8e3bd..f7d13ee 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
@@ -103,7 +103,7 @@
void topAppWindowChanged(boolean visible);
void setImeWindowStatus(IBinder token, int vis, int backDisposition,
boolean showImeSwitcher);
- void showRecentApps(boolean triggeredFromAltTab);
+ void showRecentApps(boolean triggeredFromAltTab, boolean fromHome);
void hideRecentApps(boolean triggeredFromAltTab, boolean triggeredFromHomeKey);
void toggleRecentApps();
void toggleSplitScreen();
@@ -210,11 +210,11 @@
}
}
- public void showRecentApps(boolean triggeredFromAltTab) {
+ public void showRecentApps(boolean triggeredFromAltTab, boolean fromHome) {
synchronized (mLock) {
mHandler.removeMessages(MSG_SHOW_RECENT_APPS);
mHandler.obtainMessage(MSG_SHOW_RECENT_APPS,
- triggeredFromAltTab ? 1 : 0, 0, null).sendToTarget();
+ triggeredFromAltTab ? 1 : 0, fromHome ? 1 : 0, null).sendToTarget();
}
}
@@ -421,7 +421,7 @@
msg.getData().getBoolean(SHOW_IME_SWITCHER_KEY, false));
break;
case MSG_SHOW_RECENT_APPS:
- mCallbacks.showRecentApps(msg.arg1 != 0);
+ mCallbacks.showRecentApps(msg.arg1 != 0, msg.arg2 != 0);
break;
case MSG_HIDE_RECENT_APPS:
mCallbacks.hideRecentApps(msg.arg1 != 0, msg.arg2 != 0);