From 7bccd43fa9559ae2f2e94038392ead93e44854b5 Mon Sep 17 00:00:00 2001 From: Yoshinori Hirano Date: Mon, 21 Nov 2016 15:42:20 +0900 Subject: [PATCH] Don't include front most excluded task in Multi-Window mode A front most excluded task is shown on Overview when changing font size in Multi-Window mode. To fix this issue, RecentActivity should not reset the config launch flags when it is restarted by configuration changes and it should not reload the tasks which include a front most excluded task when it is launched while docking a task. Bug: 33031985 Test: manual - display app task excluded from Overview screen and then change font size in Multi-Window mode Change-Id: Ic0c35cd06c14d9ed8d2dc46a01f2153738bad849 --- .../systemui/recents/RecentsActivity.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java index 0f356e00e5723..72434e744e2b4 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java +++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java @@ -369,7 +369,7 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD RecentsActivityLaunchState launchState = config.getLaunchState(); if (!loadPlan.hasTasks()) { loader.preloadTasks(loadPlan, launchState.launchedToTaskId, - !launchState.launchedFromHome); + !launchState.launchedFromHome && !launchState.launchedViaDockGesture); } RecentsTaskLoadPlan.Options loadOpts = new RecentsTaskLoadPlan.Options(); @@ -496,12 +496,14 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD EventBus.getDefault().send(new RecentsVisibilityChangedEvent(this, false)); MetricsLogger.hidden(this, MetricsEvent.OVERVIEW_ACTIVITY); - // Workaround for b/22542869, if the RecentsActivity is started again, but without going - // through SystemUI, we need to reset the config launch flags to ensure that we do not - // wait on the system to send a signal that was never queued. - RecentsConfiguration config = Recents.getConfiguration(); - RecentsActivityLaunchState launchState = config.getLaunchState(); - launchState.reset(); + if (!isChangingConfigurations()) { + // Workaround for b/22542869, if the RecentsActivity is started again, but without going + // through SystemUI, we need to reset the config launch flags to ensure that we do not + // wait on the system to send a signal that was never queued. + RecentsConfiguration config = Recents.getConfiguration(); + RecentsActivityLaunchState launchState = config.getLaunchState(); + launchState.reset(); + } } @Override