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

Commit 783153c1 authored by Satoshi Niwa's avatar Satoshi Niwa
Browse files

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
parent 1f843d82
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