Replace CallServiceSelectors with Subscriptions (2/3)
Remove CallServiceSelectors and replace them with comprehensive
support for Subscriptions as the means of selecting ways of making
phone calls. After this change, a ConnectionService is not a
semantically meaningful "way of making a call" -- it's more like the
mechanism whereby the Android system communicates with a 3rd party
process to ask for phone services. We anticipate each process having
only one ConnectionService.
Change-Id: I11258709b014d2fd3eed98a521227c200027018f
diff --git a/src/com/android/telecomm/TelephonyUtil.java b/src/com/android/telecomm/TelephonyUtil.java
index 4ea46d9..a8cfb3e 100644
--- a/src/com/android/telecomm/TelephonyUtil.java
+++ b/src/com/android/telecomm/TelephonyUtil.java
@@ -31,24 +31,16 @@
private static final String TELEPHONY_PACKAGE_NAME =
"com.android.phone";
- private static final String GSM_CALL_SERVICE_CLASS_NAME =
- "com.android.services.telephony.GsmConnectionService";
-
- private static final String CDMA_CALL_SERVICE_CLASS_NAME =
- "com.android.services.telephony.CdmaConnectionService";
+ private static final String PSTN_CALL_SERVICE_CLASS_NAME =
+ "com.android.services.telephony.PstnConnectionService";
private TelephonyUtil() {}
- static boolean isTelephonySelector(CallServiceSelectorWrapper selector) {
- return selector.getComponentName().getPackageName().equals(TELEPHONY_PACKAGE_NAME);
- }
-
static boolean isPstnCallService(CallServiceDescriptor descriptor) {
ComponentName componentName = descriptor.getServiceComponent();
if (TELEPHONY_PACKAGE_NAME.equals(componentName.getPackageName())) {
String className = componentName.getClassName();
- return GSM_CALL_SERVICE_CLASS_NAME.equals(className) ||
- CDMA_CALL_SERVICE_CLASS_NAME.equals(className);
+ return PSTN_CALL_SERVICE_CLASS_NAME.equals(className);
}
return false;
@@ -60,8 +52,7 @@
*/
static boolean isCurrentlyPSTNCall(Call call) {
if (Log.DEBUG) {
- verifyCallServiceExists(GSM_CALL_SERVICE_CLASS_NAME);
- verifyCallServiceExists(CDMA_CALL_SERVICE_CLASS_NAME);
+ verifyCallServiceExists(PSTN_CALL_SERVICE_CLASS_NAME);
}
CallServiceWrapper callService = call.getCallService();