summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCassie Wang <cassieyw@google.com>2019-09-26 13:44:45 -0700
committerandroid-build-merger <android-build-merger@google.com>2019-09-26 13:44:45 -0700
commitcd79ef2623878a6a18e54943f707f13b71e23218 (patch)
tree68a1bec9a3828904c0d403227c4c36e4fa7a613d
parent52ac394e76a4b130d5f60c085a0c19d1c2079826 (diff)
parent55e74180a727ad9cd23d503b2ec1a5f6e5f428e3 (diff)
downloadDialer-cd79ef2623878a6a18e54943f707f13b71e23218.tar.gz
Merge "Check callStateView for null" into pi-car-dev am: 630b40de01 am: 453cea5a70
am: 55e74180a7 Change-Id: Id0d49bcb3eb95b4f6cc19dc80edf9e20dfba265a
-rw-r--r--src/com/android/car/dialer/ui/dialpad/InCallDialpadFragment.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/android/car/dialer/ui/dialpad/InCallDialpadFragment.java b/src/com/android/car/dialer/ui/dialpad/InCallDialpadFragment.java
index 77e606a5..55af3a16 100644
--- a/src/com/android/car/dialer/ui/dialpad/InCallDialpadFragment.java
+++ b/src/com/android/car/dialer/ui/dialpad/InCallDialpadFragment.java
@@ -27,6 +27,7 @@ import android.widget.Chronometer;
import android.widget.TextView;
import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.ViewModelProviders;
@@ -40,6 +41,7 @@ public class InCallDialpadFragment extends AbstractDialpadFragment {
private static final String TAG = "CD.InCallDialpadFragment";
private TextView mTitleView;
+ @Nullable
private Chronometer mCallStateView;
/** An active call which this fragment is serving for. */
@@ -58,6 +60,10 @@ public class InCallDialpadFragment extends AbstractDialpadFragment {
InCallViewModel viewModel = ViewModelProviders.of(getActivity()).get(InCallViewModel.class);
viewModel.getCallStateAndConnectTime().observe(this, (pair) -> {
+ if (mCallStateView == null) {
+ return;
+ }
+
if (pair == null) {
mCallStateView.stop();
mCallStateView.setText("");