diff options
author | Jorim Jaggi <jjaggi@google.com> | 2014-04-16 21:58:54 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-04-16 21:58:54 +0000 |
commit | e4f49cdf2e7a8f896ccc19b0e7eb438f38eecfb0 (patch) | |
tree | 604af975d928051bfbce61935f5587d33652ad6f /packages/Keyguard | |
parent | 1befbab7ddb282b1d100e9895f674a519f8bd7f6 (diff) | |
parent | e0fa592afc163708d7707158ff76ee8148d90e79 (diff) | |
download | frameworks_base-e4f49cdf2e7a8f896ccc19b0e7eb438f38eecfb0.zip frameworks_base-e4f49cdf2e7a8f896ccc19b0e7eb438f38eecfb0.tar.gz frameworks_base-e4f49cdf2e7a8f896ccc19b0e7eb438f38eecfb0.tar.bz2 |
am e0fa592a: Merge "Show enter PIN/PUK before notifications on Keyguard."
* commit 'e0fa592afc163708d7707158ff76ee8148d90e79':
Show enter PIN/PUK before notifications on Keyguard.
Diffstat (limited to 'packages/Keyguard')
3 files changed, 13 insertions, 15 deletions
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardHostView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardHostView.java index 7cfd684..f85e29f 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardHostView.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardHostView.java @@ -22,10 +22,8 @@ import com.android.internal.widget.LockPatternUtils; import com.android.keyguard.KeyguardSecurityModel.SecurityMode; import com.android.keyguard.KeyguardUpdateMonitor.DisplayClientState; -import android.app.Activity; import android.app.ActivityManager; import android.app.ActivityOptions; -import android.app.SearchManager; import android.app.admin.DevicePolicyManager; import android.appwidget.AppWidgetHost; import android.appwidget.AppWidgetHostView; @@ -36,7 +34,6 @@ import android.content.Context; import android.content.Intent; import android.content.IntentSender; import android.content.pm.PackageManager.NameNotFoundException; -import android.content.pm.UserInfo; import android.content.res.Resources; import android.graphics.Rect; import android.media.RemoteControlClient; @@ -44,7 +41,6 @@ import android.os.Bundle; import android.os.Looper; import android.os.Parcel; import android.os.Parcelable; -import android.os.SystemClock; import android.os.UserHandle; import android.os.UserManager; import android.provider.Settings; @@ -55,9 +51,7 @@ import android.view.MotionEvent; import android.view.View; import android.widget.RemoteViews.OnClickHandler; -import java.io.File; import java.lang.ref.WeakReference; -import java.util.List; public class KeyguardHostView extends KeyguardViewBase { private static final String TAG = "KeyguardHostView"; @@ -595,16 +589,16 @@ public class KeyguardHostView extends KeyguardViewBase { }; @Override - public void onScreenTurnedOn() { - super.onScreenTurnedOn(); + public void onResume() { + super.onResume(); if (mViewStateManager != null) { mViewStateManager.showUsabilityHints(); } } @Override - public void onScreenTurnedOff() { - super.onScreenTurnedOff(); + public void onPause() { + super.onPause(); // We use mAppWidgetToShow to show a particular widget after you add it-- once the screen // turns off we reset that behavior clearAppWidgetToShow(); diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityModel.java b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityModel.java index da6482a..2d492db 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityModel.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityModel.java @@ -28,7 +28,7 @@ public class KeyguardSecurityModel { * The different types of security available for {@link Mode#UnlockScreen}. * @see com.android.internal.policy.impl.LockPatternKeyguardView#getUnlockMode() */ - enum SecurityMode { + public enum SecurityMode { Invalid, // NULL state None, // No security enabled Pattern, // Unlock by drawing a pattern. diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardViewBase.java b/packages/Keyguard/src/com/android/keyguard/KeyguardViewBase.java index bc0f364..d8e5b8a 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardViewBase.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardViewBase.java @@ -217,9 +217,9 @@ public abstract class KeyguardViewBase extends FrameLayout implements SecurityCa } /** - * Called when the screen turned off. + * Called when the Keyguard is not actively shown anymore on the screen. */ - public void onScreenTurnedOff() { + public void onPause() { if (DEBUG) Log.d(TAG, String.format("screen off, instance %s at %s", Integer.toHexString(hashCode()), SystemClock.uptimeMillis())); // Once the screen turns off, we no longer consider this to be first boot and we want the @@ -231,9 +231,9 @@ public abstract class KeyguardViewBase extends FrameLayout implements SecurityCa } /** - * Called when the screen turned on. + * Called when the Keyguard is actively shown on the screen. */ - public void onScreenTurnedOn() { + public void onResume() { if (DEBUG) Log.d(TAG, "screen on, instance " + Integer.toHexString(hashCode())); mSecurityContainer.showPrimarySecurityScreen(false); mSecurityContainer.onResume(KeyguardSecurityView.SCREEN_ON); @@ -476,6 +476,10 @@ public abstract class KeyguardViewBase extends FrameLayout implements SecurityCa mSecurityContainer.setLockPatternUtils(utils); } + public SecurityMode getSecurityMode() { + return mSecurityContainer.getSecurityMode(); + } + protected abstract void onUserSwitching(boolean switching); protected abstract void onCreateOptions(Bundle options); |