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

Commit c1220445 authored by Jonas Rahlf's avatar Jonas Rahlf Committed by Gerrit Code Review
Browse files

Bypass the lockscreen when the hardware keyboard is slid out and security mode is 'none'

Change-Id: Ie40bb33ea46b7e68bad9916a0073cdf07a42ff93
parent 12f12ac8
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -61,6 +61,7 @@ import android.view.MotionEvent;
import android.view.View;
import android.view.ViewStub;
import android.view.WindowManager;
import android.view.WindowManagerPolicy;
import android.widget.RemoteViews.OnClickHandler;

import java.io.File;
@@ -314,6 +315,14 @@ public class KeyguardHostView extends KeyguardViewBase {
                }
            }
        }
        @Override
        public void onLidStateChanged(int newState){
            //when lid goes open and no security is set -> unlock device
            if(newState == WindowManagerPolicy.WindowManagerFuncs.LID_OPEN
                && mCurrentSecuritySelection == SecurityMode.None){
                dismiss();
            }
        }
    };

    private static final boolean isMusicPlaying(int playbackState) {