Loading packages/SystemUI/src/com/android/systemui/recents/IRecentsNonSystemUserCallbacks.aidl +2 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,8 @@ package com.android.systemui.recents; oneway interface IRecentsNonSystemUserCallbacks { void preloadRecents(); void cancelPreloadingRecents(); void showRecents(boolean triggeredFromAltTab, boolean draggingInRecents, boolean animate); void showRecents(boolean triggeredFromAltTab, boolean draggingInRecents, boolean animate, boolean reloadTasks); void hideRecents(boolean triggeredFromAltTab, boolean triggeredFromHomeKey); void toggleRecents(); void onConfigurationChanged(); Loading packages/SystemUI/src/com/android/systemui/recents/Recents.java +3 −2 Original line number Diff line number Diff line Loading @@ -215,7 +215,8 @@ public class Recents extends SystemUI int currentUser = sSystemServicesProxy.getCurrentUser(); if (sSystemServicesProxy.isSystemUser(currentUser)) { mImpl.showRecents(triggeredFromAltTab, false /* draggingInRecents */, true /* animate */); mImpl.showRecents(triggeredFromAltTab, false /* draggingInRecents */, true /* animate */, false /* reloadTasks */); } else { if (mSystemUserCallbacks != null) { IRecentsNonSystemUserCallbacks callbacks = Loading @@ -223,7 +224,7 @@ public class Recents extends SystemUI if (callbacks != null) { try { callbacks.showRecents(triggeredFromAltTab, false /* draggingInRecents */, true /* animate */); true /* animate */, false /* reloadTasks */); } catch (RemoteException e) { Log.e(TAG, "Callback failed", e); } Loading packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java +1 −0 Original line number Diff line number Diff line Loading @@ -448,6 +448,7 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD launchState.launchedToTaskId = -1; launchState.launchedWithAltTab = false; launchState.launchedHasConfigurationChanged = false; launchState.launchedViaDragGesture = false; MetricsLogger.hidden(this, MetricsLogger.OVERVIEW_ACTIVITY); } Loading packages/SystemUI/src/com/android/systemui/recents/RecentsActivityLaunchState.java +1 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ public class RecentsActivityLaunchState { launchedReuseTaskStackViews = false; // Set this flag to indicate that the configuration has changed since Recents last launched launchedHasConfigurationChanged = true; launchedViaDragGesture = false; } /** Returns whether the status bar scrim should be animated when shown for the first time. */ Loading packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java +11 −6 Original line number Diff line number Diff line Loading @@ -144,6 +144,7 @@ public class RecentsImpl extends IRecentsNonSystemUserCallbacks.Stub implements boolean mBootCompleted; boolean mCanReuseTaskStackViews = true; boolean mDraggingInRecents; boolean mReloadTasks; // Task launching Rect mSearchBarBounds = new Rect(); Loading @@ -168,7 +169,8 @@ public class RecentsImpl extends IRecentsNonSystemUserCallbacks.Stub implements public void run() { // When this fires, then the user has not released alt-tab for at least // FAST_ALT_TAB_DELAY_MS milliseconds showRecents(mTriggeredFromAltTab, false /* draggingInRecents */, true /* animate */); showRecents(mTriggeredFromAltTab, false /* draggingInRecents */, true /* animate */, false /* reloadTasks */); } }); Loading Loading @@ -252,9 +254,10 @@ public class RecentsImpl extends IRecentsNonSystemUserCallbacks.Stub implements @Override public void showRecents(boolean triggeredFromAltTab, boolean draggingInRecents, boolean animate) { boolean animate, boolean reloadTasks) { mTriggeredFromAltTab = triggeredFromAltTab; mDraggingInRecents = draggingInRecents; mReloadTasks = reloadTasks; if (mFastAltTabTrigger.hasTriggered()) { // We are calling this from the doze trigger, so just fall through to show Recents mFastAltTabTrigger.resetTrigger(); Loading Loading @@ -543,7 +546,8 @@ public class RecentsImpl extends IRecentsNonSystemUserCallbacks.Stub implements if (topTask != null && !SystemServicesProxy.isHomeStack(topTask.stackId)) { ssp.moveTaskToDockedStack(topTask.id, ActivityManager.DOCKED_STACK_CREATE_MODE_TOP_OR_LEFT, initialBounds); showRecents(false /* triggeredFromAltTab */, draggingInRecents, false /* animate */); showRecents(false /* triggeredFromAltTab */, draggingInRecents, false /* animate */, true /* reloadTasks*/); } } Loading Loading @@ -800,12 +804,13 @@ public class RecentsImpl extends IRecentsNonSystemUserCallbacks.Stub implements reloadHeaderBarLayout(false /* tryAndBindSearchWidget */); // In the case where alt-tab is triggered, we never get a preloadRecents() call, so we // should always preload the tasks now if (mTriggeredFromAltTab ||sInstanceLoadPlan == null) { // should always preload the tasks now. If we are dragging in recents, reload them as // the stacks might have changed. if (mReloadTasks || mTriggeredFromAltTab ||sInstanceLoadPlan == null) { // Create a new load plan if preloadRecents() was never triggered sInstanceLoadPlan = loader.createLoadPlan(mContext); } if (mTriggeredFromAltTab || !sInstanceLoadPlan.hasTasks()) { if (mReloadTasks || mTriggeredFromAltTab || !sInstanceLoadPlan.hasTasks()) { loader.preloadTasks(sInstanceLoadPlan, isTopTaskHome); } TaskStack stack = sInstanceLoadPlan.getTaskStack(); Loading Loading
packages/SystemUI/src/com/android/systemui/recents/IRecentsNonSystemUserCallbacks.aidl +2 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,8 @@ package com.android.systemui.recents; oneway interface IRecentsNonSystemUserCallbacks { void preloadRecents(); void cancelPreloadingRecents(); void showRecents(boolean triggeredFromAltTab, boolean draggingInRecents, boolean animate); void showRecents(boolean triggeredFromAltTab, boolean draggingInRecents, boolean animate, boolean reloadTasks); void hideRecents(boolean triggeredFromAltTab, boolean triggeredFromHomeKey); void toggleRecents(); void onConfigurationChanged(); Loading
packages/SystemUI/src/com/android/systemui/recents/Recents.java +3 −2 Original line number Diff line number Diff line Loading @@ -215,7 +215,8 @@ public class Recents extends SystemUI int currentUser = sSystemServicesProxy.getCurrentUser(); if (sSystemServicesProxy.isSystemUser(currentUser)) { mImpl.showRecents(triggeredFromAltTab, false /* draggingInRecents */, true /* animate */); mImpl.showRecents(triggeredFromAltTab, false /* draggingInRecents */, true /* animate */, false /* reloadTasks */); } else { if (mSystemUserCallbacks != null) { IRecentsNonSystemUserCallbacks callbacks = Loading @@ -223,7 +224,7 @@ public class Recents extends SystemUI if (callbacks != null) { try { callbacks.showRecents(triggeredFromAltTab, false /* draggingInRecents */, true /* animate */); true /* animate */, false /* reloadTasks */); } catch (RemoteException e) { Log.e(TAG, "Callback failed", e); } Loading
packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java +1 −0 Original line number Diff line number Diff line Loading @@ -448,6 +448,7 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD launchState.launchedToTaskId = -1; launchState.launchedWithAltTab = false; launchState.launchedHasConfigurationChanged = false; launchState.launchedViaDragGesture = false; MetricsLogger.hidden(this, MetricsLogger.OVERVIEW_ACTIVITY); } Loading
packages/SystemUI/src/com/android/systemui/recents/RecentsActivityLaunchState.java +1 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ public class RecentsActivityLaunchState { launchedReuseTaskStackViews = false; // Set this flag to indicate that the configuration has changed since Recents last launched launchedHasConfigurationChanged = true; launchedViaDragGesture = false; } /** Returns whether the status bar scrim should be animated when shown for the first time. */ Loading
packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java +11 −6 Original line number Diff line number Diff line Loading @@ -144,6 +144,7 @@ public class RecentsImpl extends IRecentsNonSystemUserCallbacks.Stub implements boolean mBootCompleted; boolean mCanReuseTaskStackViews = true; boolean mDraggingInRecents; boolean mReloadTasks; // Task launching Rect mSearchBarBounds = new Rect(); Loading @@ -168,7 +169,8 @@ public class RecentsImpl extends IRecentsNonSystemUserCallbacks.Stub implements public void run() { // When this fires, then the user has not released alt-tab for at least // FAST_ALT_TAB_DELAY_MS milliseconds showRecents(mTriggeredFromAltTab, false /* draggingInRecents */, true /* animate */); showRecents(mTriggeredFromAltTab, false /* draggingInRecents */, true /* animate */, false /* reloadTasks */); } }); Loading Loading @@ -252,9 +254,10 @@ public class RecentsImpl extends IRecentsNonSystemUserCallbacks.Stub implements @Override public void showRecents(boolean triggeredFromAltTab, boolean draggingInRecents, boolean animate) { boolean animate, boolean reloadTasks) { mTriggeredFromAltTab = triggeredFromAltTab; mDraggingInRecents = draggingInRecents; mReloadTasks = reloadTasks; if (mFastAltTabTrigger.hasTriggered()) { // We are calling this from the doze trigger, so just fall through to show Recents mFastAltTabTrigger.resetTrigger(); Loading Loading @@ -543,7 +546,8 @@ public class RecentsImpl extends IRecentsNonSystemUserCallbacks.Stub implements if (topTask != null && !SystemServicesProxy.isHomeStack(topTask.stackId)) { ssp.moveTaskToDockedStack(topTask.id, ActivityManager.DOCKED_STACK_CREATE_MODE_TOP_OR_LEFT, initialBounds); showRecents(false /* triggeredFromAltTab */, draggingInRecents, false /* animate */); showRecents(false /* triggeredFromAltTab */, draggingInRecents, false /* animate */, true /* reloadTasks*/); } } Loading Loading @@ -800,12 +804,13 @@ public class RecentsImpl extends IRecentsNonSystemUserCallbacks.Stub implements reloadHeaderBarLayout(false /* tryAndBindSearchWidget */); // In the case where alt-tab is triggered, we never get a preloadRecents() call, so we // should always preload the tasks now if (mTriggeredFromAltTab ||sInstanceLoadPlan == null) { // should always preload the tasks now. If we are dragging in recents, reload them as // the stacks might have changed. if (mReloadTasks || mTriggeredFromAltTab ||sInstanceLoadPlan == null) { // Create a new load plan if preloadRecents() was never triggered sInstanceLoadPlan = loader.createLoadPlan(mContext); } if (mTriggeredFromAltTab || !sInstanceLoadPlan.hasTasks()) { if (mReloadTasks || mTriggeredFromAltTab || !sInstanceLoadPlan.hasTasks()) { loader.preloadTasks(sInstanceLoadPlan, isTopTaskHome); } TaskStack stack = sInstanceLoadPlan.getTaskStack(); Loading