diff options
| author | 2012-11-08 15:58:48 -0800 | |
|---|---|---|
| committer | 2012-11-08 15:58:48 -0800 | |
| commit | 0e4d6de103d36f46a3839021808dcbfc1a536fd3 (patch) | |
| tree | 2113494146ee8c903beef7e3d9cb7f0f44e284dd | |
| parent | b063e7b6345bea6ceed7e30a79cc4deff6b07ce6 (diff) | |
| parent | 77f2e27e68a851b5cec13e724645972df663d397 (diff) | |
am 77f2e27e: am 9b15f2e5: am 82b18e8d: am 9de5901b: Merge "Don\'t crash if no ECA." into jb-mr1-lockscreen-dev
* commit '77f2e27e68a851b5cec13e724645972df663d397':
Don't crash if no ECA.
| -rw-r--r-- | policy/src/com/android/internal/policy/impl/keyguard/KeyguardPatternView.java | 17 |
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"); |