Loading services/core/java/com/android/server/wm/ActivityRecord.java +10 −14 Original line number Diff line number Diff line Loading @@ -90,7 +90,6 @@ import static android.view.WindowManager.TRANSIT_ACTIVITY_CLOSE; import static android.view.WindowManager.TRANSIT_TASK_CLOSE; import static com.android.server.am.ActivityRecordProto.APP_WINDOW_TOKEN; import static com.android.server.am.ActivityRecordProto.CONFIGURATION_CONTAINER; import static com.android.server.am.ActivityRecordProto.FRONT_OF_TASK; import static com.android.server.am.ActivityRecordProto.IDENTIFIER; import static com.android.server.am.ActivityRecordProto.PROC_ID; Loading Loading @@ -145,9 +144,6 @@ import static com.android.server.wm.ActivityTaskManagerDebugConfig.TAG_WITH_CLAS import static com.android.server.wm.ActivityTaskManagerService.RELAUNCH_REASON_FREE_RESIZE; import static com.android.server.wm.ActivityTaskManagerService.RELAUNCH_REASON_NONE; import static com.android.server.wm.ActivityTaskManagerService.RELAUNCH_REASON_WINDOWING_MODE_RESIZE; import static com.android.server.wm.IdentifierProto.HASH_CODE; import static com.android.server.wm.IdentifierProto.TITLE; import static com.android.server.wm.IdentifierProto.USER_ID; import static com.android.server.wm.ProtoLogGroup.WM_DEBUG_ADD_REMOVE; import static com.android.server.wm.ProtoLogGroup.WM_DEBUG_ORIENTATION; import static com.android.server.wm.ProtoLogGroup.WM_DEBUG_STARTING_WINDOW; Loading Loading @@ -1578,7 +1574,7 @@ final class ActivityRecord extends AppWindowToken { final TaskRecord task = getTaskRecord(); EventLog.writeEvent(EventLogTags.AM_FINISH_ACTIVITY, mUserId, System.identityHashCode(this), task.taskId, shortComponentName, reason); task.mTaskId, shortComponentName, reason); final ArrayList<ActivityRecord> activities = task.mActivities; final int index = activities.indexOf(this); if (index < (activities.size() - 1)) { Loading Loading @@ -1838,7 +1834,7 @@ final class ActivityRecord extends AppWindowToken { } EventLog.writeEvent(EventLogTags.AM_DESTROY_ACTIVITY, mUserId, System.identityHashCode(this), getTaskRecord().taskId, shortComponentName, reason); System.identityHashCode(this), getTaskRecord().mTaskId, shortComponentName, reason); boolean removedFromHistory = false; Loading Loading @@ -1976,7 +1972,7 @@ final class ActivityRecord extends AppWindowToken { // work. // TODO: If the callers to removeTask() changes such that we have multiple places // where we are destroying the task, move this back into removeTask() mStackSupervisor.removeTaskByIdLocked(task.taskId, false /* killProcess */, mStackSupervisor.removeTaskByIdLocked(task.mTaskId, false /* killProcess */, !REMOVE_FROM_RECENTS, reason); } Loading Loading @@ -2090,7 +2086,7 @@ final class ActivityRecord extends AppWindowToken { final String strData = data != null ? data.toSafeString() : null; EventLog.writeEvent(tag, mUserId, System.identityHashCode(this), task.taskId, mUserId, System.identityHashCode(this), task.mTaskId, shortComponentName, intent.getAction(), intent.getType(), strData, intent.getFlags()); } Loading Loading @@ -3244,7 +3240,7 @@ final class ActivityRecord extends AppWindowToken { || (onlyRoot && activityNdx > task.findRootIndex(true /* effectiveRoot */))) { return INVALID_TASK_ID; } return task.taskId; return task.mTaskId; } static ActivityRecord isInStackLocked(IBinder token) { Loading Loading @@ -3299,8 +3295,8 @@ final class ActivityRecord extends AppWindowToken { Bitmap icon; if (_taskDescription.getIconFilename() == null && (icon = _taskDescription.getIcon()) != null) { final String iconFilename = createImageFilename(createTime, task.taskId); final File iconFile = new File(TaskPersister.getUserImagesDir(task.userId), final String iconFilename = createImageFilename(createTime, task.mTaskId); final File iconFile = new File(TaskPersister.getUserImagesDir(task.mUserId), iconFilename); final String iconFilePath = iconFile.getAbsolutePath(); mAtmService.getRecentTasks().saveImage(icon, iconFilePath); Loading Loading @@ -3359,7 +3355,7 @@ final class ActivityRecord extends AppWindowToken { void setRequestedOrientation(int requestedOrientation) { setOrientation(requestedOrientation, mayFreezeScreenLocked()); mAtmService.getTaskChangeNotificationController().notifyActivityRequestedOrientationChanged( task.taskId, requestedOrientation); task.mTaskId, requestedOrientation); } private void setOrientation(int requestedOrientation, boolean freezeScreenIfNeeded) { Loading Loading @@ -4065,7 +4061,7 @@ final class ActivityRecord extends AppWindowToken { + " preserveWindow=" + preserveWindow); EventLog.writeEvent(andResume ? AM_RELAUNCH_RESUME_ACTIVITY : AM_RELAUNCH_ACTIVITY, mUserId, System.identityHashCode(this), task.taskId, shortComponentName); task.mTaskId, shortComponentName); startFreezingScreenLocked(0); Loading Loading @@ -4400,7 +4396,7 @@ final class ActivityRecord extends AppWindowToken { @Override public String toString() { if (stringName != null) { return stringName + " t" + (task == null ? INVALID_TASK_ID : task.taskId) + return stringName + " t" + (task == null ? INVALID_TASK_ID : task.mTaskId) + (finishing ? " f}" : "") + (mIsExiting ? " mIsExiting=" : "") + "}"; } StringBuilder sb = new StringBuilder(128); Loading services/core/java/com/android/server/wm/ActivityStack.java +14 −14 Original line number Diff line number Diff line Loading @@ -775,7 +775,7 @@ class ActivityStack extends ConfigurationContainer { // multi-window mode. final String packageName = topActivity.info.applicationInfo.packageName; mService.getTaskChangeNotificationController().notifyActivityForcedResizable( topTask.taskId, FORCED_RESIZEABLE_REASON_SPLIT_SCREEN, packageName); topTask.mTaskId, FORCED_RESIZEABLE_REASON_SPLIT_SCREEN, packageName); } mService.deferWindowLayout(); Loading Loading @@ -1114,7 +1114,7 @@ class ActivityStack extends ConfigurationContainer { final ActivityRecord topRunningActivityLocked(IBinder token, int taskId) { for (int taskNdx = mTaskHistory.size() - 1; taskNdx >= 0; --taskNdx) { TaskRecord task = mTaskHistory.get(taskNdx); if (task.taskId == taskId) { if (task.mTaskId == taskId) { continue; } ArrayList<ActivityRecord> activities = task.mActivities; Loading Loading @@ -1150,7 +1150,7 @@ class ActivityStack extends ConfigurationContainer { TaskRecord taskForIdLocked(int id) { for (int taskNdx = mTaskHistory.size() - 1; taskNdx >= 0; --taskNdx) { final TaskRecord task = mTaskHistory.get(taskNdx); if (task.taskId == id) { if (task.mTaskId == id) { return task; } } Loading Loading @@ -1345,7 +1345,7 @@ class ActivityStack extends ConfigurationContainer { if (DEBUG_TASKS) Slog.d(TAG_TASKS, "Skipping " + task + ": voice session"); continue; } if (task.userId != userId) { if (task.mUserId != userId) { // Looking for a different task. if (DEBUG_TASKS) Slog.d(TAG_TASKS, "Skipping " + task + ": different user"); continue; Loading Loading @@ -2863,7 +2863,7 @@ class ActivityStack extends ConfigurationContainer { next.notifyAppResumed(next.stopped); EventLog.writeEvent(EventLogTags.AM_RESUME_ACTIVITY, next.mUserId, System.identityHashCode(next), next.getTaskRecord().taskId, System.identityHashCode(next), next.getTaskRecord().mTaskId, next.shortComponentName); next.sleeping = false; Loading Loading @@ -2973,7 +2973,7 @@ class ActivityStack extends ConfigurationContainer { // The task can't be shown, put non-current user tasks below current user tasks. while (maxPosition > 0) { final TaskRecord tmpTask = mTaskHistory.get(maxPosition - 1); if (!mStackSupervisor.isCurrentProfileLocked(tmpTask.userId) if (!mStackSupervisor.isCurrentProfileLocked(tmpTask.mUserId) || tmpTask.topRunningActivityLocked() == null) { break; } Loading Loading @@ -3026,7 +3026,7 @@ class ActivityStack extends ConfigurationContainer { void startActivityLocked(ActivityRecord r, ActivityRecord focusedTopActivity, boolean newTask, boolean keepCurTransition, ActivityOptions options) { TaskRecord rTask = r.getTaskRecord(); final int taskId = rTask.taskId; final int taskId = rTask.mTaskId; final boolean allowMoveToFront = options == null || !options.getAvoidMoveToFront(); // mLaunchTaskBehind tasks get placed at the back of the task stack. if (!r.mLaunchTaskBehind && allowMoveToFront Loading Loading @@ -4098,7 +4098,7 @@ class ActivityStack extends ConfigurationContainer { Slog.w(TAG, "Force removing " + r + ": app died, no saved state"); EventLog.writeEvent(EventLogTags.AM_FINISH_ACTIVITY, r.mUserId, System.identityHashCode(r), r.getTaskRecord().taskId, r.shortComponentName, r.getTaskRecord().mTaskId, r.shortComponentName, "proc died without state saved"); } } else { Loading Loading @@ -4223,7 +4223,7 @@ class ActivityStack extends ConfigurationContainer { } mRootActivityContainer.resumeFocusedStacksTopActivities(); EventLog.writeEvent(EventLogTags.AM_TASK_TO_FRONT, tr.userId, tr.taskId); EventLog.writeEvent(EventLogTags.AM_TASK_TO_FRONT, tr.mUserId, tr.mTaskId); mService.getTaskChangeNotificationController().notifyTaskMovedToFront(tr.getTaskInfo()); } finally { getDisplay().continueUpdateImeTarget(); Loading Loading @@ -4520,7 +4520,7 @@ class ActivityStack extends ConfigurationContainer { continue; } if (task.effectiveUid != callingUid) { if (task.userId != userId && !crossUser && !profileIds.contains(task.userId)) { if (task.mUserId != userId && !crossUser && !profileIds.contains(task.mUserId)) { // Skip if the caller does not have cross user permission or cannot access // the task's profile continue; Loading @@ -4545,7 +4545,7 @@ class ActivityStack extends ConfigurationContainer { // For the focused stack top task, update the last stack active time so that it can // be used to determine the order of the tasks (it may not be set for newly created // tasks) task.lastActiveTime = SystemClock.elapsedRealtime(); task.touchActiveTime(); topTask = false; } tasksOut.add(task); Loading Loading @@ -4654,7 +4654,7 @@ class ActivityStack extends ConfigurationContainer { if (needSep) { pw.println(""); } pw.println(prefix + "Task id #" + task.taskId); pw.println(prefix + "Task id #" + task.mTaskId); pw.println(prefix + "mBounds=" + task.getRequestedOverrideBounds()); pw.println(prefix + "mMinWidth=" + task.mMinWidth); pw.println(prefix + "mMinHeight=" + task.mMinHeight); Loading Loading @@ -4732,7 +4732,7 @@ class ActivityStack extends ConfigurationContainer { final boolean removed = mTaskHistory.remove(task); if (removed) { EventLog.writeEvent(EventLogTags.AM_REMOVE_TASK, task.taskId, getStackId()); EventLog.writeEvent(EventLogTags.AM_REMOVE_TASK, task.mTaskId, getStackId()); } removeActivitiesFromLRUList(task); Loading Loading @@ -4884,7 +4884,7 @@ class ActivityStack extends ConfigurationContainer { mStackSupervisor.scheduleUpdatePictureInPictureModeIfNeeded(task, prevStack); } else if (task.voiceSession != null) { try { task.voiceSession.taskStarted(task.intent, task.taskId); task.voiceSession.taskStarted(task.intent, task.mTaskId); } catch (RemoteException e) { } } Loading services/core/java/com/android/server/wm/ActivityStackSupervisor.java +10 −10 Original line number Diff line number Diff line Loading @@ -821,7 +821,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks { + " with results=" + results + " newIntents=" + newIntents + " andResume=" + andResume); EventLog.writeEvent(EventLogTags.AM_RESTART_ACTIVITY, r.mUserId, System.identityHashCode(r), task.taskId, r.shortComponentName); System.identityHashCode(r), task.mTaskId, r.shortComponentName); if (r.isActivityTypeHome()) { // Home process is the root process of the task. updateHomeProcess(task.mActivities.get(0).app); Loading Loading @@ -1765,7 +1765,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks { moveTasksToFullscreenStackLocked(stack, !ON_TOP); } else { for (int i = tasks.size() - 1; i >= 0; i--) { removeTaskByIdLocked(tasks.get(i).taskId, true /* killProcess */, removeTaskByIdLocked(tasks.get(i).mTaskId, true /* killProcess */, REMOVE_FROM_RECENTS, "remove-stack"); } } Loading Loading @@ -1817,7 +1817,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks { // Find any running services associated with this app and stop if needed. final Message msg = PooledLambda.obtainMessage(ActivityManagerInternal::cleanUpServices, mService.mAmInternal, tr.userId, component, new Intent(tr.getBaseIntent())); mService.mAmInternal, tr.mUserId, component, new Intent(tr.getBaseIntent())); mService.mH.sendMessage(msg); if (!killProcess) { Loading @@ -1834,7 +1834,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks { SparseArray<WindowProcessController> uids = pmap.valueAt(i); for (int j = 0; j < uids.size(); j++) { WindowProcessController proc = uids.valueAt(j); if (proc.mUserId != tr.userId) { if (proc.mUserId != tr.mUserId) { // Don't kill process for a different user. continue; } Loading Loading @@ -1916,7 +1916,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks { if (wasTrimmed) { // Task was trimmed from the recent tasks list -- remove the active task record as well // since the user won't really be able to go back to it removeTaskByIdLocked(task.taskId, killProcess, false /* removeFromRecents */, removeTaskByIdLocked(task.mTaskId, killProcess, false /* removeFromRecents */, "recent-task-trimmed"); } task.removedFromRecents(); Loading Loading @@ -2477,7 +2477,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks { return; } mService.getTaskChangeNotificationController().notifyActivityForcedResizable( task.taskId, reason, topActivity.info.applicationInfo.packageName); task.mTaskId, reason, topActivity.info.applicationInfo.packageName); } void activityRelaunchedLocked(IBinder token) { Loading Loading @@ -2699,7 +2699,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks { * @param task The task to put into resizing mode */ void setResizingDuringAnimation(TaskRecord task) { mResizingTasksDuringAnimation.add(task.taskId); mResizingTasksDuringAnimation.add(task.mTaskId); task.setTaskDockedResizing(true); } Loading Loading @@ -2761,7 +2761,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks { // If the user must confirm credentials (e.g. when first launching a work app and the // Work Challenge is present) let startActivityInPackage handle the intercepting. if (!mService.mAmInternal.shouldConfirmCredentials(task.userId) if (!mService.mAmInternal.shouldConfirmCredentials(task.mUserId) && task.getRootActivity() != null) { final ActivityRecord targetActivity = task.getTopActivity(); Loading @@ -2770,7 +2770,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks { mActivityMetricsLogger.notifyActivityLaunching(task.intent); try { mService.moveTaskToFrontLocked(null /* appThread */, null /* callingPackage */, task.taskId, 0, options, true /* fromRecents */); task.mTaskId, 0, options, true /* fromRecents */); // Apply options to prevent pendingOptions be taken by client to make sure // the override pending app transition will be applied immediately. targetActivity.applyOptionsLocked(); Loading @@ -2787,7 +2787,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks { callingPackage = task.mCallingPackage; intent = task.intent; intent.addFlags(Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY); userId = task.userId; userId = task.mUserId; return mService.getActivityStartController().startActivityInPackage( task.mCallingUid, callingPid, callingUid, callingPackage, intent, null, null, null, 0, 0, options, userId, task, "startActivityFromRecents", Loading services/core/java/com/android/server/wm/ActivityStartInterceptor.java +1 −1 Original line number Diff line number Diff line Loading @@ -274,7 +274,7 @@ class ActivityStartInterceptor { // ConfirmCredentials intent and unassign it, as otherwise the task will move to // front even if ConfirmCredentials is cancelled. if (mInTask != null) { mIntent.putExtra(EXTRA_TASK_ID, mInTask.taskId); mIntent.putExtra(EXTRA_TASK_ID, mInTask.mTaskId); mInTask = null; } if (mActivityOptions == null) { Loading services/core/java/com/android/server/wm/ActivityStarter.java +1 −1 Original line number Diff line number Diff line Loading @@ -1557,7 +1557,7 @@ class ActivityStarter { ); if (newTask) { EventLog.writeEvent(EventLogTags.AM_CREATE_TASK, mStartActivity.mUserId, mStartActivity.getTaskRecord().taskId); mStartActivity.getTaskRecord().mTaskId); } mStartActivity.logStartActivity( EventLogTags.AM_CREATE_ACTIVITY, mStartActivity.getTaskRecord()); Loading Loading
services/core/java/com/android/server/wm/ActivityRecord.java +10 −14 Original line number Diff line number Diff line Loading @@ -90,7 +90,6 @@ import static android.view.WindowManager.TRANSIT_ACTIVITY_CLOSE; import static android.view.WindowManager.TRANSIT_TASK_CLOSE; import static com.android.server.am.ActivityRecordProto.APP_WINDOW_TOKEN; import static com.android.server.am.ActivityRecordProto.CONFIGURATION_CONTAINER; import static com.android.server.am.ActivityRecordProto.FRONT_OF_TASK; import static com.android.server.am.ActivityRecordProto.IDENTIFIER; import static com.android.server.am.ActivityRecordProto.PROC_ID; Loading Loading @@ -145,9 +144,6 @@ import static com.android.server.wm.ActivityTaskManagerDebugConfig.TAG_WITH_CLAS import static com.android.server.wm.ActivityTaskManagerService.RELAUNCH_REASON_FREE_RESIZE; import static com.android.server.wm.ActivityTaskManagerService.RELAUNCH_REASON_NONE; import static com.android.server.wm.ActivityTaskManagerService.RELAUNCH_REASON_WINDOWING_MODE_RESIZE; import static com.android.server.wm.IdentifierProto.HASH_CODE; import static com.android.server.wm.IdentifierProto.TITLE; import static com.android.server.wm.IdentifierProto.USER_ID; import static com.android.server.wm.ProtoLogGroup.WM_DEBUG_ADD_REMOVE; import static com.android.server.wm.ProtoLogGroup.WM_DEBUG_ORIENTATION; import static com.android.server.wm.ProtoLogGroup.WM_DEBUG_STARTING_WINDOW; Loading Loading @@ -1578,7 +1574,7 @@ final class ActivityRecord extends AppWindowToken { final TaskRecord task = getTaskRecord(); EventLog.writeEvent(EventLogTags.AM_FINISH_ACTIVITY, mUserId, System.identityHashCode(this), task.taskId, shortComponentName, reason); task.mTaskId, shortComponentName, reason); final ArrayList<ActivityRecord> activities = task.mActivities; final int index = activities.indexOf(this); if (index < (activities.size() - 1)) { Loading Loading @@ -1838,7 +1834,7 @@ final class ActivityRecord extends AppWindowToken { } EventLog.writeEvent(EventLogTags.AM_DESTROY_ACTIVITY, mUserId, System.identityHashCode(this), getTaskRecord().taskId, shortComponentName, reason); System.identityHashCode(this), getTaskRecord().mTaskId, shortComponentName, reason); boolean removedFromHistory = false; Loading Loading @@ -1976,7 +1972,7 @@ final class ActivityRecord extends AppWindowToken { // work. // TODO: If the callers to removeTask() changes such that we have multiple places // where we are destroying the task, move this back into removeTask() mStackSupervisor.removeTaskByIdLocked(task.taskId, false /* killProcess */, mStackSupervisor.removeTaskByIdLocked(task.mTaskId, false /* killProcess */, !REMOVE_FROM_RECENTS, reason); } Loading Loading @@ -2090,7 +2086,7 @@ final class ActivityRecord extends AppWindowToken { final String strData = data != null ? data.toSafeString() : null; EventLog.writeEvent(tag, mUserId, System.identityHashCode(this), task.taskId, mUserId, System.identityHashCode(this), task.mTaskId, shortComponentName, intent.getAction(), intent.getType(), strData, intent.getFlags()); } Loading Loading @@ -3244,7 +3240,7 @@ final class ActivityRecord extends AppWindowToken { || (onlyRoot && activityNdx > task.findRootIndex(true /* effectiveRoot */))) { return INVALID_TASK_ID; } return task.taskId; return task.mTaskId; } static ActivityRecord isInStackLocked(IBinder token) { Loading Loading @@ -3299,8 +3295,8 @@ final class ActivityRecord extends AppWindowToken { Bitmap icon; if (_taskDescription.getIconFilename() == null && (icon = _taskDescription.getIcon()) != null) { final String iconFilename = createImageFilename(createTime, task.taskId); final File iconFile = new File(TaskPersister.getUserImagesDir(task.userId), final String iconFilename = createImageFilename(createTime, task.mTaskId); final File iconFile = new File(TaskPersister.getUserImagesDir(task.mUserId), iconFilename); final String iconFilePath = iconFile.getAbsolutePath(); mAtmService.getRecentTasks().saveImage(icon, iconFilePath); Loading Loading @@ -3359,7 +3355,7 @@ final class ActivityRecord extends AppWindowToken { void setRequestedOrientation(int requestedOrientation) { setOrientation(requestedOrientation, mayFreezeScreenLocked()); mAtmService.getTaskChangeNotificationController().notifyActivityRequestedOrientationChanged( task.taskId, requestedOrientation); task.mTaskId, requestedOrientation); } private void setOrientation(int requestedOrientation, boolean freezeScreenIfNeeded) { Loading Loading @@ -4065,7 +4061,7 @@ final class ActivityRecord extends AppWindowToken { + " preserveWindow=" + preserveWindow); EventLog.writeEvent(andResume ? AM_RELAUNCH_RESUME_ACTIVITY : AM_RELAUNCH_ACTIVITY, mUserId, System.identityHashCode(this), task.taskId, shortComponentName); task.mTaskId, shortComponentName); startFreezingScreenLocked(0); Loading Loading @@ -4400,7 +4396,7 @@ final class ActivityRecord extends AppWindowToken { @Override public String toString() { if (stringName != null) { return stringName + " t" + (task == null ? INVALID_TASK_ID : task.taskId) + return stringName + " t" + (task == null ? INVALID_TASK_ID : task.mTaskId) + (finishing ? " f}" : "") + (mIsExiting ? " mIsExiting=" : "") + "}"; } StringBuilder sb = new StringBuilder(128); Loading
services/core/java/com/android/server/wm/ActivityStack.java +14 −14 Original line number Diff line number Diff line Loading @@ -775,7 +775,7 @@ class ActivityStack extends ConfigurationContainer { // multi-window mode. final String packageName = topActivity.info.applicationInfo.packageName; mService.getTaskChangeNotificationController().notifyActivityForcedResizable( topTask.taskId, FORCED_RESIZEABLE_REASON_SPLIT_SCREEN, packageName); topTask.mTaskId, FORCED_RESIZEABLE_REASON_SPLIT_SCREEN, packageName); } mService.deferWindowLayout(); Loading Loading @@ -1114,7 +1114,7 @@ class ActivityStack extends ConfigurationContainer { final ActivityRecord topRunningActivityLocked(IBinder token, int taskId) { for (int taskNdx = mTaskHistory.size() - 1; taskNdx >= 0; --taskNdx) { TaskRecord task = mTaskHistory.get(taskNdx); if (task.taskId == taskId) { if (task.mTaskId == taskId) { continue; } ArrayList<ActivityRecord> activities = task.mActivities; Loading Loading @@ -1150,7 +1150,7 @@ class ActivityStack extends ConfigurationContainer { TaskRecord taskForIdLocked(int id) { for (int taskNdx = mTaskHistory.size() - 1; taskNdx >= 0; --taskNdx) { final TaskRecord task = mTaskHistory.get(taskNdx); if (task.taskId == id) { if (task.mTaskId == id) { return task; } } Loading Loading @@ -1345,7 +1345,7 @@ class ActivityStack extends ConfigurationContainer { if (DEBUG_TASKS) Slog.d(TAG_TASKS, "Skipping " + task + ": voice session"); continue; } if (task.userId != userId) { if (task.mUserId != userId) { // Looking for a different task. if (DEBUG_TASKS) Slog.d(TAG_TASKS, "Skipping " + task + ": different user"); continue; Loading Loading @@ -2863,7 +2863,7 @@ class ActivityStack extends ConfigurationContainer { next.notifyAppResumed(next.stopped); EventLog.writeEvent(EventLogTags.AM_RESUME_ACTIVITY, next.mUserId, System.identityHashCode(next), next.getTaskRecord().taskId, System.identityHashCode(next), next.getTaskRecord().mTaskId, next.shortComponentName); next.sleeping = false; Loading Loading @@ -2973,7 +2973,7 @@ class ActivityStack extends ConfigurationContainer { // The task can't be shown, put non-current user tasks below current user tasks. while (maxPosition > 0) { final TaskRecord tmpTask = mTaskHistory.get(maxPosition - 1); if (!mStackSupervisor.isCurrentProfileLocked(tmpTask.userId) if (!mStackSupervisor.isCurrentProfileLocked(tmpTask.mUserId) || tmpTask.topRunningActivityLocked() == null) { break; } Loading Loading @@ -3026,7 +3026,7 @@ class ActivityStack extends ConfigurationContainer { void startActivityLocked(ActivityRecord r, ActivityRecord focusedTopActivity, boolean newTask, boolean keepCurTransition, ActivityOptions options) { TaskRecord rTask = r.getTaskRecord(); final int taskId = rTask.taskId; final int taskId = rTask.mTaskId; final boolean allowMoveToFront = options == null || !options.getAvoidMoveToFront(); // mLaunchTaskBehind tasks get placed at the back of the task stack. if (!r.mLaunchTaskBehind && allowMoveToFront Loading Loading @@ -4098,7 +4098,7 @@ class ActivityStack extends ConfigurationContainer { Slog.w(TAG, "Force removing " + r + ": app died, no saved state"); EventLog.writeEvent(EventLogTags.AM_FINISH_ACTIVITY, r.mUserId, System.identityHashCode(r), r.getTaskRecord().taskId, r.shortComponentName, r.getTaskRecord().mTaskId, r.shortComponentName, "proc died without state saved"); } } else { Loading Loading @@ -4223,7 +4223,7 @@ class ActivityStack extends ConfigurationContainer { } mRootActivityContainer.resumeFocusedStacksTopActivities(); EventLog.writeEvent(EventLogTags.AM_TASK_TO_FRONT, tr.userId, tr.taskId); EventLog.writeEvent(EventLogTags.AM_TASK_TO_FRONT, tr.mUserId, tr.mTaskId); mService.getTaskChangeNotificationController().notifyTaskMovedToFront(tr.getTaskInfo()); } finally { getDisplay().continueUpdateImeTarget(); Loading Loading @@ -4520,7 +4520,7 @@ class ActivityStack extends ConfigurationContainer { continue; } if (task.effectiveUid != callingUid) { if (task.userId != userId && !crossUser && !profileIds.contains(task.userId)) { if (task.mUserId != userId && !crossUser && !profileIds.contains(task.mUserId)) { // Skip if the caller does not have cross user permission or cannot access // the task's profile continue; Loading @@ -4545,7 +4545,7 @@ class ActivityStack extends ConfigurationContainer { // For the focused stack top task, update the last stack active time so that it can // be used to determine the order of the tasks (it may not be set for newly created // tasks) task.lastActiveTime = SystemClock.elapsedRealtime(); task.touchActiveTime(); topTask = false; } tasksOut.add(task); Loading Loading @@ -4654,7 +4654,7 @@ class ActivityStack extends ConfigurationContainer { if (needSep) { pw.println(""); } pw.println(prefix + "Task id #" + task.taskId); pw.println(prefix + "Task id #" + task.mTaskId); pw.println(prefix + "mBounds=" + task.getRequestedOverrideBounds()); pw.println(prefix + "mMinWidth=" + task.mMinWidth); pw.println(prefix + "mMinHeight=" + task.mMinHeight); Loading Loading @@ -4732,7 +4732,7 @@ class ActivityStack extends ConfigurationContainer { final boolean removed = mTaskHistory.remove(task); if (removed) { EventLog.writeEvent(EventLogTags.AM_REMOVE_TASK, task.taskId, getStackId()); EventLog.writeEvent(EventLogTags.AM_REMOVE_TASK, task.mTaskId, getStackId()); } removeActivitiesFromLRUList(task); Loading Loading @@ -4884,7 +4884,7 @@ class ActivityStack extends ConfigurationContainer { mStackSupervisor.scheduleUpdatePictureInPictureModeIfNeeded(task, prevStack); } else if (task.voiceSession != null) { try { task.voiceSession.taskStarted(task.intent, task.taskId); task.voiceSession.taskStarted(task.intent, task.mTaskId); } catch (RemoteException e) { } } Loading
services/core/java/com/android/server/wm/ActivityStackSupervisor.java +10 −10 Original line number Diff line number Diff line Loading @@ -821,7 +821,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks { + " with results=" + results + " newIntents=" + newIntents + " andResume=" + andResume); EventLog.writeEvent(EventLogTags.AM_RESTART_ACTIVITY, r.mUserId, System.identityHashCode(r), task.taskId, r.shortComponentName); System.identityHashCode(r), task.mTaskId, r.shortComponentName); if (r.isActivityTypeHome()) { // Home process is the root process of the task. updateHomeProcess(task.mActivities.get(0).app); Loading Loading @@ -1765,7 +1765,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks { moveTasksToFullscreenStackLocked(stack, !ON_TOP); } else { for (int i = tasks.size() - 1; i >= 0; i--) { removeTaskByIdLocked(tasks.get(i).taskId, true /* killProcess */, removeTaskByIdLocked(tasks.get(i).mTaskId, true /* killProcess */, REMOVE_FROM_RECENTS, "remove-stack"); } } Loading Loading @@ -1817,7 +1817,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks { // Find any running services associated with this app and stop if needed. final Message msg = PooledLambda.obtainMessage(ActivityManagerInternal::cleanUpServices, mService.mAmInternal, tr.userId, component, new Intent(tr.getBaseIntent())); mService.mAmInternal, tr.mUserId, component, new Intent(tr.getBaseIntent())); mService.mH.sendMessage(msg); if (!killProcess) { Loading @@ -1834,7 +1834,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks { SparseArray<WindowProcessController> uids = pmap.valueAt(i); for (int j = 0; j < uids.size(); j++) { WindowProcessController proc = uids.valueAt(j); if (proc.mUserId != tr.userId) { if (proc.mUserId != tr.mUserId) { // Don't kill process for a different user. continue; } Loading Loading @@ -1916,7 +1916,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks { if (wasTrimmed) { // Task was trimmed from the recent tasks list -- remove the active task record as well // since the user won't really be able to go back to it removeTaskByIdLocked(task.taskId, killProcess, false /* removeFromRecents */, removeTaskByIdLocked(task.mTaskId, killProcess, false /* removeFromRecents */, "recent-task-trimmed"); } task.removedFromRecents(); Loading Loading @@ -2477,7 +2477,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks { return; } mService.getTaskChangeNotificationController().notifyActivityForcedResizable( task.taskId, reason, topActivity.info.applicationInfo.packageName); task.mTaskId, reason, topActivity.info.applicationInfo.packageName); } void activityRelaunchedLocked(IBinder token) { Loading Loading @@ -2699,7 +2699,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks { * @param task The task to put into resizing mode */ void setResizingDuringAnimation(TaskRecord task) { mResizingTasksDuringAnimation.add(task.taskId); mResizingTasksDuringAnimation.add(task.mTaskId); task.setTaskDockedResizing(true); } Loading Loading @@ -2761,7 +2761,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks { // If the user must confirm credentials (e.g. when first launching a work app and the // Work Challenge is present) let startActivityInPackage handle the intercepting. if (!mService.mAmInternal.shouldConfirmCredentials(task.userId) if (!mService.mAmInternal.shouldConfirmCredentials(task.mUserId) && task.getRootActivity() != null) { final ActivityRecord targetActivity = task.getTopActivity(); Loading @@ -2770,7 +2770,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks { mActivityMetricsLogger.notifyActivityLaunching(task.intent); try { mService.moveTaskToFrontLocked(null /* appThread */, null /* callingPackage */, task.taskId, 0, options, true /* fromRecents */); task.mTaskId, 0, options, true /* fromRecents */); // Apply options to prevent pendingOptions be taken by client to make sure // the override pending app transition will be applied immediately. targetActivity.applyOptionsLocked(); Loading @@ -2787,7 +2787,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks { callingPackage = task.mCallingPackage; intent = task.intent; intent.addFlags(Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY); userId = task.userId; userId = task.mUserId; return mService.getActivityStartController().startActivityInPackage( task.mCallingUid, callingPid, callingUid, callingPackage, intent, null, null, null, 0, 0, options, userId, task, "startActivityFromRecents", Loading
services/core/java/com/android/server/wm/ActivityStartInterceptor.java +1 −1 Original line number Diff line number Diff line Loading @@ -274,7 +274,7 @@ class ActivityStartInterceptor { // ConfirmCredentials intent and unassign it, as otherwise the task will move to // front even if ConfirmCredentials is cancelled. if (mInTask != null) { mIntent.putExtra(EXTRA_TASK_ID, mInTask.taskId); mIntent.putExtra(EXTRA_TASK_ID, mInTask.mTaskId); mInTask = null; } if (mActivityOptions == null) { Loading
services/core/java/com/android/server/wm/ActivityStarter.java +1 −1 Original line number Diff line number Diff line Loading @@ -1557,7 +1557,7 @@ class ActivityStarter { ); if (newTask) { EventLog.writeEvent(EventLogTags.AM_CREATE_TASK, mStartActivity.mUserId, mStartActivity.getTaskRecord().taskId); mStartActivity.getTaskRecord().mTaskId); } mStartActivity.logStartActivity( EventLogTags.AM_CREATE_ACTIVITY, mStartActivity.getTaskRecord()); Loading