Loading services/core/java/com/android/server/wm/ActivityRecord.java +4 −3 Original line number Diff line number Diff line Loading @@ -693,13 +693,13 @@ final class ActivityRecord extends ConfigurationContainer { } } void scheduleTopResumedActivityChanged(boolean onTop) { boolean scheduleTopResumedActivityChanged(boolean onTop) { if (!attachedToProcess()) { if (DEBUG_STATES) { Slog.w(TAG, "Can't report activity position update - client not running" + ", activityRecord=" + this); } return; return false; } try { if (DEBUG_STATES) { Loading @@ -710,7 +710,9 @@ final class ActivityRecord extends ConfigurationContainer { TopResumedActivityChangeItem.obtain(onTop)); } catch (RemoteException e) { // If process died, whatever. return false; } return true; } void updateMultiWindowMode() { Loading Loading @@ -3408,7 +3410,6 @@ final class ActivityRecord extends ConfigurationContainer { transaction.addCallback(callbackItem); transaction.setLifecycleStateRequest(lifecycleItem); mAtmService.getLifecycleManager().scheduleTransaction(transaction); mStackSupervisor.updateTopResumedActivityIfNeeded(); // 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. Loading services/core/java/com/android/server/wm/ActivityStack.java +1 −2 Original line number Diff line number Diff line Loading @@ -1500,7 +1500,6 @@ class ActivityStack extends ConfigurationContainer { + " callers=" + Debug.getCallers(5)); r.setState(RESUMED, "minimalResumeActivityLocked"); r.completeResumeLocked(); mStackSupervisor.updateTopResumedActivityIfNeeded(); if (DEBUG_SAVED_STATE) Slog.i(TAG_SAVED_STATE, "Launch completed; removing icicle of " + r.icicle); } Loading Loading @@ -2571,7 +2570,6 @@ class ActivityStack extends ConfigurationContainer { // Protect against recursion. mInResumeTopActivity = true; result = resumeTopActivityInnerLocked(prev, options); mStackSupervisor.updateTopResumedActivityIfNeeded(); // When resuming the top activity, it may be necessary to pause the top activity (for // example, returning to the lock screen. We suppress the normal pause logic in Loading Loading @@ -2606,6 +2604,7 @@ class ActivityStack extends ConfigurationContainer { if (DEBUG_STACK) Slog.d(TAG_STACK, "setResumedActivity stack:" + this + " + from: " + mResumedActivity + " to:" + r + " reason:" + reason); mResumedActivity = r; mStackSupervisor.updateTopResumedActivityIfNeeded(); } @GuardedBy("mService") Loading services/core/java/com/android/server/wm/ActivityStackSupervisor.java +2 −3 Original line number Diff line number Diff line Loading @@ -853,7 +853,6 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks { // Schedule transaction. mService.getLifecycleManager().scheduleTransaction(clientTransaction); updateTopResumedActivityIfNeeded(); if ((proc.mInfo.privateFlags & ApplicationInfo.PRIVATE_FLAG_CANT_SAVE_STATE) != 0 && mService.mHasHeavyWeightFeature) { Loading Loading @@ -2321,8 +2320,8 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks { // mTopResumedActivityWaitingForPrev == true at this point would mean that an activity // before the prevTopActivity one hasn't reported back yet. So server never sent the top // resumed state change message to prevTopActivity. if (prevActivityReceivedTopState) { prevTopActivity.scheduleTopResumedActivityChanged(false /* onTop */); if (prevActivityReceivedTopState && prevTopActivity.scheduleTopResumedActivityChanged(false /* onTop */)) { scheduleTopResumedStateLossTimeout(prevTopActivity); mTopResumedActivityWaitingForPrev = true; } Loading Loading
services/core/java/com/android/server/wm/ActivityRecord.java +4 −3 Original line number Diff line number Diff line Loading @@ -693,13 +693,13 @@ final class ActivityRecord extends ConfigurationContainer { } } void scheduleTopResumedActivityChanged(boolean onTop) { boolean scheduleTopResumedActivityChanged(boolean onTop) { if (!attachedToProcess()) { if (DEBUG_STATES) { Slog.w(TAG, "Can't report activity position update - client not running" + ", activityRecord=" + this); } return; return false; } try { if (DEBUG_STATES) { Loading @@ -710,7 +710,9 @@ final class ActivityRecord extends ConfigurationContainer { TopResumedActivityChangeItem.obtain(onTop)); } catch (RemoteException e) { // If process died, whatever. return false; } return true; } void updateMultiWindowMode() { Loading Loading @@ -3408,7 +3410,6 @@ final class ActivityRecord extends ConfigurationContainer { transaction.addCallback(callbackItem); transaction.setLifecycleStateRequest(lifecycleItem); mAtmService.getLifecycleManager().scheduleTransaction(transaction); mStackSupervisor.updateTopResumedActivityIfNeeded(); // 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. Loading
services/core/java/com/android/server/wm/ActivityStack.java +1 −2 Original line number Diff line number Diff line Loading @@ -1500,7 +1500,6 @@ class ActivityStack extends ConfigurationContainer { + " callers=" + Debug.getCallers(5)); r.setState(RESUMED, "minimalResumeActivityLocked"); r.completeResumeLocked(); mStackSupervisor.updateTopResumedActivityIfNeeded(); if (DEBUG_SAVED_STATE) Slog.i(TAG_SAVED_STATE, "Launch completed; removing icicle of " + r.icicle); } Loading Loading @@ -2571,7 +2570,6 @@ class ActivityStack extends ConfigurationContainer { // Protect against recursion. mInResumeTopActivity = true; result = resumeTopActivityInnerLocked(prev, options); mStackSupervisor.updateTopResumedActivityIfNeeded(); // When resuming the top activity, it may be necessary to pause the top activity (for // example, returning to the lock screen. We suppress the normal pause logic in Loading Loading @@ -2606,6 +2604,7 @@ class ActivityStack extends ConfigurationContainer { if (DEBUG_STACK) Slog.d(TAG_STACK, "setResumedActivity stack:" + this + " + from: " + mResumedActivity + " to:" + r + " reason:" + reason); mResumedActivity = r; mStackSupervisor.updateTopResumedActivityIfNeeded(); } @GuardedBy("mService") Loading
services/core/java/com/android/server/wm/ActivityStackSupervisor.java +2 −3 Original line number Diff line number Diff line Loading @@ -853,7 +853,6 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks { // Schedule transaction. mService.getLifecycleManager().scheduleTransaction(clientTransaction); updateTopResumedActivityIfNeeded(); if ((proc.mInfo.privateFlags & ApplicationInfo.PRIVATE_FLAG_CANT_SAVE_STATE) != 0 && mService.mHasHeavyWeightFeature) { Loading Loading @@ -2321,8 +2320,8 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks { // mTopResumedActivityWaitingForPrev == true at this point would mean that an activity // before the prevTopActivity one hasn't reported back yet. So server never sent the top // resumed state change message to prevTopActivity. if (prevActivityReceivedTopState) { prevTopActivity.scheduleTopResumedActivityChanged(false /* onTop */); if (prevActivityReceivedTopState && prevTopActivity.scheduleTopResumedActivityChanged(false /* onTop */)) { scheduleTopResumedStateLossTimeout(prevTopActivity); mTopResumedActivityWaitingForPrev = true; } Loading