Loading services/backup/java/com/android/server/backup/BackupManagerService.java +5 −0 Original line number Diff line number Diff line Loading @@ -194,6 +194,11 @@ public class BackupManagerService { } } boolean isAbleToServeUser(int userId) { return getServiceUsers().get(UserHandle.USER_SYSTEM) != null && getServiceUsers().get(userId) != null; } /** * Returns a lst of users currently unlocked that have a * {@link UserBackupManagerService} registered. Loading services/backup/java/com/android/server/backup/Trampoline.java +3 −4 Original line number Diff line number Diff line Loading @@ -202,11 +202,10 @@ public class Trampoline extends IBackupManager.Stub { } } // A user is ready for a backup if it's unlocked and is not suppressed by a device // admin (device owner or profile owner). // This method should not perform any I/O (e.g. do not call isBackupActivatedForUser), // it's used in multiple places where I/O waits would cause system lock-ups. private boolean isUserReadyForBackup(int userId) { return mService != null && mService.getServiceUsers().get(userId) != null && isBackupActivatedForUser(userId); return mService != null && mService.isAbleToServeUser(userId); } /** Loading Loading
services/backup/java/com/android/server/backup/BackupManagerService.java +5 −0 Original line number Diff line number Diff line Loading @@ -194,6 +194,11 @@ public class BackupManagerService { } } boolean isAbleToServeUser(int userId) { return getServiceUsers().get(UserHandle.USER_SYSTEM) != null && getServiceUsers().get(userId) != null; } /** * Returns a lst of users currently unlocked that have a * {@link UserBackupManagerService} registered. Loading
services/backup/java/com/android/server/backup/Trampoline.java +3 −4 Original line number Diff line number Diff line Loading @@ -202,11 +202,10 @@ public class Trampoline extends IBackupManager.Stub { } } // A user is ready for a backup if it's unlocked and is not suppressed by a device // admin (device owner or profile owner). // This method should not perform any I/O (e.g. do not call isBackupActivatedForUser), // it's used in multiple places where I/O waits would cause system lock-ups. private boolean isUserReadyForBackup(int userId) { return mService != null && mService.getServiceUsers().get(userId) != null && isBackupActivatedForUser(userId); return mService != null && mService.isAbleToServeUser(userId); } /** Loading