summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Sandler <dsandler@android.com>2012-11-08 09:48:28 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-11-08 09:48:46 -0800
commit9de5901bb37ad2a42d334405f41e629fa29dfd46 (patch)
tree3bfd28015831b923ce5fb0d439b8154e4eaa660c
parent7d59cf9f10c38a020c7104e3bd5b358ab2144ab5 (diff)
parentb499b1fa082147ad37e1211f32210b44bdbc0750 (diff)
downloadbase-9de5901bb37ad2a42d334405f41e629fa29dfd46.tar.gz
Merge "Don't crash if no ECA." into jb-mr1-lockscreen-dev
-rw-r--r--policy/src/com/android/internal/policy/impl/keyguard/KeyguardPatternView.java17
1 files changed, 11 insertions, 6 deletions
diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardPatternView.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardPatternView.java
index 67469d914325..e114b78bac2a 100644
--- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardPatternView.java
+++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardPatternView.java
@@ -129,12 +129,15 @@ public class KeyguardPatternView extends LinearLayout implements KeyguardSecurit
mLockPatternView.setTactileFeedbackEnabled(mLockPatternUtils.isTactileFeedbackEnabled());
mForgotPatternButton = (Button) findViewById(R.id.forgot_password_button);
- mForgotPatternButton.setText(R.string.kg_forgot_pattern_button_text);
- mForgotPatternButton.setOnClickListener(new OnClickListener() {
- public void onClick(View v) {
- mCallback.showBackupSecurity();
- }
- });
+ // note: some configurations don't have an emergency call area
+ if (mForgotPatternButton != null) {
+ mForgotPatternButton.setText(R.string.kg_forgot_pattern_button_text);
+ mForgotPatternButton.setOnClickListener(new OnClickListener() {
+ public void onClick(View v) {
+ mCallback.showBackupSecurity();
+ }
+ });
+ }
setFocusableInTouchMode(true);
@@ -148,6 +151,8 @@ public class KeyguardPatternView extends LinearLayout implements KeyguardSecurit
}
private void updateFooter(FooterMode mode) {
+ if (mForgotPatternButton == null) return; // no ECA? no footer
+
switch (mode) {
case Normal:
if (DEBUG) Log.d(TAG, "mode normal");