summaryrefslogtreecommitdiff
path: root/services/java/com/android/server/BackupManagerService.java
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2012-08-16 10:48:27 -0700
committerDianne Hackborn <hackbod@google.com>2012-08-16 12:46:38 -0700
commitf02b60aa4f367516f40cf3d60fffae0c6fe3e1b8 (patch)
tree893430514916fc74f4fd008dbcb457c2dd317989 /services/java/com/android/server/BackupManagerService.java
parentca34bcf6746454c561b0c07ca5c6e42bd4a73e9e (diff)
Rename UserId to UserHandle.
This is the start of turning this into a formal public API. Change-Id: I5786d2c320f1de41a06ed5d0f65adb68967287a0
Diffstat (limited to 'services/java/com/android/server/BackupManagerService.java')
-rw-r--r--services/java/com/android/server/BackupManagerService.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/services/java/com/android/server/BackupManagerService.java b/services/java/com/android/server/BackupManagerService.java
index 45428402d8d4..8be0ba8af3e7 100644
--- a/services/java/com/android/server/BackupManagerService.java
+++ b/services/java/com/android/server/BackupManagerService.java
@@ -65,7 +65,7 @@ import android.os.Process;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.SystemClock;
-import android.os.UserId;
+import android.os.UserHandle;
import android.os.WorkSource;
import android.os.storage.IMountService;
import android.provider.Settings;
@@ -4846,8 +4846,8 @@ class BackupManagerService extends IBackupManager.Stub {
// ----- IBackupManager binder interface -----
public void dataChanged(final String packageName) {
- final int callingUserHandle = UserId.getCallingUserId();
- if (callingUserHandle != UserId.USER_OWNER) {
+ final int callingUserHandle = UserHandle.getCallingUserId();
+ if (callingUserHandle != UserHandle.USER_OWNER) {
// App is running under a non-owner user profile. For now, we do not back
// up data from secondary user profiles.
// TODO: backups for all user profiles.
@@ -4950,8 +4950,8 @@ class BackupManagerService extends IBackupManager.Stub {
boolean doAllApps, boolean includeSystem, String[] pkgList) {
mContext.enforceCallingPermission(android.Manifest.permission.BACKUP, "fullBackup");
- final int callingUserHandle = UserId.getCallingUserId();
- if (callingUserHandle != UserId.USER_OWNER) {
+ final int callingUserHandle = UserHandle.getCallingUserId();
+ if (callingUserHandle != UserHandle.USER_OWNER) {
throw new IllegalStateException("Backup supported only for the device owner");
}
@@ -5019,8 +5019,8 @@ class BackupManagerService extends IBackupManager.Stub {
public void fullRestore(ParcelFileDescriptor fd) {
mContext.enforceCallingPermission(android.Manifest.permission.BACKUP, "fullRestore");
- final int callingUserHandle = UserId.getCallingUserId();
- if (callingUserHandle != UserId.USER_OWNER) {
+ final int callingUserHandle = UserHandle.getCallingUserId();
+ if (callingUserHandle != UserHandle.USER_OWNER) {
throw new IllegalStateException("Restore supported only for the device owner");
}