Check 'number' against both empty and null string for handleCdmaCallWaiting
The new RIL in O changes all null strings to empty strings, but the code
only checks 'number' against null for handleCdmaCallWaiting. This CL adds
the check against both empty and null strings.
Test: TreeHugger
Bug: 62490549
Change-Id: I9f4f577c40bcd5caa2a9bb1fd4c9e9c4c27e318c
diff --git a/src/com/android/services/telephony/PstnIncomingCallNotifier.java b/src/com/android/services/telephony/PstnIncomingCallNotifier.java
index 72b659e..381c131 100644
--- a/src/com/android/services/telephony/PstnIncomingCallNotifier.java
+++ b/src/com/android/services/telephony/PstnIncomingCallNotifier.java
@@ -139,7 +139,7 @@
Connection connection = call.getLatestConnection();
if (connection != null) {
String number = connection.getAddress();
- if (number != null && Objects.equals(number, ccwi.number)) {
+ if (!TextUtils.isEmpty(number) && Objects.equals(number, ccwi.number)) {
sendIncomingCallIntent(connection);
}
}