Merge "Enable Telecom to bind third party InCallServices."
This commit is contained in:
@@ -54,6 +54,7 @@ package android {
|
|||||||
field public static final String BROADCAST_SMS = "android.permission.BROADCAST_SMS";
|
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_STICKY = "android.permission.BROADCAST_STICKY";
|
||||||
field public static final String BROADCAST_WAP_PUSH = "android.permission.BROADCAST_WAP_PUSH";
|
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_PHONE = "android.permission.CALL_PHONE";
|
||||||
field public static final String CALL_PRIVILEGED = "android.permission.CALL_PRIVILEGED";
|
field public static final String CALL_PRIVILEGED = "android.permission.CALL_PRIVILEGED";
|
||||||
field public static final String CAMERA = "android.permission.CAMERA";
|
field public static final String CAMERA = "android.permission.CAMERA";
|
||||||
@@ -41958,6 +41959,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_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_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_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_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_NOTIFICATION_PHONE_NUMBER = "android.telecom.extra.NOTIFICATION_PHONE_NUMBER";
|
||||||
field public static final String EXTRA_OUTGOING_CALL_EXTRAS = "android.telecom.extra.OUTGOING_CALL_EXTRAS";
|
field public static final String EXTRA_OUTGOING_CALL_EXTRAS = "android.telecom.extra.OUTGOING_CALL_EXTRAS";
|
||||||
@@ -41969,6 +41971,7 @@ package android.telecom {
|
|||||||
field public static final String GATEWAY_PROVIDER_PACKAGE = "android.telecom.extra.GATEWAY_PROVIDER_PACKAGE";
|
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_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_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_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 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_ALLOWED = 1; // 0x1
|
||||||
|
|||||||
@@ -1009,6 +1009,18 @@
|
|||||||
android:description="@string/permdesc_manageOwnCalls"
|
android:description="@string/permdesc_manageOwnCalls"
|
||||||
android:protectionLevel="normal" />
|
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
|
<!-- 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>
|
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
|
When the handover of a call from one app to another takes place, there are two devices
|
||||||
|
|||||||
@@ -1185,6 +1185,15 @@
|
|||||||
<string name="permdesc_manageOwnCalls">Allows the app to route its calls through the system in
|
<string name="permdesc_manageOwnCalls">Allows the app to route its calls through the system in
|
||||||
order to improve the calling experience.</string>
|
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
|
<!-- 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
|
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
|
could be in a voice call over their carrier's mobile network, and a third party video
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ import android.os.Build;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.RemoteException;
|
import android.os.RemoteException;
|
||||||
import android.os.ServiceManager;
|
import android.os.ServiceManager;
|
||||||
import android.os.UserHandle;
|
|
||||||
import android.telephony.TelephonyManager;
|
import android.telephony.TelephonyManager;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
@@ -45,7 +44,6 @@ import java.lang.annotation.RetentionPolicy;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.Executor;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides access to information about active calls and registration/call-management functionality.
|
* Provides access to information about active calls and registration/call-management functionality.
|
||||||
@@ -476,6 +474,12 @@ public class TelecomManager {
|
|||||||
public static final String EXTRA_START_CALL_WITH_RTT =
|
public static final String EXTRA_START_CALL_WITH_RTT =
|
||||||
"android.telecom.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
|
* A boolean meta-data value indicating whether an {@link InCallService} implements an
|
||||||
* in-call user interface. Dialer implementations (see {@link #getDefaultDialerPackage()}) which
|
* in-call user interface. Dialer implementations (see {@link #getDefaultDialerPackage()}) which
|
||||||
@@ -487,9 +491,7 @@ public class TelecomManager {
|
|||||||
/**
|
/**
|
||||||
* A boolean meta-data value indicating whether an {@link InCallService} implements an
|
* 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
|
* in-call user interface to be used while the device is in car-mode (see
|
||||||
* {@link android.content.res.Configuration.UI_MODE_TYPE_CAR}).
|
* {@link android.content.res.Configuration#UI_MODE_TYPE_CAR}).
|
||||||
*
|
|
||||||
* @hide
|
|
||||||
*/
|
*/
|
||||||
public static final String METADATA_IN_CALL_SERVICE_CAR_MODE_UI =
|
public static final String METADATA_IN_CALL_SERVICE_CAR_MODE_UI =
|
||||||
"android.telecom.IN_CALL_SERVICE_CAR_MODE_UI";
|
"android.telecom.IN_CALL_SERVICE_CAR_MODE_UI";
|
||||||
@@ -2041,7 +2043,6 @@ public class TelecomManager {
|
|||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Log.e(TAG, "RemoteException handleCallIntent: " + e);
|
Log.e(TAG, "RemoteException handleCallIntent: " + e);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private ITelecomService getTelecomService() {
|
private ITelecomService getTelecomService() {
|
||||||
|
|||||||
Reference in New Issue
Block a user