Loading services/core/java/com/android/server/wm/ActivityRecord.java +5 −1 Original line number Diff line number Diff line Loading @@ -495,7 +495,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A final String launchedFromPackage; // always the package who started the activity. @Nullable final String launchedFromFeatureId; // always the feature in launchedFromPackage private final int mLaunchSourceType; // original launch source type int mLaunchSourceType; // latest launch source type final Intent intent; // the original intent that generated us final String shortComponentName; // the short component name of the intent final String resolvedType; // as per original caller; Loading Loading @@ -2451,6 +2451,10 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A return mLaunchSourceType == type; } void updateLaunchSourceType(int launchFromUid, WindowProcessController caller) { mLaunchSourceType = determineLaunchSourceType(launchFromUid, caller); } private int determineLaunchSourceType(int launchFromUid, WindowProcessController caller) { if (launchFromUid == Process.SYSTEM_UID || launchFromUid == Process.ROOT_UID) { return LAUNCH_SOURCE_TYPE_SYSTEM; Loading services/core/java/com/android/server/wm/ActivityStarter.java +3 −0 Original line number Diff line number Diff line Loading @@ -1793,6 +1793,9 @@ class ActivityStarter { activity.destroyIfPossible("Removes redundant singleInstance"); } } if (mLastStartActivityRecord != null) { targetTaskTop.mLaunchSourceType = mLastStartActivityRecord.mLaunchSourceType; } targetTaskTop.mTransitionController.collect(targetTaskTop); recordTransientLaunchIfNeeded(targetTaskTop); // Recycle the target task for this launch. Loading services/core/java/com/android/server/wm/ActivityTaskSupervisor.java +7 −0 Original line number Diff line number Diff line Loading @@ -2801,6 +2801,13 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks { targetActivity, activityOptions); } if (callingPid > 0) { final WindowProcessController wpc = mService.mProcessMap .getProcess(callingPid); if (wpc != null) { targetActivity.updateLaunchSourceType(callingUid, wpc); } } mService.getActivityStartController().postStartActivityProcessingForLastStarter( task.getTopNonFinishingActivity(), ActivityManager.START_TASK_TO_FRONT, task.getRootTask()); Loading Loading
services/core/java/com/android/server/wm/ActivityRecord.java +5 −1 Original line number Diff line number Diff line Loading @@ -495,7 +495,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A final String launchedFromPackage; // always the package who started the activity. @Nullable final String launchedFromFeatureId; // always the feature in launchedFromPackage private final int mLaunchSourceType; // original launch source type int mLaunchSourceType; // latest launch source type final Intent intent; // the original intent that generated us final String shortComponentName; // the short component name of the intent final String resolvedType; // as per original caller; Loading Loading @@ -2451,6 +2451,10 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A return mLaunchSourceType == type; } void updateLaunchSourceType(int launchFromUid, WindowProcessController caller) { mLaunchSourceType = determineLaunchSourceType(launchFromUid, caller); } private int determineLaunchSourceType(int launchFromUid, WindowProcessController caller) { if (launchFromUid == Process.SYSTEM_UID || launchFromUid == Process.ROOT_UID) { return LAUNCH_SOURCE_TYPE_SYSTEM; Loading
services/core/java/com/android/server/wm/ActivityStarter.java +3 −0 Original line number Diff line number Diff line Loading @@ -1793,6 +1793,9 @@ class ActivityStarter { activity.destroyIfPossible("Removes redundant singleInstance"); } } if (mLastStartActivityRecord != null) { targetTaskTop.mLaunchSourceType = mLastStartActivityRecord.mLaunchSourceType; } targetTaskTop.mTransitionController.collect(targetTaskTop); recordTransientLaunchIfNeeded(targetTaskTop); // Recycle the target task for this launch. Loading
services/core/java/com/android/server/wm/ActivityTaskSupervisor.java +7 −0 Original line number Diff line number Diff line Loading @@ -2801,6 +2801,13 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks { targetActivity, activityOptions); } if (callingPid > 0) { final WindowProcessController wpc = mService.mProcessMap .getProcess(callingPid); if (wpc != null) { targetActivity.updateLaunchSourceType(callingUid, wpc); } } mService.getActivityStartController().postStartActivityProcessingForLastStarter( task.getTopNonFinishingActivity(), ActivityManager.START_TASK_TO_FRONT, task.getRootTask()); Loading