diff options
author | Jorge Ruesga <jorge@ruesga.com> | 2013-09-01 01:48:50 +0200 |
---|---|---|
committer | Jorge Ruesga <jorge@ruesga.com> | 2013-09-01 01:48:50 +0200 |
commit | 3f64f6260db491e23a6cdc7a330f5b1dbc9a7b49 (patch) | |
tree | 8cbe8d2b98a21f0c898f7ac54c5281f4d62f7158 /packages | |
parent | 618b2bd792615af012cef0a2c98de8ce9410b44d (diff) | |
download | frameworks_base-3f64f6260db491e23a6cdc7a330f5b1dbc9a7b49.zip frameworks_base-3f64f6260db491e23a6cdc7a330f5b1dbc9a7b49.tar.gz frameworks_base-3f64f6260db491e23a6cdc7a330f5b1dbc9a7b49.tar.bz2 |
PowerWidget: Dismiss unsecure keyguard on long tap
Change-Id: I88f5db97694b92007d44d32ff103793fafcdb067
JIRA: CYAN-1865
Issue: https://jira.cyanogenmod.org/browse/CYAN-1865
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Diffstat (limited to 'packages')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/powerwidget/PowerButton.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/powerwidget/PowerButton.java b/packages/SystemUI/src/com/android/systemui/statusbar/powerwidget/PowerButton.java index 2ff3161..7452a31 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/powerwidget/PowerButton.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/powerwidget/PowerButton.java @@ -1,6 +1,5 @@ package com.android.systemui.statusbar.powerwidget; -import android.app.ActivityManagerNative; import android.content.ContentResolver; import android.content.Context; import android.content.Intent; @@ -14,6 +13,7 @@ import android.os.RemoteException; import android.os.Vibrator; import android.text.TextUtils; import android.view.View; +import android.view.WindowManagerGlobal; import android.widget.ImageView; import com.android.systemui.R; @@ -168,9 +168,11 @@ public abstract class PowerButton { mVibrator.vibrate(mLongClickPattern, -1); } - try { - ActivityManagerNative.getDefault().dismissKeyguardOnNextActivity(); - } catch (RemoteException e) { + if (result) { + try { + WindowManagerGlobal.getWindowManagerService().dismissKeyguard(); + } catch (RemoteException e) { + } } if (result && mExternalLongClickListener != null) { |