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

Commit fde2d1b2 authored by Michael Webster's avatar Michael Webster
Browse files

Restore notification bar flashlight toggle using correct brightness

setting.

Change-Id: I5a35a4eb399d54613b782eac78ca1d1dad7cecf5
parent 1820ee92
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -37,6 +37,10 @@ public class FlashlightButton extends PowerButton {
    }

    public void toggleState(Context context) {
        boolean bright = Settings.System.getInt(context.getContentResolver(),
                Settings.System.EXPANDED_FLASH_MODE, 0) == 1;
        Intent i = new Intent("net.cactii.flash2.TOGGLE_FLASHLIGHT");
        i.putExtra("bright", bright);
        mContext.sendBroadcast(new Intent("net.cactii.flash2.TOGGLE_FLASHLIGHT"));
    }