Refactor main user logic for backup activation in BackupManagerService
- Removed the state variable `mDefaultBackupUserId`. - Modified `isDefaultBackupActiveUser()` to dynamically determine the correct default user based on the current mode (HSUM or not) and the *current* result of `UserManager.getMainUser()` - Introduced `mDidMainUserExistAtBoot` (boolean) to track if the main user was available during BMS construction. - Renamed `updateDefaultBackupUserIdIfNeeded()` to `stopServiceForSystemUserIfMainUserCreated()` to better reflect its purpose. Test: Existing unit tests in BackupManagerServiceTest pass Bug: 374830726 Bug: 406114361 Flag: EXEMPT refactoring Change-Id: I2f214437229b76a6cd38e3246ec9d2b39101ee5c
Loading
Please register or sign in to comment