Loading services/core/java/com/android/server/am/ActivityStarter.java +17 −8 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import static android.app.ActivityManager.START_SUCCESS; import static android.app.ActivityManager.START_TASK_TO_FRONT; import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM; import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN; import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED; import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_PRIMARY; import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_SECONDARY; import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED; Loading Loading @@ -902,14 +903,22 @@ class ActivityStarter { final int clearTaskFlags = FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_CLEAR_TASK; boolean clearedTask = (mLaunchFlags & clearTaskFlags) == clearTaskFlags && mReuseTask != null; if (startedActivityStack.inPinnedWindowingMode() && (result == START_TASK_TO_FRONT || result == START_DELIVERED_TO_TOP || clearedTask)) { // The activity was already running in the pinned stack so it wasn't started, but either // brought to the front or the new intent was delivered to it since it was already in // front. Notify anyone interested in this piece of information. if (result == START_TASK_TO_FRONT || result == START_DELIVERED_TO_TOP || clearedTask) { // The activity was already running so it wasn't started, but either brought to the // front or the new intent was delivered to it since it was already in front. Notify // anyone interested in this piece of information. switch (startedActivityStack.getWindowingMode()) { case WINDOWING_MODE_PINNED: mService.mTaskChangeNotificationController.notifyPinnedActivityRestartAttempt( clearedTask); break; case WINDOWING_MODE_SPLIT_SCREEN_PRIMARY: final ActivityStack homeStack = mSupervisor.mHomeStack; if (homeStack != null && homeStack.shouldBeVisible(null /* starting */)) { mService.mWindowManager.showRecentApps(); } break; } } } Loading Loading
services/core/java/com/android/server/am/ActivityStarter.java +17 −8 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import static android.app.ActivityManager.START_SUCCESS; import static android.app.ActivityManager.START_TASK_TO_FRONT; import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM; import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN; import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED; import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_PRIMARY; import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_SECONDARY; import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED; Loading Loading @@ -902,14 +903,22 @@ class ActivityStarter { final int clearTaskFlags = FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_CLEAR_TASK; boolean clearedTask = (mLaunchFlags & clearTaskFlags) == clearTaskFlags && mReuseTask != null; if (startedActivityStack.inPinnedWindowingMode() && (result == START_TASK_TO_FRONT || result == START_DELIVERED_TO_TOP || clearedTask)) { // The activity was already running in the pinned stack so it wasn't started, but either // brought to the front or the new intent was delivered to it since it was already in // front. Notify anyone interested in this piece of information. if (result == START_TASK_TO_FRONT || result == START_DELIVERED_TO_TOP || clearedTask) { // The activity was already running so it wasn't started, but either brought to the // front or the new intent was delivered to it since it was already in front. Notify // anyone interested in this piece of information. switch (startedActivityStack.getWindowingMode()) { case WINDOWING_MODE_PINNED: mService.mTaskChangeNotificationController.notifyPinnedActivityRestartAttempt( clearedTask); break; case WINDOWING_MODE_SPLIT_SCREEN_PRIMARY: final ActivityStack homeStack = mSupervisor.mHomeStack; if (homeStack != null && homeStack.shouldBeVisible(null /* starting */)) { mService.mWindowManager.showRecentApps(); } break; } } } Loading