From 3f64f6260db491e23a6cdc7a330f5b1dbc9a7b49 Mon Sep 17 00:00:00 2001 From: Jorge Ruesga Date: Sun, 1 Sep 2013 01:48:50 +0200 Subject: 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 --- .../android/systemui/statusbar/powerwidget/PowerButton.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'packages') 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) { -- cgit v1.1