summaryrefslogtreecommitdiffstats
path: root/telecomm/java/android
diff options
context:
space:
mode:
authorSantos Cordon <santoscordon@google.com>2015-06-24 17:37:06 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-06-24 17:37:13 +0000
commitc8cedd531176fd7d0474363c2bd90c3414e58457 (patch)
tree94127b0791e909668c1603f36cf525bcf3bbc848 /telecomm/java/android
parentb6acf517ff0c153f54f782d22ba5b498335d933a (diff)
parentf2600eb5aca1ec9bda2674d878528a770d5c220b (diff)
downloadframeworks_base-c8cedd531176fd7d0474363c2bd90c3414e58457.zip
frameworks_base-c8cedd531176fd7d0474363c2bd90c3414e58457.tar.gz
frameworks_base-c8cedd531176fd7d0474363c2bd90c3414e58457.tar.bz2
Merge "InCallService meta-data [2/4]" into mnc-dev
Diffstat (limited to 'telecomm/java/android')
-rw-r--r--telecomm/java/android/telecom/InCallService.java19
-rw-r--r--telecomm/java/android/telecom/TelecomManager.java8
2 files changed, 26 insertions, 1 deletions
diff --git a/telecomm/java/android/telecom/InCallService.java b/telecomm/java/android/telecom/InCallService.java
index fb985ce..0f8ac63 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 e2921c4..11f206a 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.
*/