Merge "Show "Backup service isn't active" if backup isnt active for work profile"

This commit is contained in:
Chandan Nath
2019-04-02 14:20:41 +00:00
committed by Android (Google) Code Review
3 changed files with 9 additions and 20 deletions

View File

@@ -639,10 +639,14 @@ public class SettingsActivity extends SettingsBaseActivity
showDev, isAdmin)
|| somethingChanged;
// Enable/disable backup settings depending on whether backup is activated for the user.
boolean isBackupActive = new BackupSettingsHelper(this).isBackupServiceActive();
// For profiles, we want them to be included in the profile select dialog even if
// backup is not activated.
// For other users, enable/disable backup settings depending on whether backup is activated
// for the user.
boolean enableBackupTile = um.isManagedProfile()
|| new BackupSettingsHelper(this).isBackupServiceActive();
somethingChanged = setTileEnabled(changedList, new ComponentName(packageName,
UserBackupSettingsActivity.class.getName()), isBackupActive, isAdmin)
UserBackupSettingsActivity.class.getName()), enableBackupTile, isAdmin)
|| somethingChanged;
somethingChanged = setTileEnabled(changedList, new ComponentName(packageName,