Loading services/core/java/com/android/server/am/ActivityManagerShellCommand.java +1 −6 Original line number Diff line number Diff line Loading @@ -492,7 +492,6 @@ final class ActivityManagerShellCommand extends ShellCommand { final long endTime = SystemClock.uptimeMillis(); PrintWriter out = mWaitOption ? pw : getErrPrintWriter(); boolean launched = false; boolean hotLaunch = false; switch (res) { case ActivityManager.START_SUCCESS: launched = true; Loading @@ -518,8 +517,6 @@ final class ActivityManagerShellCommand extends ShellCommand { break; case ActivityManager.START_TASK_TO_FRONT: launched = true; //TODO(b/120981435) remove special case hotLaunch = true; out.println( "Warning: Activity not started, its current " + "task has been brought to the front"); Loading Loading @@ -567,9 +564,7 @@ final class ActivityManagerShellCommand extends ShellCommand { result.who = intent.getComponent(); } pw.println("Status: " + (result.timeout ? "timeout" : "ok")); final @WaitResult.LaunchState int launchState = hotLaunch ? WaitResult.LAUNCH_STATE_HOT : result.launchState; pw.println("LaunchState: " + launchStateToString(launchState)); pw.println("LaunchState: " + launchStateToString(result.launchState)); if (result.who != null) { pw.println("Activity: " + result.who.flattenToShortString()); } Loading services/core/java/com/android/server/wm/ActivityStarter.java +4 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,8 @@ import static android.app.ActivityManager.START_RETURN_INTENT_TO_CALLER; import static android.app.ActivityManager.START_RETURN_LOCK_TASK_MODE_VIOLATION; import static android.app.ActivityManager.START_SUCCESS; import static android.app.ActivityManager.START_TASK_TO_FRONT; import static android.app.WaitResult.LAUNCH_STATE_COLD; import static android.app.WaitResult.LAUNCH_STATE_HOT; import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM; import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN; import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED; Loading Loading @@ -1311,6 +1313,8 @@ class ActivityStarter { break; } case START_TASK_TO_FRONT: { outResult.launchState = r.attachedToProcess() ? LAUNCH_STATE_HOT : LAUNCH_STATE_COLD; // ActivityRecord may represent a different activity, but it should not be // in the resumed state. if (r.nowVisible && r.isState(RESUMED)) { Loading Loading
services/core/java/com/android/server/am/ActivityManagerShellCommand.java +1 −6 Original line number Diff line number Diff line Loading @@ -492,7 +492,6 @@ final class ActivityManagerShellCommand extends ShellCommand { final long endTime = SystemClock.uptimeMillis(); PrintWriter out = mWaitOption ? pw : getErrPrintWriter(); boolean launched = false; boolean hotLaunch = false; switch (res) { case ActivityManager.START_SUCCESS: launched = true; Loading @@ -518,8 +517,6 @@ final class ActivityManagerShellCommand extends ShellCommand { break; case ActivityManager.START_TASK_TO_FRONT: launched = true; //TODO(b/120981435) remove special case hotLaunch = true; out.println( "Warning: Activity not started, its current " + "task has been brought to the front"); Loading Loading @@ -567,9 +564,7 @@ final class ActivityManagerShellCommand extends ShellCommand { result.who = intent.getComponent(); } pw.println("Status: " + (result.timeout ? "timeout" : "ok")); final @WaitResult.LaunchState int launchState = hotLaunch ? WaitResult.LAUNCH_STATE_HOT : result.launchState; pw.println("LaunchState: " + launchStateToString(launchState)); pw.println("LaunchState: " + launchStateToString(result.launchState)); if (result.who != null) { pw.println("Activity: " + result.who.flattenToShortString()); } Loading
services/core/java/com/android/server/wm/ActivityStarter.java +4 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,8 @@ import static android.app.ActivityManager.START_RETURN_INTENT_TO_CALLER; import static android.app.ActivityManager.START_RETURN_LOCK_TASK_MODE_VIOLATION; import static android.app.ActivityManager.START_SUCCESS; import static android.app.ActivityManager.START_TASK_TO_FRONT; import static android.app.WaitResult.LAUNCH_STATE_COLD; import static android.app.WaitResult.LAUNCH_STATE_HOT; import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM; import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN; import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED; Loading Loading @@ -1311,6 +1313,8 @@ class ActivityStarter { break; } case START_TASK_TO_FRONT: { outResult.launchState = r.attachedToProcess() ? LAUNCH_STATE_HOT : LAUNCH_STATE_COLD; // ActivityRecord may represent a different activity, but it should not be // in the resumed state. if (r.nowVisible && r.isState(RESUMED)) { Loading