diff options
author | Yorke Lee <yorkelee@google.com> | 2015-05-15 17:58:14 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-05-15 17:58:22 +0000 |
commit | 4c9a8cf050defaf1bb48a8005fd609c21bbfbc21 (patch) | |
tree | 4a44620914e6829f43ba357946f478b01545bc61 /src | |
parent | 6ed11569195e1a267aacd14b5464f73f3578f738 (diff) | |
parent | 791b488fb8f835bb7976cb1f839a0b3ccf04132c (diff) |
Merge "Fix potential Dialer NPEs" into mnc-dev
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/dialer/DialtactsActivity.java | 2 | ||||
-rw-r--r-- | src/com/android/dialer/dialpad/DialpadFragment.java | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java index 25828e596..56d5ad171 100644 --- a/src/com/android/dialer/DialtactsActivity.java +++ b/src/com/android/dialer/DialtactsActivity.java @@ -721,7 +721,7 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O * @see #commitDialpadFragmentHide */ public void hideDialpadFragment(boolean animate, boolean clearDialpad) { - if (mDialpadFragment == null) { + if (mDialpadFragment == null || mDialpadFragment.getView() == null) { return; } if (clearDialpad) { diff --git a/src/com/android/dialer/dialpad/DialpadFragment.java b/src/com/android/dialer/dialpad/DialpadFragment.java index a1ba15087..8d27c143b 100644 --- a/src/com/android/dialer/dialpad/DialpadFragment.java +++ b/src/com/android/dialer/dialpad/DialpadFragment.java @@ -1107,7 +1107,9 @@ public class DialpadFragment extends Fragment } public void clearDialpad() { - mDigits.getText().clear(); + if (mDigits != null) { + mDigits.getText().clear(); + } } private void handleDialButtonClickWithEmptyDigits() { |