summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCassie Wang <cassieyw@google.com>2019-09-26 13:31:43 -0700
committerandroid-build-merger <android-build-merger@google.com>2019-09-26 13:31:43 -0700
commit453cea5a70b4eb83ab8995ee26075347d5eab59f (patch)
treea636e7c7940904e610b560e989a782d2fb0de93f
parent64a6f3864c3960d7d210e97ad0be2605baa8716e (diff)
parent630b40de01d76e407afb681f3089a789758c04e4 (diff)
downloadDialer-453cea5a70b4eb83ab8995ee26075347d5eab59f.tar.gz
Merge "Check callStateView for null" into pi-car-dev
am: 630b40de01 Change-Id: I796a4138e26d02264e56e96903bf8323393c73f2
-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("");