Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e68c01f7 authored by Satoshi Niwa's avatar Satoshi Niwa
Browse files

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
parent d9806f11
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment