Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 31678f14 authored by Jason Monk's avatar Jason Monk
Browse files

Protect against work conditional crash

Change-Id: Iba6e7281c622e3ba34fa6bd4672b2380b0329808
Fixes: 30014085
parent 62edbf48
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -90,7 +90,9 @@ public class WorkModeCondition extends Condition {
    @Override
    public void onActionClick(int index) {
        if (index == 0) {
            if (mUserHandle != null) {
                mUm.trySetQuietModeDisabled(mUserHandle.getIdentifier(), null);
            }
            setActive(false);
        } else {
            throw new IllegalArgumentException("Unexpected index " + index);