Loading core/java/android/app/KeyguardManager.java +3 −1 Original line number Diff line number Diff line Loading @@ -205,8 +205,10 @@ public class KeyguardManager { try { mWM.exitKeyguardSecurely(new IOnKeyguardExitResult.Stub() { public void onKeyguardExitResult(boolean success) throws RemoteException { if (callback != null) { callback.onKeyguardExitResult(success); } } }); } catch (RemoteException e) { Loading packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +6 −9 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ package com.android.systemui.statusbar; import android.app.ActivityManager; import android.app.ActivityManagerNative; import android.app.KeyguardManager; import android.app.Notification; import android.app.PendingIntent; import android.app.TaskStackBuilder; Loading Loading @@ -70,6 +69,7 @@ import com.android.systemui.R; import com.android.systemui.RecentsComponent; import com.android.systemui.SearchPanelView; import com.android.systemui.SystemUI; import com.android.systemui.statusbar.phone.KeyguardTouchDelegate; import com.android.systemui.statusbar.policy.NotificationRowLayout; import java.util.ArrayList; Loading Loading @@ -128,7 +128,6 @@ public abstract class BaseStatusBar extends SystemUI implements protected boolean mUseHeadsUp = false; protected IDreamManager mDreamManager; KeyguardManager mKeyguardManager; PowerManager mPowerManager; protected int mRowHeight; Loading Loading @@ -221,7 +220,6 @@ public abstract class BaseStatusBar extends SystemUI implements mDreamManager = IDreamManager.Stub.asInterface( ServiceManager.checkService(DreamService.DREAM_SERVICE)); mKeyguardManager = (KeyguardManager) mContext.getSystemService(Context.KEYGUARD_SERVICE); mPowerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE); mProvisioningObserver.onChange(false); // set up Loading Loading @@ -749,9 +747,7 @@ public abstract class BaseStatusBar extends SystemUI implements Log.w(TAG, "Sending contentIntent failed: " + e); } KeyguardManager kgm = (KeyguardManager) mContext.getSystemService(Context.KEYGUARD_SERVICE); if (kgm != null) kgm.exitKeyguardSecurely(null); KeyguardTouchDelegate.getInstance(mContext).dismiss(); } try { Loading Loading @@ -1056,10 +1052,12 @@ public abstract class BaseStatusBar extends SystemUI implements boolean isAllowed = notification.extras.getInt(Notification.EXTRA_AS_HEADS_UP, Notification.HEADS_UP_ALLOWED) != Notification.HEADS_UP_NEVER; final KeyguardTouchDelegate keyguard = KeyguardTouchDelegate.getInstance(mContext); boolean interrupt = (isFullscreen || (isHighPriority && isNoisy)) && isAllowed && mPowerManager.isScreenOn() && !mKeyguardManager.isKeyguardLocked(); && !keyguard.isShowingAndNotHidden() && !keyguard.isInputRestricted(); try { interrupt = interrupt && !mDreamManager.isDreaming(); } catch (RemoteException e) { Loading Loading @@ -1087,8 +1085,7 @@ public abstract class BaseStatusBar extends SystemUI implements } public boolean inKeyguardRestrictedInputMode() { KeyguardManager km = (KeyguardManager) mContext.getSystemService(Context.KEYGUARD_SERVICE); return km.inKeyguardRestrictedInputMode(); return KeyguardTouchDelegate.getInstance(mContext).isInputRestricted(); } public void setInteracting(int barWindow, boolean interacting) { Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardTouchDelegate.java +19 −4 Original line number Diff line number Diff line Loading @@ -77,10 +77,11 @@ public class KeyguardTouchDelegate { } public static KeyguardTouchDelegate getInstance(Context context) { if (sInstance == null) { sInstance = new KeyguardTouchDelegate(context); KeyguardTouchDelegate instance = sInstance; if (instance == null) { instance = sInstance = new KeyguardTouchDelegate(context); } return sInstance; return instance; } public boolean isSecure() { Loading Loading @@ -165,7 +166,21 @@ public class KeyguardTouchDelegate { Slog.e(TAG, "RemoteException launching camera!", e); } } else { Slog.w(TAG, "dispatch(event): NO SERVICE!"); Slog.w(TAG, "launchCamera(): NO SERVICE!"); } } public void dismiss() { final IKeyguardService service = mService; if (service != null) { try { service.dismiss(); } catch (RemoteException e) { // What to do? Slog.e(TAG, "RemoteException dismissing keyguard!", e); } } else { Slog.w(TAG, "dismiss(): NO SERVICE!"); } } Loading Loading
core/java/android/app/KeyguardManager.java +3 −1 Original line number Diff line number Diff line Loading @@ -205,8 +205,10 @@ public class KeyguardManager { try { mWM.exitKeyguardSecurely(new IOnKeyguardExitResult.Stub() { public void onKeyguardExitResult(boolean success) throws RemoteException { if (callback != null) { callback.onKeyguardExitResult(success); } } }); } catch (RemoteException e) { Loading
packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +6 −9 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ package com.android.systemui.statusbar; import android.app.ActivityManager; import android.app.ActivityManagerNative; import android.app.KeyguardManager; import android.app.Notification; import android.app.PendingIntent; import android.app.TaskStackBuilder; Loading Loading @@ -70,6 +69,7 @@ import com.android.systemui.R; import com.android.systemui.RecentsComponent; import com.android.systemui.SearchPanelView; import com.android.systemui.SystemUI; import com.android.systemui.statusbar.phone.KeyguardTouchDelegate; import com.android.systemui.statusbar.policy.NotificationRowLayout; import java.util.ArrayList; Loading Loading @@ -128,7 +128,6 @@ public abstract class BaseStatusBar extends SystemUI implements protected boolean mUseHeadsUp = false; protected IDreamManager mDreamManager; KeyguardManager mKeyguardManager; PowerManager mPowerManager; protected int mRowHeight; Loading Loading @@ -221,7 +220,6 @@ public abstract class BaseStatusBar extends SystemUI implements mDreamManager = IDreamManager.Stub.asInterface( ServiceManager.checkService(DreamService.DREAM_SERVICE)); mKeyguardManager = (KeyguardManager) mContext.getSystemService(Context.KEYGUARD_SERVICE); mPowerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE); mProvisioningObserver.onChange(false); // set up Loading Loading @@ -749,9 +747,7 @@ public abstract class BaseStatusBar extends SystemUI implements Log.w(TAG, "Sending contentIntent failed: " + e); } KeyguardManager kgm = (KeyguardManager) mContext.getSystemService(Context.KEYGUARD_SERVICE); if (kgm != null) kgm.exitKeyguardSecurely(null); KeyguardTouchDelegate.getInstance(mContext).dismiss(); } try { Loading Loading @@ -1056,10 +1052,12 @@ public abstract class BaseStatusBar extends SystemUI implements boolean isAllowed = notification.extras.getInt(Notification.EXTRA_AS_HEADS_UP, Notification.HEADS_UP_ALLOWED) != Notification.HEADS_UP_NEVER; final KeyguardTouchDelegate keyguard = KeyguardTouchDelegate.getInstance(mContext); boolean interrupt = (isFullscreen || (isHighPriority && isNoisy)) && isAllowed && mPowerManager.isScreenOn() && !mKeyguardManager.isKeyguardLocked(); && !keyguard.isShowingAndNotHidden() && !keyguard.isInputRestricted(); try { interrupt = interrupt && !mDreamManager.isDreaming(); } catch (RemoteException e) { Loading Loading @@ -1087,8 +1085,7 @@ public abstract class BaseStatusBar extends SystemUI implements } public boolean inKeyguardRestrictedInputMode() { KeyguardManager km = (KeyguardManager) mContext.getSystemService(Context.KEYGUARD_SERVICE); return km.inKeyguardRestrictedInputMode(); return KeyguardTouchDelegate.getInstance(mContext).isInputRestricted(); } public void setInteracting(int barWindow, boolean interacting) { Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardTouchDelegate.java +19 −4 Original line number Diff line number Diff line Loading @@ -77,10 +77,11 @@ public class KeyguardTouchDelegate { } public static KeyguardTouchDelegate getInstance(Context context) { if (sInstance == null) { sInstance = new KeyguardTouchDelegate(context); KeyguardTouchDelegate instance = sInstance; if (instance == null) { instance = sInstance = new KeyguardTouchDelegate(context); } return sInstance; return instance; } public boolean isSecure() { Loading Loading @@ -165,7 +166,21 @@ public class KeyguardTouchDelegate { Slog.e(TAG, "RemoteException launching camera!", e); } } else { Slog.w(TAG, "dispatch(event): NO SERVICE!"); Slog.w(TAG, "launchCamera(): NO SERVICE!"); } } public void dismiss() { final IKeyguardService service = mService; if (service != null) { try { service.dismiss(); } catch (RemoteException e) { // What to do? Slog.e(TAG, "RemoteException dismissing keyguard!", e); } } else { Slog.w(TAG, "dismiss(): NO SERVICE!"); } } Loading