Loading data/etc/services.core.protolog.json +0 −6 Original line number Diff line number Diff line Loading @@ -2047,12 +2047,6 @@ "group": "WM_DEBUG_WINDOW_TRANSITIONS_MIN", "at": "com\/android\/server\/wm\/TransitionController.java" }, "-262984451": { "message": "Relaunch failed %s", "level": "INFO", "group": "WM_DEBUG_STATES", "at": "com\/android\/server\/wm\/ActivityRecord.java" }, "-251259736": { "message": "No longer freezing: %s", "level": "VERBOSE", Loading services/core/java/com/android/server/wm/ActivityRecord.java +2 −2 Original line number Diff line number Diff line Loading @@ -9854,7 +9854,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A ProtoLog.i(WM_DEBUG_STATES, "Moving to %s Relaunching %s callers=%s" , (andResume ? "RESUMED" : "PAUSED"), this, Debug.getCallers(6)); forceNewConfig = false; startRelaunching(); final ClientTransactionItem callbackItem = ActivityRelaunchItem.obtain(pendingResults, pendingNewIntents, configChangeFlags, new MergedConfiguration(getProcessGlobalConfiguration(), Loading @@ -9871,11 +9870,12 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A transaction.addCallback(callbackItem); transaction.setLifecycleStateRequest(lifecycleItem); mAtmService.getLifecycleManager().scheduleTransaction(transaction); startRelaunching(); // Note: don't need to call pauseIfSleepingLocked() here, because the caller will only // request resume if this activity is currently resumed, which implies we aren't // sleeping. } catch (RemoteException e) { ProtoLog.i(WM_DEBUG_STATES, "Relaunch failed %s", e); Slog.w(TAG, "Failed to relaunch " + this + ": " + e); } if (andResume) { Loading services/core/java/com/android/server/wm/RecentsAnimation.java +6 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.server.wm; import static android.app.ActivityManager.PROCESS_STATE_CACHED_ACTIVITY; import static android.app.ActivityManager.START_TASK_TO_FRONT; import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME; import static android.app.WindowConfiguration.ACTIVITY_TYPE_RECENTS; Loading Loading @@ -117,6 +118,11 @@ class RecentsAnimation implements RecentsAnimationCallbacks, OnRootTaskOrderChan return; } if (targetActivity.attachedToProcess()) { if (targetActivity.app.getCurrentProcState() >= PROCESS_STATE_CACHED_ACTIVITY) { Slog.v(TAG, "Skip preload recents for cached proc " + targetActivity.app); // The process may be frozen that cannot receive binder call. return; } // The activity may be relaunched if it cannot handle the current configuration // changes. The activity will be paused state if it is relaunched, otherwise it // keeps the original stopped state. Loading services/tests/wmtests/src/com/android/server/wm/RecentsAnimationTest.java +4 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.server.wm; import static android.app.ActivityManager.PROCESS_STATE_HOME; import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME; import static android.app.WindowConfiguration.ACTIVITY_TYPE_RECENTS; import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD; Loading Loading @@ -148,8 +149,9 @@ public class RecentsAnimationTest extends WindowTestsBase { anyInt() /* startFlags */, any() /* profilerInfo */); // Assume its process is alive because the caller should be the recents service. mSystemServicesTestRule.addProcess(aInfo.packageName, aInfo.processName, 12345 /* pid */, aInfo.applicationInfo.uid); final WindowProcessController proc = mSystemServicesTestRule.addProcess(aInfo.packageName, aInfo.processName, 12345 /* pid */, aInfo.applicationInfo.uid); proc.setCurrentProcState(PROCESS_STATE_HOME); Intent recentsIntent = new Intent().setComponent(mRecentsComponent); // Null animation indicates to preload. Loading Loading
data/etc/services.core.protolog.json +0 −6 Original line number Diff line number Diff line Loading @@ -2047,12 +2047,6 @@ "group": "WM_DEBUG_WINDOW_TRANSITIONS_MIN", "at": "com\/android\/server\/wm\/TransitionController.java" }, "-262984451": { "message": "Relaunch failed %s", "level": "INFO", "group": "WM_DEBUG_STATES", "at": "com\/android\/server\/wm\/ActivityRecord.java" }, "-251259736": { "message": "No longer freezing: %s", "level": "VERBOSE", Loading
services/core/java/com/android/server/wm/ActivityRecord.java +2 −2 Original line number Diff line number Diff line Loading @@ -9854,7 +9854,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A ProtoLog.i(WM_DEBUG_STATES, "Moving to %s Relaunching %s callers=%s" , (andResume ? "RESUMED" : "PAUSED"), this, Debug.getCallers(6)); forceNewConfig = false; startRelaunching(); final ClientTransactionItem callbackItem = ActivityRelaunchItem.obtain(pendingResults, pendingNewIntents, configChangeFlags, new MergedConfiguration(getProcessGlobalConfiguration(), Loading @@ -9871,11 +9870,12 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A transaction.addCallback(callbackItem); transaction.setLifecycleStateRequest(lifecycleItem); mAtmService.getLifecycleManager().scheduleTransaction(transaction); startRelaunching(); // Note: don't need to call pauseIfSleepingLocked() here, because the caller will only // request resume if this activity is currently resumed, which implies we aren't // sleeping. } catch (RemoteException e) { ProtoLog.i(WM_DEBUG_STATES, "Relaunch failed %s", e); Slog.w(TAG, "Failed to relaunch " + this + ": " + e); } if (andResume) { Loading
services/core/java/com/android/server/wm/RecentsAnimation.java +6 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.server.wm; import static android.app.ActivityManager.PROCESS_STATE_CACHED_ACTIVITY; import static android.app.ActivityManager.START_TASK_TO_FRONT; import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME; import static android.app.WindowConfiguration.ACTIVITY_TYPE_RECENTS; Loading Loading @@ -117,6 +118,11 @@ class RecentsAnimation implements RecentsAnimationCallbacks, OnRootTaskOrderChan return; } if (targetActivity.attachedToProcess()) { if (targetActivity.app.getCurrentProcState() >= PROCESS_STATE_CACHED_ACTIVITY) { Slog.v(TAG, "Skip preload recents for cached proc " + targetActivity.app); // The process may be frozen that cannot receive binder call. return; } // The activity may be relaunched if it cannot handle the current configuration // changes. The activity will be paused state if it is relaunched, otherwise it // keeps the original stopped state. Loading
services/tests/wmtests/src/com/android/server/wm/RecentsAnimationTest.java +4 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.server.wm; import static android.app.ActivityManager.PROCESS_STATE_HOME; import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME; import static android.app.WindowConfiguration.ACTIVITY_TYPE_RECENTS; import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD; Loading Loading @@ -148,8 +149,9 @@ public class RecentsAnimationTest extends WindowTestsBase { anyInt() /* startFlags */, any() /* profilerInfo */); // Assume its process is alive because the caller should be the recents service. mSystemServicesTestRule.addProcess(aInfo.packageName, aInfo.processName, 12345 /* pid */, aInfo.applicationInfo.uid); final WindowProcessController proc = mSystemServicesTestRule.addProcess(aInfo.packageName, aInfo.processName, 12345 /* pid */, aInfo.applicationInfo.uid); proc.setCurrentProcState(PROCESS_STATE_HOME); Intent recentsIntent = new Intent().setComponent(mRecentsComponent); // Null animation indicates to preload. Loading