diff options
| author | 2019-03-27 14:42:02 -0700 | |
|---|---|---|
| committer | 2019-03-27 14:42:02 -0700 | |
| commit | 3dcb1b71edb0575d43f00f48daa5db3c8b526fe5 (patch) | |
| tree | 5db9f2f433692bf217f685dfac00fdc930c3b5ea | |
| parent | 632d489ddb80286260c0ba3c91f736798a71967c (diff) | |
| parent | b9bace165654ad5b0bd76601b2f5d725d2ef9469 (diff) | |
Merge "Enable Telecom to bind third party InCallServices." am: 90a9d627aa
am: b9bace1656
Change-Id: I3c7b9ce9388be00a892c77827b8a599fe1fd291d
| -rwxr-xr-x | api/current.txt | 3 | ||||
| -rw-r--r-- | core/res/AndroidManifest.xml | 12 | ||||
| -rw-r--r-- | core/res/res/values/strings.xml | 9 | ||||
| -rw-r--r-- | telecomm/java/android/telecom/TelecomManager.java | 13 |
4 files changed, 31 insertions, 6 deletions
diff --git a/api/current.txt b/api/current.txt index f0393a28f553..d211a55c1497 100755 --- a/api/current.txt +++ b/api/current.txt @@ -54,6 +54,7 @@ package android { field public static final String BROADCAST_SMS = "android.permission.BROADCAST_SMS"; field public static final String BROADCAST_STICKY = "android.permission.BROADCAST_STICKY"; field public static final String BROADCAST_WAP_PUSH = "android.permission.BROADCAST_WAP_PUSH"; + field public static final String CALL_COMPANION_APP = "android.permission.CALL_COMPANION_APP"; field public static final String CALL_PHONE = "android.permission.CALL_PHONE"; field public static final String CALL_PRIVILEGED = "android.permission.CALL_PRIVILEGED"; field public static final String CAMERA = "android.permission.CAMERA"; @@ -41956,6 +41957,7 @@ package android.telecom { field public static final String EXTRA_INCOMING_CALL_EXTRAS = "android.telecom.extra.INCOMING_CALL_EXTRAS"; field public static final String EXTRA_INCOMING_VIDEO_STATE = "android.telecom.extra.INCOMING_VIDEO_STATE"; field public static final String EXTRA_IS_DEFAULT_CALL_SCREENING_APP = "android.telecom.extra.IS_DEFAULT_CALL_SCREENING_APP"; + field public static final String EXTRA_IS_ENABLED = "android.telecom.extra.IS_ENABLED"; field public static final String EXTRA_NOTIFICATION_COUNT = "android.telecom.extra.NOTIFICATION_COUNT"; field public static final String EXTRA_NOTIFICATION_PHONE_NUMBER = "android.telecom.extra.NOTIFICATION_PHONE_NUMBER"; field public static final String EXTRA_OUTGOING_CALL_EXTRAS = "android.telecom.extra.OUTGOING_CALL_EXTRAS"; @@ -41967,6 +41969,7 @@ package android.telecom { field public static final String GATEWAY_PROVIDER_PACKAGE = "android.telecom.extra.GATEWAY_PROVIDER_PACKAGE"; field public static final String METADATA_INCLUDE_EXTERNAL_CALLS = "android.telecom.INCLUDE_EXTERNAL_CALLS"; field public static final String METADATA_INCLUDE_SELF_MANAGED_CALLS = "android.telecom.INCLUDE_SELF_MANAGED_CALLS"; + field public static final String METADATA_IN_CALL_SERVICE_CAR_MODE_UI = "android.telecom.IN_CALL_SERVICE_CAR_MODE_UI"; field public static final String METADATA_IN_CALL_SERVICE_RINGING = "android.telecom.IN_CALL_SERVICE_RINGING"; field public static final String METADATA_IN_CALL_SERVICE_UI = "android.telecom.IN_CALL_SERVICE_UI"; field public static final int PRESENTATION_ALLOWED = 1; // 0x1 diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index e62df2a189a7..71879194ccf6 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -1009,6 +1009,18 @@ android:description="@string/permdesc_manageOwnCalls" android:protectionLevel="normal" /> + <!--Allows an app which implements the + {@link android.telecom.InCallService} API to be eligible to be enabled as a calling companion app. This + means that the Telecom framework will bind to the app's InCallService implementation when + there are calls active. The app can use the InCallService API to view information about + calls on the system and control these calls. + <p>Protection level: normal + --> + <permission android:name="android.permission.CALL_COMPANION_APP" + android:label="@string/permlab_callCompanionApp" + android:description="@string/permdesc_callCompanionApp" + android:protectionLevel="normal" /> + <!-- Allows a calling app to continue a call which was started in another app. An example is a video calling app that wants to continue a voice call on the user's mobile network.<p> When the handover of a call from one app to another takes place, there are two devices diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index 75aa60f1242a..4f6775b99e10 100644 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -1185,6 +1185,15 @@ <string name="permdesc_manageOwnCalls">Allows the app to route its calls through the system in order to improve the calling experience.</string> + <!-- Title of an application permission. When granted the app is allowed to be enabled as + a companion app. [CHAR LIMIT=NONE]--> + <string name="permlab_callCompanionApp">see and control calls through the system.</string> + <!-- Description of an application permission. When granted the app is allowed to be enabled as + a companion app. [CHAR LIMIT=NONE]--> + <string name="permdesc_callCompanionApp">Allows the app to see and control ongoing calls on the + device. This includes information such as call numbers for calls and the state of the + calls.</string> + <!-- Title of an application permission. When granted the user is giving access to a third party app to continue a call which originated in another app. For example, the user could be in a voice call over their carrier's mobile network, and a third party video diff --git a/telecomm/java/android/telecom/TelecomManager.java b/telecomm/java/android/telecom/TelecomManager.java index 6b53b39b5706..1087a301a093 100644 --- a/telecomm/java/android/telecom/TelecomManager.java +++ b/telecomm/java/android/telecom/TelecomManager.java @@ -32,7 +32,6 @@ import android.os.Build; import android.os.Bundle; import android.os.RemoteException; import android.os.ServiceManager; -import android.os.UserHandle; import android.telephony.TelephonyManager; import android.text.TextUtils; import android.util.Log; @@ -44,7 +43,6 @@ import java.lang.annotation.RetentionPolicy; import java.util.ArrayList; import java.util.Collections; import java.util.List; -import java.util.concurrent.Executor; /** * Provides access to information about active calls and registration/call-management functionality. @@ -476,6 +474,12 @@ public class TelecomManager { "android.telecom.extra.START_CALL_WITH_RTT"; /** + * A boolean extra set to indicate whether an app is eligible to be bound to when there are + * ongoing calls on the device. + */ + public static final String EXTRA_IS_ENABLED = "android.telecom.extra.IS_ENABLED"; + + /** * 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 @@ -486,9 +490,7 @@ public class TelecomManager { /** * A boolean meta-data value indicating whether an {@link InCallService} implements an * in-call user interface to be used while the device is in car-mode (see - * {@link android.content.res.Configuration.UI_MODE_TYPE_CAR}). - * - * @hide + * {@link android.content.res.Configuration#UI_MODE_TYPE_CAR}). */ public static final String METADATA_IN_CALL_SERVICE_CAR_MODE_UI = "android.telecom.IN_CALL_SERVICE_CAR_MODE_UI"; @@ -2036,7 +2038,6 @@ public class TelecomManager { } catch (RemoteException e) { Log.e(TAG, "RemoteException handleCallIntent: " + e); } - } private ITelecomService getTelecomService() { |