summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2014-03-25 00:11:31 -0700
committerYorke Lee <yorkelee@google.com>2014-03-25 07:13:23 +0000
commit5dba48f2c8e6ef39562f91b0c98ea9b845144590 (patch)
treec929ab349eeb68a3932af95afd814890021d919b
parent7fa4c759187108af122f071944faf5aaeec0f98d (diff)
DO NOT MERGE Fix NPE during activity recreation
Bug: 13630676 Change-Id: I3b68d5f21a4b77eab5b5493dcde670ad08cdc372
-rw-r--r--src/com/android/dialer/DialtactsActivity.java4
-rw-r--r--src/com/android/dialer/dialpad/DialpadFragment.java3
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