Merge "Only try disabling quiet mode" into nyc-dev am: 89726fd
am: e4a793f
* commit 'e4a793f02d44f371ac465a0fc928f1bcf50dd642':
Only try disabling quiet mode
Change-Id: I971956822a2d874180311d78fa163faacb804773
This commit is contained in:
@@ -251,7 +251,11 @@ public class AccountSettings extends SettingsPreferenceFragment
|
|||||||
ProfileData profileData = mProfiles.valueAt(i);
|
ProfileData profileData = mProfiles.valueAt(i);
|
||||||
if (preference == profileData.workModeSwitch) {
|
if (preference == profileData.workModeSwitch) {
|
||||||
final int userId = profileData.userInfo.id;
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -90,7 +90,7 @@ public class WorkModeCondition extends Condition {
|
|||||||
@Override
|
@Override
|
||||||
public void onActionClick(int index) {
|
public void onActionClick(int index) {
|
||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
mUm.setQuietModeEnabled(mUserHandle.getIdentifier(), false);
|
mUm.trySetQuietModeDisabled(mUserHandle.getIdentifier(), null);
|
||||||
setActive(false);
|
setActive(false);
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("Unexpected index " + index);
|
throw new IllegalArgumentException("Unexpected index " + index);
|
||||||
|
Reference in New Issue
Block a user