Fix NullPointerException in supp service notify handler.
The TelephonyConnection handler for supp service notifications outputs
a log message which includes the phone ID. I've seen an instance where
the phone is null, causing a crash.
Test: Manual
Bug: 62202366
Change-Id: I355b08b130413450cbf37bb8c7f87a2a894a5fe4
diff --git a/src/com/android/services/telephony/TelephonyConnection.java b/src/com/android/services/telephony/TelephonyConnection.java
index 9ac40fd..f7ceb2e 100644
--- a/src/com/android/services/telephony/TelephonyConnection.java
+++ b/src/com/android/services/telephony/TelephonyConnection.java
@@ -152,7 +152,8 @@
break;
case MSG_SUPP_SERVICE_NOTIFY:
Log.v(TelephonyConnection.this, "MSG_SUPP_SERVICE_NOTIFY on phoneId : "
- +getPhone().getPhoneId());
+ + getPhone() != null ? Integer.toString(getPhone().getPhoneId())
+ : "null");
SuppServiceNotification mSsNotification = null;
if (msg.obj != null && ((AsyncResult) msg.obj).result != null) {
mSsNotification =