summaryrefslogtreecommitdiff
path: root/services/backup
diff options
context:
space:
mode:
authornathch <nathch@google.com>2020-01-10 18:37:26 +0000
committernathch <nathch@google.com>2020-01-10 18:49:48 +0000
commitb6798a7fb64877b296791cfef34c2e9cec56b879 (patch)
tree658fb2611343dfaa8fa56aa2893d3b46fb6f5d82 /services/backup
parent4226274bf96afc422435467d4c556ec571ef0386 (diff)
Fix bad test for testGetUserForAncestralSerialNumber which was
previously marked as @Ignore. The test was bad because it set 11 as the ancestral serial number for the system user UserBackupManagerService but asserted that 11 corresponds to user 1 - which is not the system user. This CL fixes the assert. Also added corresponding test for non system user. Fixes: 147012496 Test: atest com.android.server.backup.BackupManagerServiceTest Change-Id: Iab736885264aa4befc644678e5fe66d602ed00e3
Diffstat (limited to 'services/backup')
-rw-r--r--services/backup/java/com/android/server/backup/BackupManagerService.java5
1 files changed, 1 insertions, 4 deletions
diff --git a/services/backup/java/com/android/server/backup/BackupManagerService.java b/services/backup/java/com/android/server/backup/BackupManagerService.java
index d45a54e0ff28..b13bef2de151 100644
--- a/services/backup/java/com/android/server/backup/BackupManagerService.java
+++ b/services/backup/java/com/android/server/backup/BackupManagerService.java
@@ -1406,10 +1406,7 @@ public class BackupManagerService extends IBackupManager.Stub {
long oldId = Binder.clearCallingIdentity();
final int[] userIds;
try {
- userIds =
- mContext
- .getSystemService(UserManager.class)
- .getProfileIds(callingUserId, false);
+ userIds = getUserManager().getProfileIds(callingUserId, false);
} finally {
Binder.restoreCallingIdentity(oldId);
}