Merge "Prevent NPE when device has no UI InCallService" into main
diff --git a/src/com/android/server/telecom/InCallController.java b/src/com/android/server/telecom/InCallController.java
index ad3d26a..4ad5f3b 100644
--- a/src/com/android/server/telecom/InCallController.java
+++ b/src/com/android/server/telecom/InCallController.java
@@ -1932,7 +1932,8 @@
// Actually try binding to the UI InCallService.
if (inCallServiceConnection.connect(call) ==
- InCallServiceConnection.CONNECTION_SUCCEEDED || call.isSelfManaged()) {
+ InCallServiceConnection.CONNECTION_SUCCEEDED || (call != null
+ && call.isSelfManaged())) {
// Only connect to the non-ui InCallServices if we actually connected to the main UI
// one, or if the call is self-managed (in which case we'd still want to keep Wear, BT,
// etc. informed.