summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Santos Cordon <santoscordon@google.com> 2015-06-24 17:58:21 +0000
committer Android Git Automerger <android-git-automerger@android.com> 2015-06-24 17:58:21 +0000
commit99c38d1c81ac1a43b6650c8de4aededfc236187b (patch)
tree2af3c687c27163f280dc65113f0af4ce80cb63e1
parent25e4e75185cd19f9480258abe5ddb9712a54fd68 (diff)
parent3c9f1e7f2de0e997d3c1abe3fb2af917dffca04d (diff)
am 3c9f1e7f: am c8cedd53: Merge "InCallService meta-data [2/4]" into mnc-dev
* commit '3c9f1e7f2de0e997d3c1abe3fb2af917dffca04d': InCallService meta-data [2/4]
-rw-r--r--api/current.txt1
-rw-r--r--api/system-current.txt1
-rw-r--r--telecomm/java/android/telecom/InCallService.java19
-rw-r--r--telecomm/java/android/telecom/TelecomManager.java8
4 files changed, 28 insertions, 1 deletions
diff --git a/api/current.txt b/api/current.txt
index bf2f9cb58e5d..baa6c6779cd9 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -30483,6 +30483,7 @@ package android.telecom {
field public static final java.lang.String EXTRA_START_CALL_WITH_VIDEO_STATE = "android.telecom.extra.START_CALL_WITH_VIDEO_STATE";
field public static final java.lang.String GATEWAY_ORIGINAL_ADDRESS = "android.telecom.extra.GATEWAY_ORIGINAL_ADDRESS";
field public static final java.lang.String GATEWAY_PROVIDER_PACKAGE = "android.telecom.extra.GATEWAY_PROVIDER_PACKAGE";
+ field public static final java.lang.String METADATA_IN_CALL_SERVICE_UI = "android.telecom.IN_CALL_SERVICE_UI";
field public static final int PRESENTATION_ALLOWED = 1; // 0x1
field public static final int PRESENTATION_PAYPHONE = 4; // 0x4
field public static final int PRESENTATION_RESTRICTED = 2; // 0x2
diff --git a/api/system-current.txt b/api/system-current.txt
index 63f9b74e04ff..af50668ff3fd 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -32704,6 +32704,7 @@ package android.telecom {
field public static final java.lang.String EXTRA_START_CALL_WITH_VIDEO_STATE = "android.telecom.extra.START_CALL_WITH_VIDEO_STATE";
field public static final java.lang.String GATEWAY_ORIGINAL_ADDRESS = "android.telecom.extra.GATEWAY_ORIGINAL_ADDRESS";
field public static final java.lang.String GATEWAY_PROVIDER_PACKAGE = "android.telecom.extra.GATEWAY_PROVIDER_PACKAGE";
+ field public static final java.lang.String METADATA_IN_CALL_SERVICE_UI = "android.telecom.IN_CALL_SERVICE_UI";
field public static final int PRESENTATION_ALLOWED = 1; // 0x1
field public static final int PRESENTATION_PAYPHONE = 4; // 0x4
field public static final int PRESENTATION_RESTRICTED = 2; // 0x2
diff --git a/telecomm/java/android/telecom/InCallService.java b/telecomm/java/android/telecom/InCallService.java
index fb985ceead7c..0f8ac632a876 100644
--- a/telecomm/java/android/telecom/InCallService.java
+++ b/telecomm/java/android/telecom/InCallService.java
@@ -39,7 +39,24 @@ import java.util.List;
/**
* This service is implemented by any app that wishes to provide the user-interface for managing
* phone calls. Telecom binds to this service while there exists a live (active or incoming) call,
- * and uses it to notify the in-call app of any live and and recently disconnected calls.
+ * and uses it to notify the in-call app of any live and recently disconnected calls. An app must
+ * first be set as the default phone app (See {@link TelecomManager#getDefaultDialerPackage()})
+ * before the telecom service will bind to its {@code InCallService} implementation.
+ * <p>
+ * Below is an example manifest registration for an {@code InCallService}. The meta-data
+ * ({@link TelecomManager#METADATA_IN_CALL_SERVICE_UI}) indicates that this particular
+ * {@code InCallService} implementation intends to replace the built-in in-call UI.
+ * <pre>
+ * {@code
+ * &lt;service android:name="your.package.YourInCallServiceImplementation"
+ * android:permission="android.permission.BIND_IN_CALL_SERVICE"&gt;
+ * &lt;meta-data android:name="android.telecom.IN_CALL_SERVICE_UI" android:value="true" /&gt;
+ * &lt;intent-filter&gt;
+ * &lt;action android:name="android.telecom.InCallService"/&gt;
+ * &lt;/intent-filter&gt;
+ * &lt;/service&gt;
+ * }
+ * </pre>
*/
public abstract class InCallService extends Service {
diff --git a/telecomm/java/android/telecom/TelecomManager.java b/telecomm/java/android/telecom/TelecomManager.java
index e2921c4432cd..11f206aa7b61 100644
--- a/telecomm/java/android/telecom/TelecomManager.java
+++ b/telecomm/java/android/telecom/TelecomManager.java
@@ -256,6 +256,14 @@ public class TelecomManager {
public static final String EXTRA_CALL_BACK_NUMBER = "android.telecom.extra.CALL_BACK_NUMBER";
/**
+ * A boolean meta-data value indicating whether an {@link InCallService} implements an
+ * in-call user interface. Dialer implementations (see {@link #getDefaultDialerPackage()}) which
+ * would also like to replace the in-call interface should set this meta-data to {@code true} in
+ * the manifest registration of their {@link InCallService}.
+ */
+ public static final String METADATA_IN_CALL_SERVICE_UI = "android.telecom.IN_CALL_SERVICE_UI";
+
+ /**
* The dual tone multi-frequency signaling character sent to indicate the dialing system should
* pause for a predefined period.
*/