File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
policy/src/com/android/internal/policy/impl/keyguard Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 3333import android .content .res .Resources ;
3434import android .graphics .Canvas ;
3535import android .os .UserManager ;
36- import android .telephony .TelephonyManager ;
3736import android .util .AttributeSet ;
3837import android .util .Log ;
3938import android .util .Slog ;
4241import android .view .View ;
4342import android .view .WindowManager ;
4443import android .view .animation .AnimationUtils ;
45- import android .widget .Button ;
4644import android .widget .RemoteViews .OnClickHandler ;
4745import android .widget .ViewFlipper ;
4846
5149import com .android .internal .widget .LockPatternUtils ;
5250
5351import java .io .File ;
54- import java .util .ArrayList ;
5552import java .util .List ;
5653
5754public class KeyguardHostView extends KeyguardViewBase {
@@ -202,6 +199,17 @@ private void showDialog(String title, String message) {
202199 dialog .show ();
203200 }
204201
202+ @ Override
203+ public boolean dispatchKeyEvent (KeyEvent event ) {
204+ if (event .getAction () == KeyEvent .ACTION_UP
205+ && event .getKeyCode () == KeyEvent .KEYCODE_BACK
206+ && mCurrentSecuritySelection != SecurityMode .None ) {
207+ mCallback .dismiss (false );
208+ return true ;
209+ }
210+ return super .dispatchKeyEvent (event );
211+ }
212+
205213 private void showTimeoutDialog () {
206214 int timeoutInSeconds = (int ) LockPatternUtils .FAILED_ATTEMPT_TIMEOUT_MS / 1000 ;
207215 int messageId = 0 ;
You can’t perform that action at this time.
0 commit comments