Skip to content

Commit d2e9956

Browse files
author
Amith Yamasani
committed
Fix recents list for multiuser
Since the Recents is now an activity running in the respective user's sandbox, it shouldn't use the special API to get the current user's recent tasks. Otherwise it causes all users to fetch the state of the current foreground user instead of their own recents. Change-Id: Ice8c2978e6a7ae71c44666c79a19ac07a2cbea1b
1 parent 70574ef commit d2e9956

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/SystemUI/src/com/android/systemui/recent/RecentTasksLoader.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,7 @@ protected Void doInBackground(Void... params) {
337337
mContext.getSystemService(Context.ACTIVITY_SERVICE);
338338

339339
final List<ActivityManager.RecentTaskInfo> recentTasks =
340-
am.getRecentTasksForUser(MAX_TASKS,
341-
ActivityManager.RECENT_IGNORE_UNAVAILABLE, UserHandle.USER_CURRENT);
340+
am.getRecentTasks(MAX_TASKS, ActivityManager.RECENT_IGNORE_UNAVAILABLE);
342341
int numTasks = recentTasks.size();
343342
ActivityInfo homeInfo = new Intent(Intent.ACTION_MAIN)
344343
.addCategory(Intent.CATEGORY_HOME).resolveActivityInfo(pm, 0);

0 commit comments

Comments
 (0)