Fix phone account comparison in Telecom dumpsys.
When telecom state is dumped prior to the user choosing a phone account,
the target phone account and delegate phone account are null, causing an
NPE.
Using Objects.equals fixes that. Derp.
Test: Manual testing using adb shell dumpsys telecom
Fixes: 160001860
Change-Id: I9bee724026f2484a63fb46331e72982a3e5f5a5b
diff --git a/src/com/android/server/telecom/Call.java b/src/com/android/server/telecom/Call.java
index df6322c..cd236d2 100755
--- a/src/com/android/server/telecom/Call.java
+++ b/src/com/android/server/telecom/Call.java
@@ -855,7 +855,7 @@
PhoneAccountHandle delegatePhoneAccountHandle = getDelegatePhoneAccountHandle();
boolean isTargetSameAsRemote = targetPhoneAccountHandle != null
&& targetPhoneAccountHandle.equals(remotePhoneAccountHandle);
- if (delegatePhoneAccountHandle.equals(targetPhoneAccountHandle)) {
+ if (Objects.equals(delegatePhoneAccountHandle, targetPhoneAccountHandle)) {
s.append(">>>");
}
s.append("Target");