NPE fix
Bug: 23519922
Change-Id: I0178861da84d0ef8da78242a9c43ddbf386b9043
diff --git a/src/com/android/services/telephony/ConferenceParticipantConnection.java b/src/com/android/services/telephony/ConferenceParticipantConnection.java
index a2e3359..5406ab5 100644
--- a/src/com/android/services/telephony/ConferenceParticipantConnection.java
+++ b/src/com/android/services/telephony/ConferenceParticipantConnection.java
@@ -23,6 +23,7 @@
import android.telecom.ConferenceParticipant;
import android.telecom.DisconnectCause;
import android.telecom.PhoneAccount;
+import android.text.TextUtils;
/**
* Represents a participant in a conference call.
@@ -150,9 +151,12 @@
*/
private Uri getParticipantAddress(ConferenceParticipant participant) {
Uri address = participant.getHandle();
+ if (address == null) {
+ return address;
+ }
// If the participant's address is already a TEL scheme, just return it as is.
- if (address.getScheme().equals(PhoneAccount.SCHEME_TEL)) {
+ if (PhoneAccount.SCHEME_TEL.equals(address.getScheme())) {
return address;
}
@@ -169,8 +173,11 @@
// We can get the user field in these instances by splitting the string on the @, ;, or :
// and looking at the first found item.
String number = address.getSchemeSpecificPart();
- String numberParts[] = number.split("[@;:]");
+ if (TextUtils.isEmpty(number)) {
+ return address;
+ }
+ String numberParts[] = number.split("[@;:]");
if (numberParts.length == 0) {
return address;
}