Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dcd62ad6 authored by Youming Ye's avatar Youming Ye Committed by Android (Google) Code Review
Browse files

Merge "Enable Telecom to bind third party InCallServices."

parents 559ff8ac 8ded93ac
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -91,6 +91,7 @@ package android {
    field public static final java.lang.String LOCATION_HARDWARE = "android.permission.LOCATION_HARDWARE";
    field public static final java.lang.String MANAGE_DOCUMENTS = "android.permission.MANAGE_DOCUMENTS";
    field public static final java.lang.String MANAGE_OWN_CALLS = "android.permission.MANAGE_OWN_CALLS";
    field public static final java.lang.String CALL_COMPANION_APP = "android.permission.CALL_COMPANION_APP";
    field public static final java.lang.String MASTER_CLEAR = "android.permission.MASTER_CLEAR";
    field public static final java.lang.String MEDIA_CONTENT_CONTROL = "android.permission.MEDIA_CONTENT_CONTROL";
    field public static final java.lang.String MODIFY_AUDIO_SETTINGS = "android.permission.MODIFY_AUDIO_SETTINGS";
@@ -43172,12 +43173,14 @@ package android.telecom {
    field public static final java.lang.String EXTRA_START_CALL_WITH_RTT = "android.telecom.extra.START_CALL_WITH_RTT";
    field public static final java.lang.String EXTRA_START_CALL_WITH_SPEAKERPHONE = "android.telecom.extra.START_CALL_WITH_SPEAKERPHONE";
    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 EXTRA_IS_ENABLED = "android.telecom.extra.IS_ENABLED";
    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_INCLUDE_EXTERNAL_CALLS = "android.telecom.INCLUDE_EXTERNAL_CALLS";
    field public static final java.lang.String METADATA_INCLUDE_SELF_MANAGED_CALLS = "android.telecom.INCLUDE_SELF_MANAGED_CALLS";
    field public static final java.lang.String METADATA_IN_CALL_SERVICE_RINGING = "android.telecom.IN_CALL_SERVICE_RINGING";
    field public static final java.lang.String METADATA_IN_CALL_SERVICE_UI = "android.telecom.IN_CALL_SERVICE_UI";
    field public static final java.lang.String METADATA_IN_CALL_SERVICE_CAR_MODE_UI = "android.telecom.IN_CALL_SERVICE_CAR_MODE_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
+12 −0
Original line number Diff line number Diff line
@@ -1120,6 +1120,18 @@
                android:description="@string/permdesc_manageOwnCalls"
                android:protectionLevel="normal" />

    <!--Allows an app which implements the
        {@link 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
+9 −0
Original line number Diff line number Diff line
@@ -1215,6 +1215,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
+6 −3
Original line number Diff line number Diff line
@@ -459,6 +459,12 @@ public class TelecomManager {
    public static final String EXTRA_START_CALL_WITH_RTT =
            "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
@@ -471,8 +477,6 @@ 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
     */
    public static final String METADATA_IN_CALL_SERVICE_CAR_MODE_UI =
            "android.telecom.IN_CALL_SERVICE_CAR_MODE_UI";
@@ -2038,7 +2042,6 @@ public class TelecomManager {
        } catch (RemoteException e) {
            Log.e(TAG, "RemoteException handleCallIntent: " + e);
        }

    }

    private ITelecomService getTelecomService() {