From 2ac401093e5ebb975f14e5108d457c148370f7de Mon Sep 17 00:00:00 2001 From: Tyler Gunn Date: Mon, 18 Aug 2014 16:23:10 -0700 Subject: [PATCH] Exposing in-call API to other implementing classes. (1/4) - Adding service_interface constant to InCallService. Bug: 16133960 Change-Id: I4ace89bc3300428d2c56ed43e47ccd12a9f9748a --- core/res/AndroidManifest.xml | 16 ++++++++++++---- core/res/res/values/strings.xml | 9 +++++++-- .../java/android/telecomm/InCallService.java | 8 ++++++++ 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index aee30909182d7..f707b20176861 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -1249,13 +1249,13 @@ android:description="@string/permdesc_use_sip" android:label="@string/permlab_use_sip" /> - - + android:description="@string/permdesc_bind_incall_service" + android:label="@string/permlab_bind_incall_service" /> @@ -1265,6 +1265,14 @@ android:description="@string/permdesc_bind_connection_service" android:label="@string/permlab_bind_connection_service" /> + + + diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index c68f355f7b008..5429e59b5236f 100644 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -2112,15 +2112,20 @@ Allows the app to make and receive SIP calls. - interact with in-call screen + interact with in-call screen - Allows the app to control when and how the user sees the in-call screen. + Allows the app to control when and how the user sees the in-call screen. interact with telephony services Allows the app to interact with telephony services to make/receive calls. + + provide an in-call user experience + + Allows the app to provide an in-call user experience. + read historical network usage diff --git a/telecomm/java/android/telecomm/InCallService.java b/telecomm/java/android/telecomm/InCallService.java index de05d1c4db9cd..5795e0e607e07 100644 --- a/telecomm/java/android/telecomm/InCallService.java +++ b/telecomm/java/android/telecomm/InCallService.java @@ -16,6 +16,7 @@ package android.telecomm; +import android.annotation.SdkConstant; import android.app.PendingIntent; import android.app.Service; import android.content.Intent; @@ -39,6 +40,13 @@ import java.lang.String; * {@hide} */ public abstract class InCallService extends Service { + + /** + * The {@link Intent} that must be declared as handled by the service. + */ + @SdkConstant(SdkConstant.SdkConstantType.SERVICE_ACTION) + public static final String SERVICE_INTERFACE = "android.telecomm.InCallService"; + private static final int MSG_SET_IN_CALL_ADAPTER = 1; private static final int MSG_ADD_CALL = 2; private static final int MSG_UPDATE_CALL = 3;