summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShuo Qian <shuoq@google.com>2020-11-30 21:54:36 -0800
committerShuo Qian <shuoq@google.com>2020-12-22 23:40:55 +0000
commit850627f9485f83ea9d6e677ba8c7d31726090862 (patch)
tree0779023f5d9f40d6ad9018c4d31ebe4e117db429
parentea8ca4b88a4bd3503168f041751f1d7a270e8a68 (diff)
Add Call Composer API extras in TelecomManager
Test: cts Bug: 173437870 Change-Id: I46cd9ee72de3d217fa23b368c0b88811cf8ce555 Merged-In: I46cd9ee72de3d217fa23b368c0b88811cf8ce555 (cherry picked from commit 3ed3883ff684d4f1177497d697fc6a1a13a9dfe5)
-rw-r--r--core/api/current.txt7
-rw-r--r--telecomm/java/android/telecom/TelecomManager.java61
2 files changed, 67 insertions, 1 deletions
diff --git a/core/api/current.txt b/core/api/current.txt
index 74d313c636b7..2dbc0b172a61 100644
--- a/core/api/current.txt
+++ b/core/api/current.txt
@@ -39723,14 +39723,19 @@ package android.telecom {
field public static final String EXTRA_DEFAULT_CALL_SCREENING_APP_COMPONENT_NAME = "android.telecom.extra.DEFAULT_CALL_SCREENING_APP_COMPONENT_NAME";
field public static final String EXTRA_DISCONNECT_CAUSE = "android.telecom.extra.DISCONNECT_CAUSE";
field public static final String EXTRA_HANDLE = "android.telecom.extra.HANDLE";
+ field public static final String EXTRA_HAS_PICTURE = "android.telecom.extra.HAS_PICTURE";
field public static final String EXTRA_INCOMING_CALL_ADDRESS = "android.telecom.extra.INCOMING_CALL_ADDRESS";
field public static final String EXTRA_INCOMING_CALL_EXTRAS = "android.telecom.extra.INCOMING_CALL_EXTRAS";
+ field public static final String EXTRA_INCOMING_PICTURE = "android.telecom.extra.INCOMING_PICTURE";
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_LOCATION = "android.telecom.extra.LOCATION";
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";
+ field public static final String EXTRA_OUTGOING_PICTURE = "android.telecom.extra.OUTGOING_PICTURE";
field public static final String EXTRA_PHONE_ACCOUNT_HANDLE = "android.telecom.extra.PHONE_ACCOUNT_HANDLE";
+ field public static final String EXTRA_PRIORITY = "android.telecom.extra.PRIORITY";
field public static final String EXTRA_START_CALL_WITH_RTT = "android.telecom.extra.START_CALL_WITH_RTT";
field public static final String EXTRA_START_CALL_WITH_SPEAKERPHONE = "android.telecom.extra.START_CALL_WITH_SPEAKERPHONE";
field public static final String EXTRA_START_CALL_WITH_VIDEO_STATE = "android.telecom.extra.START_CALL_WITH_VIDEO_STATE";
@@ -39746,6 +39751,8 @@ package android.telecom {
field public static final int PRESENTATION_PAYPHONE = 4; // 0x4
field public static final int PRESENTATION_RESTRICTED = 2; // 0x2
field public static final int PRESENTATION_UNKNOWN = 3; // 0x3
+ field public static final int PRIORITY_NORMAL = 0; // 0x0
+ field public static final int PRIORITY_URGENT = 1; // 0x1
}
public class VideoProfile implements android.os.Parcelable {
diff --git a/telecomm/java/android/telecom/TelecomManager.java b/telecomm/java/android/telecom/TelecomManager.java
index da2d4d82481b..3f8b68305914 100644
--- a/telecomm/java/android/telecom/TelecomManager.java
+++ b/telecomm/java/android/telecom/TelecomManager.java
@@ -266,10 +266,69 @@ public class TelecomManager {
/**
* Optional extra for {@link android.content.Intent#ACTION_CALL} containing a string call
* subject which will be associated with an outgoing call. Should only be specified if the
- * {@link PhoneAccount} supports the capability {@link PhoneAccount#CAPABILITY_CALL_SUBJECT}.
+ * {@link PhoneAccount} supports the capability {@link PhoneAccount#CAPABILITY_CALL_SUBJECT}
+ * or {@link PhoneAccount#CAPABILITY_CALL_COMPOSER}.
*/
public static final String EXTRA_CALL_SUBJECT = "android.telecom.extra.CALL_SUBJECT";
+ // Values for EXTRA_PRIORITY
+ /**
+ * Indicates the call composer call priority is normal.
+ *
+ * Reference: RCC.20 Section 2.4.4.2
+ */
+ public static final int PRIORITY_NORMAL = 0;
+
+ /**
+ * Indicates the call composer call priority is urgent.
+ *
+ * Reference: RCC.20 Section 2.4.4.2
+ */
+ public static final int PRIORITY_URGENT = 1;
+
+ /**
+ * Extra for the call composer call priority, either {@link #PRIORITY_NORMAL} or
+ * {@link #PRIORITY_URGENT}.
+ *
+ * Reference: RCC.20 Section 2.4.4.2
+ */
+ public static final String EXTRA_PRIORITY = "android.telecom.extra.PRIORITY";
+
+ /**
+ * Extra for the call composer call location, an {@link android.location.Location} parcelable
+ * class to represent the geolocation as a latitude and longitude pair.
+ *
+ * Reference: RCC.20 Section 2.4.3.2
+ */
+ public static final String EXTRA_LOCATION = "android.telecom.extra.LOCATION";
+
+ /**
+ * A boolean extra set on incoming calls to indicate that the call has a picture specified.
+ * Given that image download could take a (short) time, the EXTRA is set immediately upon
+ * adding the call to the Dialer app, this allows the Dialer app to reserve space for an image
+ * if one is expected. The EXTRA may be unset if the image download ends up failing for some
+ * reason.
+ */
+ public static final String EXTRA_HAS_PICTURE = "android.telecom.extra.HAS_PICTURE";
+
+ /**
+ * A URI representing the picture that was downloaded when a call is received.
+ * This is a content URI within the call log provider which can be used to open a file
+ * descriptor. This could be set a short time after a call is added to the Dialer app if the
+ * download is delayed for some reason. The Dialer app will receive a callback via
+ * {@link Call.Callback#onDetailsChanged} when this value has changed.
+ *
+ * Reference: RCC.20 Section 2.4.3.2
+ */
+ public static final String EXTRA_INCOMING_PICTURE = "android.telecom.extra.INCOMING_PICTURE";
+
+ // TODO(hallliu), This UUID is obtained from TelephonyManager#uploadCallComposerPicture.
+ /**
+ * A ParcelUuid used as a token to represent a picture that was uploaded prior to the call
+ * being placed.
+ */
+ public static final String EXTRA_OUTGOING_PICTURE = "android.telecom.extra.OUTGOING_PICTURE";
+
/**
* The extra used by a {@link ConnectionService} to provide the handle of the caller that
* has initiated a new incoming call.