summaryrefslogtreecommitdiffstats
path: root/telephony
diff options
context:
space:
mode:
authorSantos Cordon <santoscordon@google.com>2014-05-21 15:22:12 -0700
committerSantos Cordon <santoscordon@google.com>2014-05-28 03:36:36 +0000
commit3afed57a7d8a6e9d9fcaaa483a3c3e3652e2199a (patch)
tree69f82c8c68231034e180cb78d25d3ae6b3aea0ae /telephony
parentbbd8e6ffc600e078984cb68acf51c660c5c9fc81 (diff)
downloadframeworks_base-3afed57a7d8a6e9d9fcaaa483a3c3e3652e2199a.zip
frameworks_base-3afed57a7d8a6e9d9fcaaa483a3c3e3652e2199a.tar.gz
frameworks_base-3afed57a7d8a6e9d9fcaaa483a3c3e3652e2199a.tar.bz2
Adding ITelecommService definition for Telecomm.
Until telecomm code moves into a system service, we need a way for other apps to call into it for call-related functionality. Initial implementation only has silenceRinger. This is to be implemented by the telecomm code and used by TelephonyManager (until we have a TelecommManager). Change-Id: I9180797451dcb2e9029b20bed47f5d5cb8cddb9f (cherry picked from commit b895606acf18dbb050c9a32106b3c9c2e5111829)
Diffstat (limited to 'telephony')
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index a896861..4aed1fe 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -30,6 +30,7 @@ import android.os.SystemProperties;
import android.telephony.Rlog;
import android.util.Log;
+import com.android.internal.telecomm.ITelecommService;
import com.android.internal.telephony.IPhoneSubInfo;
import com.android.internal.telephony.ITelephony;
import com.android.internal.telephony.ITelephonyRegistry;
@@ -65,6 +66,8 @@ import java.util.regex.Pattern;
public class TelephonyManager {
private static final String TAG = "TelephonyManager";
+ private static final String TELECOMM_SERVICE_NAME = "telecomm";
+
private static ITelephonyRegistry sRegistry;
/**
@@ -1536,6 +1539,10 @@ public class TelephonyManager {
return ITelephony.Stub.asInterface(ServiceManager.getService(Context.TELEPHONY_SERVICE));
}
+ private ITelecommService getTelecommService() {
+ return ITelecommService.Stub.asInterface(ServiceManager.getService(TELECOMM_SERVICE_NAME));
+ }
+
//
//
// PhoneStateListener
@@ -2016,9 +2023,9 @@ public class TelephonyManager {
@PrivateApi
public void silenceRinger() {
try {
- getITelephony().silenceRinger();
+ getTelecommService().silenceRinger();
} catch (RemoteException e) {
- Log.e(TAG, "Error calling ITelephony#silenceRinger", e);
+ Log.e(TAG, "Error calling ITelecommService#silenceRinger", e);
}
}