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

Commit 087270db authored by Guang Zhu's avatar Guang Zhu Committed by Android Git Automerger
Browse files

am e48b12c4: am 5115b590: Merge "disable flashlight for monkey tests" into lmp-dev

* commit 'e48b12c4c377cfcaebf603f2620349f1e681bcab':
  disable flashlight for monkey tests
parents 0e3b02b7 c7db5d0b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import com.android.systemui.qs.QSTile;
import com.android.systemui.qs.SecureSetting;
import com.android.systemui.statusbar.policy.FlashlightController;

import android.app.ActivityManager;
import android.os.Handler;
import android.os.Looper;
import android.provider.Settings.Secure;
@@ -52,6 +53,9 @@ public class FlashlightTile extends QSTile<QSTile.BooleanState> implements

    @Override
    protected void handleClick() {
        if (ActivityManager.isUserAMonkey()) {
            return;
        }
        boolean newState = !mState.value;
        mFlashlightController.setFlashlight(newState);
        refreshState(newState);