BackupManagerService: Fix global backup toggle to restart user services
When the backup service is disabled and then re-enabled globally (e.g., by setting and then clearing a device owner), the per-user backup services were not being correctly restarted. This was because the re-enabling logic in setBackupServiceActive relied on an internal list of started users `mStartedUsers` which had been cleared when the service was disabled. This change corrects the logic to query the UserManager for a fresh list of running users when re-enabling the backup service globally. This ensures that UserBackupManagerService is properly started for all active users, restoring their backup transports. Flag: EXEMPT bug fix Test: atest BackupManagerServiceTest Test: `bmgr --user 10 list transports` retruns transports after running CtsSettingsHostTestCases Bug: 410104126 Change-Id: I7e602df99bc397e36e4595b65ff1b3ec024ad0e6
Loading
Please register or sign in to comment