Loading services/core/java/com/android/server/am/ActivityManagerService.java +5 −12 Original line number Diff line number Diff line Loading @@ -1085,20 +1085,13 @@ public class ActivityManagerService extends IActivityManager.Stub } @Override public void onActivityLaunched(long id, ComponentName name, int temperature, int userId, String processName) { public void onActivityLaunched(long id, ComponentName name, int temperature, String processName, int uid) { mAppProfiler.onActivityLaunched(); synchronized (ActivityManagerService.this) { ProcessRecord record = null; try { String processRecordName = Flags.appStartInfoProcessNameFix() ? processName : name.getPackageName(); record = getProcessRecordLocked(processRecordName, mContext .getPackageManager().getPackageUidAsUser(name.getPackageName(), 0, userId)); } catch (NameNotFoundException nnfe) { // Ignore, record will be lost. } ProcessRecord record = getProcessRecordLocked(processRecordName, uid); mProcessList.getAppStartInfoTracker().onActivityLaunched(id, name, temperature, record); } Loading services/core/java/com/android/server/wm/ActivityMetricsLaunchObserver.java +2 −2 Original line number Diff line number Diff line Loading @@ -143,11 +143,11 @@ public class ActivityMetricsLaunchObserver { * but cannot coalesce to the existing one, e.g. to a different display. * @param name The launching activity name. * @param temperature The temperature at which a launch sequence had started. * @param userId The id of the user the activity is being launched for. * @param processName The name of the process that the launching activity belongs to. * @param uid The uid of the process that the launching activity belongs to. */ public void onActivityLaunched(long id, ComponentName name, @Temperature int temperature, int userId, String processName) { String processName, int uid) { } /** Loading services/core/java/com/android/server/wm/ActivityMetricsLogger.java +2 −1 Original line number Diff line number Diff line Loading @@ -1814,7 +1814,8 @@ class ActivityMetricsLogger { // Beginning a launch is timing sensitive and so should be observed as soon as possible. mLaunchObserver.onActivityLaunched(info.mLaunchingState.mStartUptimeNs, info.mLastLaunchedActivity.mActivityComponent, temperature, info.mLastLaunchedActivity.mUserId, info.mLastLaunchedActivity.processName); info.mLastLaunchedActivity.processName, info.mLastLaunchedActivity.getUid()); Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER); } Loading services/core/java/com/android/server/wm/LaunchObserverRegistryImpl.java +5 −5 Original line number Diff line number Diff line Loading @@ -84,11 +84,11 @@ class LaunchObserverRegistryImpl extends ActivityMetricsLaunchObserver implement } @Override public void onActivityLaunched(long id, ComponentName name, int temperature, int userId, String processName) { public void onActivityLaunched(long id, ComponentName name, int temperature, String processName, int uid) { mHandler.sendMessage(PooledLambda.obtainMessage( LaunchObserverRegistryImpl::handleOnActivityLaunched, this, id, name, temperature, userId, processName)); this, id, name, temperature, processName, uid)); } @Override Loading Loading @@ -139,10 +139,10 @@ class LaunchObserverRegistryImpl extends ActivityMetricsLaunchObserver implement } private void handleOnActivityLaunched(long id, ComponentName name, @Temperature int temperature, int userId, String processName) { @Temperature int temperature, String processName, int uid) { // Traverse start-to-end to meet the registerLaunchObserver multi-cast order guarantee. for (int i = 0; i < mList.size(); i++) { mList.get(i).onActivityLaunched(id, name, temperature, userId, processName); mList.get(i).onActivityLaunched(id, name, temperature, processName, uid); } } Loading services/tests/wmtests/src/com/android/server/wm/ActivityMetricsLaunchObserverTests.java +1 −1 Original line number Diff line number Diff line Loading @@ -125,7 +125,7 @@ public class ActivityMetricsLaunchObserverTests extends WindowTestsBase { private void verifyOnActivityLaunched(ActivityRecord activity) { final ArgumentCaptor<Long> idCaptor = ArgumentCaptor.forClass(Long.class); verifyAsync(mLaunchObserver).onActivityLaunched(idCaptor.capture(), eq(activity.mActivityComponent), anyInt(), anyInt(), anyString()); eq(activity.mActivityComponent), anyInt(), anyString(), anyInt()); final long id = idCaptor.getValue(); setExpectedStartedId(id, activity); mLastLaunchedIds.put(activity.mActivityComponent, id); Loading Loading
services/core/java/com/android/server/am/ActivityManagerService.java +5 −12 Original line number Diff line number Diff line Loading @@ -1085,20 +1085,13 @@ public class ActivityManagerService extends IActivityManager.Stub } @Override public void onActivityLaunched(long id, ComponentName name, int temperature, int userId, String processName) { public void onActivityLaunched(long id, ComponentName name, int temperature, String processName, int uid) { mAppProfiler.onActivityLaunched(); synchronized (ActivityManagerService.this) { ProcessRecord record = null; try { String processRecordName = Flags.appStartInfoProcessNameFix() ? processName : name.getPackageName(); record = getProcessRecordLocked(processRecordName, mContext .getPackageManager().getPackageUidAsUser(name.getPackageName(), 0, userId)); } catch (NameNotFoundException nnfe) { // Ignore, record will be lost. } ProcessRecord record = getProcessRecordLocked(processRecordName, uid); mProcessList.getAppStartInfoTracker().onActivityLaunched(id, name, temperature, record); } Loading
services/core/java/com/android/server/wm/ActivityMetricsLaunchObserver.java +2 −2 Original line number Diff line number Diff line Loading @@ -143,11 +143,11 @@ public class ActivityMetricsLaunchObserver { * but cannot coalesce to the existing one, e.g. to a different display. * @param name The launching activity name. * @param temperature The temperature at which a launch sequence had started. * @param userId The id of the user the activity is being launched for. * @param processName The name of the process that the launching activity belongs to. * @param uid The uid of the process that the launching activity belongs to. */ public void onActivityLaunched(long id, ComponentName name, @Temperature int temperature, int userId, String processName) { String processName, int uid) { } /** Loading
services/core/java/com/android/server/wm/ActivityMetricsLogger.java +2 −1 Original line number Diff line number Diff line Loading @@ -1814,7 +1814,8 @@ class ActivityMetricsLogger { // Beginning a launch is timing sensitive and so should be observed as soon as possible. mLaunchObserver.onActivityLaunched(info.mLaunchingState.mStartUptimeNs, info.mLastLaunchedActivity.mActivityComponent, temperature, info.mLastLaunchedActivity.mUserId, info.mLastLaunchedActivity.processName); info.mLastLaunchedActivity.processName, info.mLastLaunchedActivity.getUid()); Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER); } Loading
services/core/java/com/android/server/wm/LaunchObserverRegistryImpl.java +5 −5 Original line number Diff line number Diff line Loading @@ -84,11 +84,11 @@ class LaunchObserverRegistryImpl extends ActivityMetricsLaunchObserver implement } @Override public void onActivityLaunched(long id, ComponentName name, int temperature, int userId, String processName) { public void onActivityLaunched(long id, ComponentName name, int temperature, String processName, int uid) { mHandler.sendMessage(PooledLambda.obtainMessage( LaunchObserverRegistryImpl::handleOnActivityLaunched, this, id, name, temperature, userId, processName)); this, id, name, temperature, processName, uid)); } @Override Loading Loading @@ -139,10 +139,10 @@ class LaunchObserverRegistryImpl extends ActivityMetricsLaunchObserver implement } private void handleOnActivityLaunched(long id, ComponentName name, @Temperature int temperature, int userId, String processName) { @Temperature int temperature, String processName, int uid) { // Traverse start-to-end to meet the registerLaunchObserver multi-cast order guarantee. for (int i = 0; i < mList.size(); i++) { mList.get(i).onActivityLaunched(id, name, temperature, userId, processName); mList.get(i).onActivityLaunched(id, name, temperature, processName, uid); } } Loading
services/tests/wmtests/src/com/android/server/wm/ActivityMetricsLaunchObserverTests.java +1 −1 Original line number Diff line number Diff line Loading @@ -125,7 +125,7 @@ public class ActivityMetricsLaunchObserverTests extends WindowTestsBase { private void verifyOnActivityLaunched(ActivityRecord activity) { final ArgumentCaptor<Long> idCaptor = ArgumentCaptor.forClass(Long.class); verifyAsync(mLaunchObserver).onActivityLaunched(idCaptor.capture(), eq(activity.mActivityComponent), anyInt(), anyInt(), anyString()); eq(activity.mActivityComponent), anyInt(), anyString(), anyInt()); final long id = idCaptor.getValue(); setExpectedStartedId(id, activity); mLastLaunchedIds.put(activity.mActivityComponent, id); Loading