diff options
author | Yorke Lee <yorkelee@google.com> | 2014-03-25 00:11:31 -0700 |
---|---|---|
committer | Yorke Lee <yorkelee@google.com> | 2014-03-25 07:13:23 +0000 |
commit | 5dba48f2c8e6ef39562f91b0c98ea9b845144590 (patch) | |
tree | c929ab349eeb68a3932af95afd814890021d919b | |
parent | 7fa4c759187108af122f071944faf5aaeec0f98d (diff) |
DO NOT MERGE Fix NPE during activity recreation
Bug: 13630676
Change-Id: I3b68d5f21a4b77eab5b5493dcde670ad08cdc372
-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 ade519932..b78a7bc62 100644 --- a/src/com/android/dialer/DialtactsActivity.java +++ b/src/com/android/dialer/DialtactsActivity.java @@ -1008,7 +1008,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 d25ffefde..83cfbd856 100644 --- a/src/com/android/dialer/dialpad/DialpadFragment.java +++ b/src/com/android/dialer/dialpad/DialpadFragment.java @@ -1563,6 +1563,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 |