Merge "Show "Backup service isn't active" if backup isnt active for work profile"
This commit is contained in:
@@ -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,
|
||||
|
@@ -28,9 +28,6 @@ public class BackupInactivePreferenceController extends BasePreferenceController
|
||||
|
||||
@Override
|
||||
public int getAvailabilityStatus() {
|
||||
if (!PrivacySettingsUtils.isAdminUser(mContext)) {
|
||||
return DISABLED_FOR_USER;
|
||||
}
|
||||
if (PrivacySettingsUtils.isInvisibleKey(mContext, PrivacySettingsUtils.BACKUP_INACTIVE)) {
|
||||
return UNSUPPORTED_ON_DEVICE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user