ComponentName getCallingActivity(int userId, IBinder token) { synchronized (mHistory) { ActivityRecord r = findActivityByToken(userId, token); if (r != null) { return r.caller != null ? r.caller : r.component; } return null; } }
ComponentName getActivityClassForToken(int userId, IBinder token) { synchronized (mHistory) { ActivityRecord r = findActivityByToken(userId, token); if (r != null) { return r.component; } return null; } }
void onActivityResumed(int userId, IBinder token) { synchronized (mHistory) { optimizeTasksLocked(); ActivityRecord r = findActivityByToken(userId, token); if (r != null) { synchronized (r.task.activities) { r.task.activities.remove(r); r.task.activities.add(r); } } } }
public String getCallingPackage(int userId, IBinder token) { synchronized (mHistory) { ActivityRecord r = findActivityByToken(userId, token); if (r != null) { return r.caller != null ? r.caller.getPackageName() : "android"; } return "android"; } }
String getPackageForToken(int userId, IBinder token) { synchronized (mHistory) { ActivityRecord r = findActivityByToken(userId, token); if (r != null) { return r.component.getPackageName(); } return null; } }
ActivityRecord onActivityDestroyed(int userId, IBinder token) { synchronized (mHistory) { optimizeTasksLocked(); ActivityRecord r = findActivityByToken(userId, token); if (r != null) { synchronized (r.task.activities) { r.task.activities.remove(r); // We shouldn't remove task at this point, // it will be removed by optimizeTasksLocked(). } } return r; } }
Intent intent = intents[0]; ActivityInfo info = infos[0]; ActivityRecord resultTo = findActivityByToken(userId, token); if (resultTo != null && resultTo.launchMode == LAUNCH_SINGLE_INSTANCE) { intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
ActivityRecord sourceRecord = findActivityByToken(userId, resultTo); TaskRecord sourceTask = sourceRecord != null ? sourceRecord.task : null;
ComponentName getCallingActivity(int userId, IBinder token) { synchronized (mHistory) { ActivityRecord r = findActivityByToken(userId, token); if (r != null) { return r.caller != null ? r.caller : r.component; } return null; } }
ComponentName getActivityClassForToken(int userId, IBinder token) { synchronized (mHistory) { ActivityRecord r = findActivityByToken(userId, token); if (r != null) { return r.component; } return null; } }
ComponentName getCallingActivity(int userId, IBinder token) { synchronized (mHistory) { ActivityRecord r = findActivityByToken(userId, token); if (r != null) { return r.caller != null ? r.caller : r.component; } return null; } }
ComponentName getActivityClassForToken(int userId, IBinder token) { synchronized (mHistory) { ActivityRecord r = findActivityByToken(userId, token); if (r != null) { return r.component; } return null; } }
void onActivityResumed(int userId, IBinder token) { synchronized (mHistory) { optimizeTasksLocked(); ActivityRecord r = findActivityByToken(userId, token); if (r != null) { synchronized (r.task.activities) { r.task.activities.remove(r); r.task.activities.add(r); } } } }
public String getCallingPackage(int userId, IBinder token) { synchronized (mHistory) { ActivityRecord r = findActivityByToken(userId, token); if (r != null) { return r.caller != null ? r.caller.getPackageName() : "android"; } return "android"; } }
String getPackageForToken(int userId, IBinder token) { synchronized (mHistory) { ActivityRecord r = findActivityByToken(userId, token); if (r != null) { return r.component.getPackageName(); } return null; } }
String getPackageForToken(int userId, IBinder token) { synchronized (mHistory) { ActivityRecord r = findActivityByToken(userId, token); if (r != null) { return r.component.getPackageName(); } return null; } }
void onActivityResumed(int userId, IBinder token) { synchronized (mHistory) { optimizeTasksLocked(); ActivityRecord r = findActivityByToken(userId, token); if (r != null) { synchronized (r.task.activities) { r.task.activities.remove(r); r.task.activities.add(r); } } } }
public String getCallingPackage(int userId, IBinder token) { synchronized (mHistory) { ActivityRecord r = findActivityByToken(userId, token); if (r != null) { return r.caller != null ? r.caller.getPackageName() : "android"; } return "android"; } }
ActivityRecord onActivityDestroyed(int userId, IBinder token) { synchronized (mHistory) { optimizeTasksLocked(); ActivityRecord r = findActivityByToken(userId, token); if (r != null) { synchronized (r.task.activities) { r.task.activities.remove(r); // We shouldn't remove task at this point, // it will be removed by optimizeTasksLocked(). } } return r; } }
ActivityRecord onActivityDestroyed(int userId, IBinder token) { synchronized (mHistory) { optimizeTasksLocked(); ActivityRecord r = findActivityByToken(userId, token); if (r != null) { synchronized (r.task.activities) { r.task.activities.remove(r); // We shouldn't remove task at this point, // it will be removed by optimizeTasksLocked(). } } return r; } }