diff options
| author | Winson Chung <winsonc@google.com> | 2017-10-04 14:50:15 -0700 |
|---|---|---|
| committer | Winson Chung <winsonc@google.com> | 2017-10-12 11:37:17 -0700 |
| commit | 5fa397533fa29254e8a45a05675b2c03756a0ada (patch) | |
| tree | 355b9b40c418326cb5ee071e6c37b85532700b59 /core/java/android | |
| parent | fb44d212f267074a305eb34fa064b6d6904aa3ef (diff) | |
4/Clean up use of hidden recent task flags
- Remove flags to control which recent tasks are returned -- they are now
trimmed with the expected behaviour when the task list is modified.
- Remove unused logic related to force-resetting a task based on inactive
time.
- Remove SysUI logic related to excluded recent tasks since it is already
handled
- Clean up task list subsetting now that returned list is guaranteed to
only be visible tasks
- Only use AM interface to fetch recent tasks instead of through AM
Bug: 34270611
Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/am/RecentTasksTest.java
Change-Id: I3f60ce507563152b5704c63985af621b02d0e7c8
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/app/ActivityManager.java | 53 | ||||
| -rw-r--r-- | core/java/android/app/IActivityManager.aidl | 4 |
2 files changed, 3 insertions, 54 deletions
diff --git a/core/java/android/app/ActivityManager.java b/core/java/android/app/ActivityManager.java index 38b1edaa40c3..dff43edc3013 100644 --- a/core/java/android/app/ActivityManager.java +++ b/core/java/android/app/ActivityManager.java @@ -1502,31 +1502,6 @@ public class ActivityManager { public static final int RECENT_IGNORE_UNAVAILABLE = 0x0002; /** - * Provides a list that contains recent tasks for all - * profiles of a user. - * @hide - */ - public static final int RECENT_INCLUDE_PROFILES = 0x0004; - - /** - * Ignores all tasks that are on the home stack. - * @hide - */ - public static final int RECENT_IGNORE_HOME_AND_RECENTS_STACK_TASKS = 0x0008; - - /** - * Ignores the top task in the docked stack. - * @hide - */ - public static final int RECENT_INGORE_DOCKED_STACK_TOP_TASK = 0x0010; - - /** - * Ignores all tasks that are on the pinned stack. - * @hide - */ - public static final int RECENT_INGORE_PINNED_STACK_TASKS = 0x0020; - - /** * <p></p>Return a list of the tasks that the user has recently launched, with * the most recent being first and older ones after in order. * @@ -1561,33 +1536,7 @@ public class ActivityManager { public List<RecentTaskInfo> getRecentTasks(int maxNum, int flags) throws SecurityException { try { - return getService().getRecentTasks(maxNum, - flags, UserHandle.myUserId()).getList(); - } catch (RemoteException e) { - throw e.rethrowFromSystemServer(); - } - } - - /** - * Same as {@link #getRecentTasks(int, int)} but returns the recent tasks for a - * specific user. It requires holding - * the {@link android.Manifest.permission#INTERACT_ACROSS_USERS_FULL} permission. - * @param maxNum The maximum number of entries to return in the list. The - * actual number returned may be smaller, depending on how many tasks the - * user has started and the maximum number the system can remember. - * @param flags Information about what to return. May be any combination - * of {@link #RECENT_WITH_EXCLUDED} and {@link #RECENT_IGNORE_UNAVAILABLE}. - * - * @return Returns a list of RecentTaskInfo records describing each of - * the recent tasks. Most recently activated tasks go first. - * - * @hide - */ - public List<RecentTaskInfo> getRecentTasksForUser(int maxNum, int flags, int userId) - throws SecurityException { - try { - return getService().getRecentTasks(maxNum, - flags, userId).getList(); + return getService().getRecentTasks(maxNum, flags, UserHandle.myUserId()).getList(); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } diff --git a/core/java/android/app/IActivityManager.aidl b/core/java/android/app/IActivityManager.aidl index f03951607678..117854a60499 100644 --- a/core/java/android/app/IActivityManager.aidl +++ b/core/java/android/app/IActivityManager.aidl @@ -178,8 +178,8 @@ interface IActivityManager { * SIGUSR1 is delivered. All others are ignored. */ void signalPersistentProcesses(int signal); - ParceledListSlice getRecentTasks(int maxNum, - int flags, int userId); + + ParceledListSlice getRecentTasks(int maxNum, int flags, int userId); oneway void serviceDoneExecuting(in IBinder token, int type, int startId, int res); oneway void activityDestroyed(in IBinder token); IIntentSender getIntentSender(int type, in String packageName, in IBinder token, |
