Loading packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java +2 −8 Original line number Diff line number Diff line Loading @@ -205,7 +205,7 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD ? stack.indexOfStackTask(launchTarget) : 0; boolean hasNavBarScrim = (taskCount > 0) && !config.hasTransposedNavBar; boolean animateNavBarScrim = true; boolean animateNavBarScrim = !launchState.launchedWhileDocking; mScrimViews.prepareEnterRecentsAnimation(hasNavBarScrim, animateNavBarScrim); // Keep track of whether we launched from the nav bar button or via alt-tab Loading Loading @@ -460,13 +460,7 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD // wait on the system to send a signal that was never queued. RecentsConfiguration config = Recents.getConfiguration(); RecentsActivityLaunchState launchState = config.getLaunchState(); launchState.launchedFromHome = false; launchState.launchedFromSearchHome = false; launchState.launchedFromAppWithThumbnail = false; launchState.launchedToTaskId = -1; launchState.launchedWithAltTab = false; launchState.launchedHasConfigurationChanged = false; launchState.launchedViaDragGesture = false; launchState.reset(); MetricsLogger.hidden(this, MetricsEvent.OVERVIEW_ACTIVITY); } Loading packages/SystemUI/src/com/android/systemui/recents/RecentsActivityLaunchState.java +13 −0 Original line number Diff line number Diff line Loading @@ -34,10 +34,22 @@ public class RecentsActivityLaunchState { public boolean launchedReuseTaskStackViews; public boolean launchedHasConfigurationChanged; public boolean launchedViaDragGesture; public boolean launchedWhileDocking; public int launchedToTaskId; public int launchedNumVisibleTasks; public int launchedNumVisibleThumbnails; public void reset() { launchedFromHome = false; launchedFromSearchHome = false; launchedFromAppWithThumbnail = false; launchedToTaskId = -1; launchedWithAltTab = false; launchedHasConfigurationChanged = false; launchedViaDragGesture = false; launchedWhileDocking = false; } /** Called when the configuration has changed, and we want to reset any configuration specific * members. */ public void updateOnConfigurationChange() { Loading @@ -46,6 +58,7 @@ public class RecentsActivityLaunchState { // Set this flag to indicate that the configuration has changed since Recents last launched launchedHasConfigurationChanged = true; launchedViaDragGesture = false; launchedWhileDocking = false; } /** Loading packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java +7 −4 Original line number Diff line number Diff line Loading @@ -161,6 +161,7 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener boolean mCanReuseTaskStackViews = true; boolean mDraggingInRecents; boolean mReloadTasks; boolean mLaunchedWhileDocking; // Task launching Rect mSearchBarBounds = new Rect(); Loading Loading @@ -270,10 +271,10 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener } public void showRecents(boolean triggeredFromAltTab, boolean draggingInRecents, boolean animate, boolean reloadTasks) { boolean animate, boolean launchedWhileDockingTask) { mTriggeredFromAltTab = triggeredFromAltTab; mDraggingInRecents = draggingInRecents; mReloadTasks = reloadTasks; mLaunchedWhileDocking = launchedWhileDockingTask; if (mFastAltTabTrigger.hasTriggered()) { // We are calling this from the doze trigger, so just fall through to show Recents mFastAltTabTrigger.resetTrigger(); Loading Loading @@ -338,6 +339,7 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener } mDraggingInRecents = false; mLaunchedWhileDocking = false; mTriggeredFromAltTab = false; try { Loading Loading @@ -865,11 +867,11 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener // In the case where alt-tab is triggered, we never get a preloadRecents() call, so we // 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) { if (mLaunchedWhileDocking || mTriggeredFromAltTab ||sInstanceLoadPlan == null) { // Create a new load plan if preloadRecents() was never triggered sInstanceLoadPlan = loader.createLoadPlan(mContext); } if (mReloadTasks || mTriggeredFromAltTab || !sInstanceLoadPlan.hasTasks()) { if (mLaunchedWhileDocking || mTriggeredFromAltTab || !sInstanceLoadPlan.hasTasks()) { loader.preloadTasks(sInstanceLoadPlan, topTask.id, isTopTaskHome); } TaskStack stack = sInstanceLoadPlan.getTaskStack(); Loading Loading @@ -957,6 +959,7 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener launchState.launchedNumVisibleThumbnails = vr.numVisibleThumbnails; launchState.launchedHasConfigurationChanged = false; launchState.launchedViaDragGesture = mDraggingInRecents; launchState.launchedWhileDocking = mLaunchedWhileDocking; Intent intent = new Intent(); intent.setClassName(RECENTS_PACKAGE, mRecentsIntentActivityName); Loading packages/SystemUI/src/com/android/systemui/recents/tv/RecentsTvActivity.java +1 −7 Original line number Diff line number Diff line Loading @@ -287,13 +287,7 @@ public class RecentsTvActivity extends Activity implements OnPreDrawListener { // wait on the system to send a signal that was never queued. RecentsConfiguration config = Recents.getConfiguration(); RecentsActivityLaunchState launchState = config.getLaunchState(); launchState.launchedFromHome = false; launchState.launchedFromSearchHome = false; launchState.launchedFromAppWithThumbnail = false; launchState.launchedToTaskId = -1; launchState.launchedWithAltTab = false; launchState.launchedHasConfigurationChanged = false; launchState.launchedViaDragGesture = false; launchState.reset(); } @Override Loading packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java +4 −2 Original line number Diff line number Diff line Loading @@ -185,7 +185,8 @@ public class RecentsView extends FrameLayout { // If we are already occluded by the app, then just set the default background scrim now. // Otherwise, defer until the enter animation completes to animate the scrim with the // tasks for the home animation. if (launchState.launchedFromAppWithThumbnail || mStack.getTaskCount() == 0) { if (launchState.launchedWhileDocking || launchState.launchedFromAppWithThumbnail || mStack.getTaskCount() == 0) { mBackgroundScrim.setAlpha((int) (DEFAULT_SCRIM_ALPHA * 255)); } else { mBackgroundScrim.setAlpha(0); Loading Loading @@ -645,7 +646,8 @@ public class RecentsView extends FrameLayout { public final void onBusEvent(EnterRecentsWindowAnimationCompletedEvent event) { RecentsActivityLaunchState launchState = Recents.getConfiguration().getLaunchState(); if (!launchState.launchedFromAppWithThumbnail && mStack.getTaskCount() > 0) { if (!launchState.launchedWhileDocking && !launchState.launchedFromAppWithThumbnail && mStack.getTaskCount() > 0) { animateBackgroundScrim(DEFAULT_SCRIM_ALPHA, TaskStackAnimationHelper.ENTER_FROM_HOME_TRANSLATION_DURATION); } Loading Loading
packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java +2 −8 Original line number Diff line number Diff line Loading @@ -205,7 +205,7 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD ? stack.indexOfStackTask(launchTarget) : 0; boolean hasNavBarScrim = (taskCount > 0) && !config.hasTransposedNavBar; boolean animateNavBarScrim = true; boolean animateNavBarScrim = !launchState.launchedWhileDocking; mScrimViews.prepareEnterRecentsAnimation(hasNavBarScrim, animateNavBarScrim); // Keep track of whether we launched from the nav bar button or via alt-tab Loading Loading @@ -460,13 +460,7 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD // wait on the system to send a signal that was never queued. RecentsConfiguration config = Recents.getConfiguration(); RecentsActivityLaunchState launchState = config.getLaunchState(); launchState.launchedFromHome = false; launchState.launchedFromSearchHome = false; launchState.launchedFromAppWithThumbnail = false; launchState.launchedToTaskId = -1; launchState.launchedWithAltTab = false; launchState.launchedHasConfigurationChanged = false; launchState.launchedViaDragGesture = false; launchState.reset(); MetricsLogger.hidden(this, MetricsEvent.OVERVIEW_ACTIVITY); } Loading
packages/SystemUI/src/com/android/systemui/recents/RecentsActivityLaunchState.java +13 −0 Original line number Diff line number Diff line Loading @@ -34,10 +34,22 @@ public class RecentsActivityLaunchState { public boolean launchedReuseTaskStackViews; public boolean launchedHasConfigurationChanged; public boolean launchedViaDragGesture; public boolean launchedWhileDocking; public int launchedToTaskId; public int launchedNumVisibleTasks; public int launchedNumVisibleThumbnails; public void reset() { launchedFromHome = false; launchedFromSearchHome = false; launchedFromAppWithThumbnail = false; launchedToTaskId = -1; launchedWithAltTab = false; launchedHasConfigurationChanged = false; launchedViaDragGesture = false; launchedWhileDocking = false; } /** Called when the configuration has changed, and we want to reset any configuration specific * members. */ public void updateOnConfigurationChange() { Loading @@ -46,6 +58,7 @@ public class RecentsActivityLaunchState { // Set this flag to indicate that the configuration has changed since Recents last launched launchedHasConfigurationChanged = true; launchedViaDragGesture = false; launchedWhileDocking = false; } /** Loading
packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java +7 −4 Original line number Diff line number Diff line Loading @@ -161,6 +161,7 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener boolean mCanReuseTaskStackViews = true; boolean mDraggingInRecents; boolean mReloadTasks; boolean mLaunchedWhileDocking; // Task launching Rect mSearchBarBounds = new Rect(); Loading Loading @@ -270,10 +271,10 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener } public void showRecents(boolean triggeredFromAltTab, boolean draggingInRecents, boolean animate, boolean reloadTasks) { boolean animate, boolean launchedWhileDockingTask) { mTriggeredFromAltTab = triggeredFromAltTab; mDraggingInRecents = draggingInRecents; mReloadTasks = reloadTasks; mLaunchedWhileDocking = launchedWhileDockingTask; if (mFastAltTabTrigger.hasTriggered()) { // We are calling this from the doze trigger, so just fall through to show Recents mFastAltTabTrigger.resetTrigger(); Loading Loading @@ -338,6 +339,7 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener } mDraggingInRecents = false; mLaunchedWhileDocking = false; mTriggeredFromAltTab = false; try { Loading Loading @@ -865,11 +867,11 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener // In the case where alt-tab is triggered, we never get a preloadRecents() call, so we // 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) { if (mLaunchedWhileDocking || mTriggeredFromAltTab ||sInstanceLoadPlan == null) { // Create a new load plan if preloadRecents() was never triggered sInstanceLoadPlan = loader.createLoadPlan(mContext); } if (mReloadTasks || mTriggeredFromAltTab || !sInstanceLoadPlan.hasTasks()) { if (mLaunchedWhileDocking || mTriggeredFromAltTab || !sInstanceLoadPlan.hasTasks()) { loader.preloadTasks(sInstanceLoadPlan, topTask.id, isTopTaskHome); } TaskStack stack = sInstanceLoadPlan.getTaskStack(); Loading Loading @@ -957,6 +959,7 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener launchState.launchedNumVisibleThumbnails = vr.numVisibleThumbnails; launchState.launchedHasConfigurationChanged = false; launchState.launchedViaDragGesture = mDraggingInRecents; launchState.launchedWhileDocking = mLaunchedWhileDocking; Intent intent = new Intent(); intent.setClassName(RECENTS_PACKAGE, mRecentsIntentActivityName); Loading
packages/SystemUI/src/com/android/systemui/recents/tv/RecentsTvActivity.java +1 −7 Original line number Diff line number Diff line Loading @@ -287,13 +287,7 @@ public class RecentsTvActivity extends Activity implements OnPreDrawListener { // wait on the system to send a signal that was never queued. RecentsConfiguration config = Recents.getConfiguration(); RecentsActivityLaunchState launchState = config.getLaunchState(); launchState.launchedFromHome = false; launchState.launchedFromSearchHome = false; launchState.launchedFromAppWithThumbnail = false; launchState.launchedToTaskId = -1; launchState.launchedWithAltTab = false; launchState.launchedHasConfigurationChanged = false; launchState.launchedViaDragGesture = false; launchState.reset(); } @Override Loading
packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java +4 −2 Original line number Diff line number Diff line Loading @@ -185,7 +185,8 @@ public class RecentsView extends FrameLayout { // If we are already occluded by the app, then just set the default background scrim now. // Otherwise, defer until the enter animation completes to animate the scrim with the // tasks for the home animation. if (launchState.launchedFromAppWithThumbnail || mStack.getTaskCount() == 0) { if (launchState.launchedWhileDocking || launchState.launchedFromAppWithThumbnail || mStack.getTaskCount() == 0) { mBackgroundScrim.setAlpha((int) (DEFAULT_SCRIM_ALPHA * 255)); } else { mBackgroundScrim.setAlpha(0); Loading Loading @@ -645,7 +646,8 @@ public class RecentsView extends FrameLayout { public final void onBusEvent(EnterRecentsWindowAnimationCompletedEvent event) { RecentsActivityLaunchState launchState = Recents.getConfiguration().getLaunchState(); if (!launchState.launchedFromAppWithThumbnail && mStack.getTaskCount() > 0) { if (!launchState.launchedWhileDocking && !launchState.launchedFromAppWithThumbnail && mStack.getTaskCount() > 0) { animateBackgroundScrim(DEFAULT_SCRIM_ALPHA, TaskStackAnimationHelper.ENTER_FROM_HOME_TRANSLATION_DURATION); } Loading