Loading services/core/java/com/android/server/am/ActivityManagerService.java +24 −3 Original line number Diff line number Diff line Loading @@ -10175,7 +10175,11 @@ public class ActivityManagerService extends IActivityManager.Stub } final int callingUid = Binder.getCallingUid(); mProcessList.getAppStartInfoTracker().addStartInfoCompleteListener(listener, callingUid); mUserController.handleIncomingUser(Binder.getCallingPid(), callingUid, userId, true, ALLOW_NON_FULL, "addApplicationStartInfoCompleteListener", null); mProcessList.getAppStartInfoTracker().addStartInfoCompleteListener(listener, UserHandle.getUid(userId, UserHandle.getAppId(callingUid))); } Loading @@ -10190,13 +10194,30 @@ public class ActivityManagerService extends IActivityManager.Stub } final int callingUid = Binder.getCallingUid(); mProcessList.getAppStartInfoTracker().removeStartInfoCompleteListener(listener, callingUid, true); mUserController.handleIncomingUser(Binder.getCallingPid(), callingUid, userId, true, ALLOW_NON_FULL, "removeApplicationStartInfoCompleteListener", null); mProcessList.getAppStartInfoTracker().removeStartInfoCompleteListener(listener, UserHandle.getUid(userId, UserHandle.getAppId(callingUid)), true); } @Override public void addStartInfoTimestamp(int key, long timestampNs, int userId) { enforceNotIsolatedCaller("addStartInfoTimestamp"); // For the simplification, we don't support USER_ALL nor USER_CURRENT here. if (userId == UserHandle.USER_ALL || userId == UserHandle.USER_CURRENT) { throw new IllegalArgumentException("Unsupported userId"); } final int callingUid = Binder.getCallingUid(); mUserController.handleIncomingUser(Binder.getCallingPid(), callingUid, userId, true, ALLOW_NON_FULL, "addStartInfoTimestamp", null); final String packageName = Settings.getPackageNameForUid(mContext, callingUid); mProcessList.getAppStartInfoTracker().addTimestampToStart(packageName, UserHandle.getUid(userId, UserHandle.getAppId(callingUid)), timestampNs, key); } @Override Loading services/core/java/com/android/server/am/AppStartInfoTracker.java +1 −1 Original line number Diff line number Diff line Loading @@ -464,7 +464,7 @@ public final class AppStartInfoTracker { addTimestampToStart(app.info.packageName, app.uid, timeNs, key); } private void addTimestampToStart(String packageName, int uid, long timeNs, int key) { void addTimestampToStart(String packageName, int uid, long timeNs, int key) { synchronized (mLock) { AppStartInfoContainer container = mData.get(packageName, uid); if (container == null) { Loading Loading
services/core/java/com/android/server/am/ActivityManagerService.java +24 −3 Original line number Diff line number Diff line Loading @@ -10175,7 +10175,11 @@ public class ActivityManagerService extends IActivityManager.Stub } final int callingUid = Binder.getCallingUid(); mProcessList.getAppStartInfoTracker().addStartInfoCompleteListener(listener, callingUid); mUserController.handleIncomingUser(Binder.getCallingPid(), callingUid, userId, true, ALLOW_NON_FULL, "addApplicationStartInfoCompleteListener", null); mProcessList.getAppStartInfoTracker().addStartInfoCompleteListener(listener, UserHandle.getUid(userId, UserHandle.getAppId(callingUid))); } Loading @@ -10190,13 +10194,30 @@ public class ActivityManagerService extends IActivityManager.Stub } final int callingUid = Binder.getCallingUid(); mProcessList.getAppStartInfoTracker().removeStartInfoCompleteListener(listener, callingUid, true); mUserController.handleIncomingUser(Binder.getCallingPid(), callingUid, userId, true, ALLOW_NON_FULL, "removeApplicationStartInfoCompleteListener", null); mProcessList.getAppStartInfoTracker().removeStartInfoCompleteListener(listener, UserHandle.getUid(userId, UserHandle.getAppId(callingUid)), true); } @Override public void addStartInfoTimestamp(int key, long timestampNs, int userId) { enforceNotIsolatedCaller("addStartInfoTimestamp"); // For the simplification, we don't support USER_ALL nor USER_CURRENT here. if (userId == UserHandle.USER_ALL || userId == UserHandle.USER_CURRENT) { throw new IllegalArgumentException("Unsupported userId"); } final int callingUid = Binder.getCallingUid(); mUserController.handleIncomingUser(Binder.getCallingPid(), callingUid, userId, true, ALLOW_NON_FULL, "addStartInfoTimestamp", null); final String packageName = Settings.getPackageNameForUid(mContext, callingUid); mProcessList.getAppStartInfoTracker().addTimestampToStart(packageName, UserHandle.getUid(userId, UserHandle.getAppId(callingUid)), timestampNs, key); } @Override Loading
services/core/java/com/android/server/am/AppStartInfoTracker.java +1 −1 Original line number Diff line number Diff line Loading @@ -464,7 +464,7 @@ public final class AppStartInfoTracker { addTimestampToStart(app.info.packageName, app.uid, timeNs, key); } private void addTimestampToStart(String packageName, int uid, long timeNs, int key) { void addTimestampToStart(String packageName, int uid, long timeNs, int key) { synchronized (mLock) { AppStartInfoContainer container = mData.get(packageName, uid); if (container == null) { Loading