Only try disabling quiet mode
The underlying API has slightly changed to require the profile challenge if the profile that we're trying to enable hasn't been unlocked yet. Bug: 27764124 Change-Id: I9efb3d3ed49034b573abb4c18119ffadcccfe947
This commit is contained in:
@@ -251,7 +251,11 @@ public class AccountSettings extends SettingsPreferenceFragment
|
||||
ProfileData profileData = mProfiles.valueAt(i);
|
||||
if (preference == profileData.workModeSwitch) {
|
||||
final int userId = profileData.userInfo.id;
|
||||
mUm.setQuietModeEnabled(userId, !((boolean) newValue));
|
||||
if ((boolean) newValue) {
|
||||
mUm.trySetQuietModeDisabled(userId, null);
|
||||
} else {
|
||||
mUm.setQuietModeEnabled(userId, true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user