Remove CallServiceProvider and CallServiceDescript: Impl do not merge
This CL removes usage CallServiceProvider. Instead
ConnectionServiceRepository uses package manager to look up
all ConnectionService implementations.
Everywhere we used CallServiceDescriptors has now been
replaced by ComponentNames.
Change-Id: I2e40c5c64c0d242dc41b680943d7e9209142db5b
(cherry picked from commit 10e6050b2186650fbc18b0aa62b2e7d74e0aa80a)
diff --git a/src/com/android/telecomm/TelephonyUtil.java b/src/com/android/telecomm/TelephonyUtil.java
index 783b427..ac19525 100644
--- a/src/com/android/telecomm/TelephonyUtil.java
+++ b/src/com/android/telecomm/TelephonyUtil.java
@@ -19,7 +19,7 @@
import android.content.ComponentName;
import android.content.pm.PackageManager;
import android.content.pm.ServiceInfo;
-import android.telecomm.CallServiceDescriptor;
+import android.telecomm.PhoneAccount;
/**
* Utilities to deal with the system telephony services. The system telephony services are treated
@@ -35,26 +35,10 @@
private TelephonyUtil() {}
- static boolean isPstnConnectionService(CallServiceDescriptor descriptor) {
+ static boolean isPstnComponentName(ComponentName componentName) {
final ComponentName pstnComponentName = new ComponentName(
TELEPHONY_PACKAGE_NAME, PSTN_CALL_SERVICE_CLASS_NAME);
- return pstnComponentName.equals(descriptor.getServiceComponent());
- }
-
- /**
- * Returns whether or not the call is currently connected as a cellular call (through the
- * device's cellular radio).
- */
- static boolean isCurrentlyPSTNCall(Call call) {
- if (Log.DEBUG) {
- verifyConnectionServiceExists(PSTN_CALL_SERVICE_CLASS_NAME);
- }
-
- ConnectionServiceWrapper service = call.getConnectionService();
- if (service == null) {
- return false;
- }
- return isPstnConnectionService(service.getDescriptor());
+ return pstnComponentName.equals(componentName);
}
private static void verifyConnectionServiceExists(String serviceName) {