mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 17:36:49 +00:00
Log UserManager users and cached users each time users accessed
Bug: 243688989 Change-Id: Ifa6eec39f9fc90a4871ac2ff010588c3a5cac531
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
package com.android.launcher3.pm;
|
||||
|
||||
import static com.android.launcher3.testing.shared.TestProtocol.WORK_TAB_MISSING;
|
||||
import static com.android.launcher3.testing.shared.TestProtocol.sDebugTracing;
|
||||
import static com.android.launcher3.testing.shared.TestProtocol.testLogD;
|
||||
|
||||
import android.content.Context;
|
||||
@@ -140,8 +141,18 @@ public class UserCache {
|
||||
*/
|
||||
public List<UserHandle> getUserProfiles() {
|
||||
StringBuilder usersToReturn = new StringBuilder();
|
||||
List<UserHandle> users;
|
||||
if (sDebugTracing) {
|
||||
users = mUserManager.getUserProfiles();
|
||||
for (UserHandle u : users) {
|
||||
usersToReturn.append(u).append(" && ");
|
||||
}
|
||||
testLogD(WORK_TAB_MISSING, "users from userManager: " + usersToReturn);
|
||||
}
|
||||
|
||||
synchronized (this) {
|
||||
if (mUsers != null) {
|
||||
usersToReturn = new StringBuilder();
|
||||
for (UserHandle u : mUserToSerialMap.keySet()) {
|
||||
usersToReturn.append(u).append(" && ");
|
||||
}
|
||||
@@ -152,11 +163,7 @@ public class UserCache {
|
||||
}
|
||||
}
|
||||
|
||||
List<UserHandle> users = mUserManager.getUserProfiles();
|
||||
for (UserHandle u : users) {
|
||||
usersToReturn.append(u).append(" && ");
|
||||
}
|
||||
testLogD(WORK_TAB_MISSING, "users from userManager: " + usersToReturn);
|
||||
users = mUserManager.getUserProfiles();
|
||||
return users == null ? Collections.emptyList() : users;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user