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

Unverified Commit 8718f0e0 authored by Dan Pasanen's avatar Dan Pasanen Committed by Kevin F. Haggerty
Browse files

qs: tiles: fix adb over network tile after aaba8ef2

Change-Id: I4932a3e023a40e362e81fd74f2921e9cb472ebf3
parent 80d8b646
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ import com.android.systemui.plugins.qs.QSTile.BooleanState;
import com.android.systemui.qs.QSHost;
import com.android.systemui.qs.tileimpl.QSTileImpl;
import com.android.systemui.R;
import com.android.systemui.statusbar.phone.UnlockMethodCache;
import com.android.systemui.statusbar.policy.KeyguardMonitor;

import lineageos.providers.LineageSettings;
@@ -52,6 +53,7 @@ public class AdbOverNetworkTile extends QSTileImpl<BooleanState> {
    private boolean mListening;
    private final KeyguardMonitor mKeyguardMonitor;
    private final KeyguardMonitorCallback mKeyguardCallback = new KeyguardMonitorCallback();
    private final UnlockMethodCache mUnlockMethodCache;

    private final ConnectivityManager mConnectivityManager;

@@ -65,6 +67,7 @@ public class AdbOverNetworkTile extends QSTileImpl<BooleanState> {
        super(host);
        mKeyguardMonitor = Dependency.get(KeyguardMonitor.class);
        mConnectivityManager = mContext.getSystemService(ConnectivityManager.class);
        mUnlockMethodCache = UnlockMethodCache.getInstance(mHost.getContext());
    }

    @Override
@@ -74,7 +77,7 @@ public class AdbOverNetworkTile extends QSTileImpl<BooleanState> {

    @Override
    protected void handleClick() {
        if (mKeyguardMonitor.isSecure() && !mKeyguardMonitor.canSkipBouncer()) {
        if (mKeyguardMonitor.isSecure() && !mUnlockMethodCache.canSkipBouncer()) {
            Dependency.get(ActivityStarter.class)
                    .postQSRunnableDismissingKeyguard(this::toggleAction);
        } else {