start/stop in-call UI on demand
This change severs the connection to the in-call UI whenever there is no
active call. When we get a new call, we attempt to the bind to the
UI service. Whenever we lose/disconnect a call, we see if there are any calls
left and if not, unbind from the UI service.
Changes:
- Add explicit component name to config.xml and use them when binding to
the UI service.
- onUpdate and onIncomingCall in CAllHandlerServiceProxy now make a call
to maybeBindToService() in case the service requires binding.
- onDisconnect calls maybeUnbind() after a disconnect.
- add cleanup of current binding to onServiceDisconnect(). Also attempt
to rebind if there are still active calls.
bug: 10363682
Change-Id: I7ddbb33fde7e3b03c1f1ea759d174cb03baabc76
diff --git a/res/values/config.xml b/res/values/config.xml
index 9b3602e..f1374fd 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -119,4 +119,10 @@
<bool name="config_apn_expand" translatable="false">true</bool>
<bool name="config_operator_selection_expand" translatable="false">true</bool>
<bool name="config_prefer_2g" translatable="false">true</bool>
+
+ <!-- Package name for the default in-call UI Service [DO NOT TRANSLATE] -->
+ <string name="incall_ui_default_package" translatable="false">com.android.incallui</string>
+
+ <!-- Class name for the default in-call UI Service [DO NOT TRANSLATE] -->
+ <string name="incall_ui_default_class" translatable="false">com.android.incallui.CallHandlerService</string>
</resources>