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:
Benjamin Franz
2016-04-05 14:37:17 +01:00
parent 1ec5f0965a
commit e00cd80a1e
2 changed files with 6 additions and 2 deletions

View File

@@ -90,7 +90,7 @@ public class WorkModeCondition extends Condition {
@Override
public void onActionClick(int index) {
if (index == 0) {
mUm.setQuietModeEnabled(mUserHandle.getIdentifier(), false);
mUm.trySetQuietModeDisabled(mUserHandle.getIdentifier(), null);
setActive(false);
} else {
throw new IllegalArgumentException("Unexpected index " + index);