Fix an NPE found during CTS testing with setCallerInfo
No flag used here because this is an NPE only fix only
reported during CTS testing and can be included in QPR2
Fixes: 300736546
Test: atest CtsTelecomTestCases
Change-Id: Icd2f74a24c9d5760dcc653c5dc995f6973bdeee6
diff --git a/src/com/android/server/telecom/Call.java b/src/com/android/server/telecom/Call.java
index c5f78b5..d095522 100644
--- a/src/com/android/server/telecom/Call.java
+++ b/src/com/android/server/telecom/Call.java
@@ -3716,7 +3716,8 @@
}
String newName = callerInfo.getName();
- boolean contactNameChanged = mCallerInfo == null || !mCallerInfo.getName().equals(newName);
+ boolean contactNameChanged = mCallerInfo == null ||
+ !Objects.equals(mCallerInfo.getName(), newName);
mCallerInfo = callerInfo;
Log.i(this, "CallerInfo received for %s: %s", Log.piiHandle(mHandle), callerInfo);