From 261ec767f30c3ed6300cd5668112cb114e05ba18 Mon Sep 17 00:00:00 2001 From: "longyu.huang" Date: Sun, 22 Mar 2015 21:14:58 -0700 Subject: [PATCH] third part apps can disable the secret lockscreen [Preconditions] set password or patten lockscreen [operating steps] 1.install the app (eg QQBrowser) and connected wifi 2.wait a while,the weather notification will shown on statusbar 3.turn off screen,the weather notification will shown on lockscreen too. 4.click the search bar in weather notification,it will disable lockscreen. 5.press HOME button or kill QQBrowser in Recent apps,you can operate the phone --- .../com/android/systemui/keyguard/KeyguardViewMediator.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java index e66934e5564f6..fae0643c2aefd 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java @@ -773,6 +773,11 @@ public class KeyguardViewMediator extends SystemUI { synchronized (this) { if (DEBUG) Log.d(TAG, "setKeyguardEnabled(" + enabled + ")"); + if (isSecure()) { + Log.d(TAG, "current mode is SecurityMode, ignore hide keyguard"); + return; + } + mExternallyEnabled = enabled; if (!enabled && mShowing) {