summaryrefslogtreecommitdiff
path: root/src
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 00:11:31 -0700
commit1dfa8ddc17a7f62f14d8435fd9712d1be0ebdf7e (patch)
treefb8418f9b5d2b6547013efebd7b292176abf496d /src
parent6720273a04f940de2b383128b7596f33d781f231 (diff)
Fix NPE during activity recreation
Bug: 13630676 Change-Id: I3b68d5f21a4b77eab5b5493dcde670ad08cdc372
Diffstat (limited to 'src')
-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 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