Skip to content

Commit

Permalink
Merge "Don't crash if no ECA." into jb-mr1-lockscreen-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
dsandler authored and Android (Google) Code Review committed Nov 8, 2012
2 parents 7d59cf9 + b499b1f commit 9de5901
Showing 1 changed file with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,15 @@ protected void onFinishInflate() {
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);

Expand All @@ -148,6 +151,8 @@ public void onClick(View v) {
}

private void updateFooter(FooterMode mode) {
if (mForgotPatternButton == null) return; // no ECA? no footer

switch (mode) {
case Normal:
if (DEBUG) Log.d(TAG, "mode normal");
Expand Down

0 comments on commit 9de5901

Please sign in to comment.