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

Commit 3266f612 authored by Jason Monk's avatar Jason Monk
Browse files

QS: Allow Flashlight Tile to handle reset state

Bug: 22815987
Change-Id: I3c22760c546c5407495e1e8f09dc402a56817f9d
parent 5d6a2d38
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -79,6 +79,8 @@ public class FlashlightTile extends QSTile<QSTile.BooleanState> implements
                return;
            }
            state.value = value;
        } else {
            state.value = mFlashlightController.isEnabled();
        }
        final AnimationIcon icon = state.value ? mEnable : mDisable;
        icon.setAllowAnimation(arg instanceof UserBoolean && ((UserBoolean) arg).userInitiated);
+4 −0
Original line number Diff line number Diff line
@@ -93,6 +93,10 @@ public class FlashlightController {
        }
    }

    public synchronized boolean isEnabled() {
        return mFlashlightEnabled;
    }

    public synchronized boolean isAvailable() {
        return mTorchAvailable;
    }