Protect against work conditional crash
Change-Id: Iba6e7281c622e3ba34fa6bd4672b2380b0329808 Fixes: 30014085
This commit is contained in:
@@ -90,7 +90,9 @@ public class WorkModeCondition extends Condition {
|
||||
@Override
|
||||
public void onActionClick(int index) {
|
||||
if (index == 0) {
|
||||
mUm.trySetQuietModeDisabled(mUserHandle.getIdentifier(), null);
|
||||
if (mUserHandle != null) {
|
||||
mUm.trySetQuietModeDisabled(mUserHandle.getIdentifier(), null);
|
||||
}
|
||||
setActive(false);
|
||||
} else {
|
||||
throw new IllegalArgumentException("Unexpected index " + index);
|
||||
|
Reference in New Issue
Block a user