diff options
author | Yorke Lee <yorkelee@google.com> | 2014-03-25 07:34:34 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-03-25 07:34:34 -0700 |
commit | 4f6ad71049a8f44dd3c022b2840e0f371dd58b57 (patch) | |
tree | d005f7092bdea7c123c548628286905850157b84 /src | |
parent | 7b9e8cfb8c361869f70dc4b63d0da7388251d850 (diff) | |
parent | 1dfa8ddc17a7f62f14d8435fd9712d1be0ebdf7e (diff) |
am 1dfa8ddc: Fix NPE during activity recreation
* commit '1dfa8ddc17a7f62f14d8435fd9712d1be0ebdf7e':
Fix NPE during activity recreation
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/dialer/DialtactsActivity.java | 4 | ||||
-rw-r--r-- | src/com/android/dialer/dialpad/DialpadFragment.java | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java index 363adda4a..32a22c9b4 100644 --- a/src/com/android/dialer/DialtactsActivity.java +++ b/src/com/android/dialer/DialtactsActivity.java @@ -970,7 +970,9 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O @Override public void setDialButtonEnabled(boolean enabled) { - mDialButton.setEnabled(enabled); + if (mDialButton != null) { + mDialButton.setEnabled(enabled); + } } @Override diff --git a/src/com/android/dialer/dialpad/DialpadFragment.java b/src/com/android/dialer/dialpad/DialpadFragment.java index 2d3c0ee32..36d5cf84b 100644 --- a/src/com/android/dialer/dialpad/DialpadFragment.java +++ b/src/com/android/dialer/dialpad/DialpadFragment.java @@ -1567,6 +1567,9 @@ public class DialpadFragment extends Fragment * Update the enabledness of the "Dial" and "Backspace" buttons if applicable. */ private void updateDialAndDeleteButtonEnabledState() { + if (getActivity() == null) { + return; + } final boolean digitsNotEmpty = !isDigitsEmpty(); mDelete.setEnabled(digitsNotEmpty); // On CDMA phones, if we're already on a call, we *always* enable the Dial button (since |