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