summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCassie Wang <cassieyw@google.com>2019-09-26 13:51:16 -0700
committerandroid-build-merger <android-build-merger@google.com>2019-09-26 13:51:16 -0700
commit7fc842a194e45ab77c593759dffda0a2c9aa53fa (patch)
tree68a1bec9a3828904c0d403227c4c36e4fa7a613d
parent57224ead57e46edaa5b320b2631977d93d9fb30c (diff)
parent1019bfa5e840acf0ee1dd52db0eb820a3344808e (diff)
downloadDialer-7fc842a194e45ab77c593759dffda0a2c9aa53fa.tar.gz
Merge "Check callStateView for null" into pi-car-dev am: 630b40de01 am: 453cea5a70 am: 55e74180a7
am: 1019bfa5e8 Change-Id: I623d45e63aae8657650443c1db0666919e497e59
-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("");