Add userId to key when type is USER
Before this cl, the app list couldn't distinguish different users because all of them have the same key: USER. This cl adds userId into key, to make sure the preference key is unique. Bug: 64605854 Test: RunSettingsRoboTests Change-Id: Ia4de2ff85b214465a35f1983ca69a9280d053154
This commit is contained in:
@@ -724,6 +724,8 @@ public class PowerUsageSummary extends PowerUsageBase implements
|
||||
String extractKeyFromSipper(BatterySipper sipper) {
|
||||
if (sipper.uidObj != null) {
|
||||
return extractKeyFromUid(sipper.getUid());
|
||||
} else if (sipper.drainType == DrainType.USER) {
|
||||
return sipper.drainType.toString() + sipper.userId;
|
||||
} else if (sipper.drainType != DrainType.APP) {
|
||||
return sipper.drainType.toString();
|
||||
} else if (sipper.getPackages() != null) {
|
||||
|
Reference in New Issue
Block a user