diff options
author | Steve Kondik <steve@cyngn.com> | 2016-03-11 03:47:09 -0800 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2016-03-11 16:58:39 -0800 |
commit | 0e1dbed9194839a90755670d8fdf9046a75b85f7 (patch) | |
tree | 010372762ddc617295da2862f7d61813da9e3586 /telecomm/java/android | |
parent | 564f10b8f05ddf4d9ea2c0e64f1b113fe6dad4b8 (diff) | |
parent | e342181a4a8d8177b3b87ffe141777565fe98f15 (diff) | |
download | frameworks_base-0e1dbed9194839a90755670d8fdf9046a75b85f7.zip frameworks_base-0e1dbed9194839a90755670d8fdf9046a75b85f7.tar.gz frameworks_base-0e1dbed9194839a90755670d8fdf9046a75b85f7.tar.bz2 |
Merge tag 'android-6.0.1_r22' of https://android.googlesource.com/platform/frameworks/base into cm-13.0
Android 6.0.1 release 22
Change-Id: I0d31899b234156a91accb61e0a7fb3d8d16d5062
Diffstat (limited to 'telecomm/java/android')
-rw-r--r-- | telecomm/java/android/telecom/Call.java | 8 | ||||
-rw-r--r-- | telecomm/java/android/telecom/Connection.java | 27 | ||||
-rw-r--r-- | telecomm/java/android/telecom/ConnectionService.java | 41 | ||||
-rw-r--r-- | telecomm/java/android/telecom/PhoneAccount.java | 8 | ||||
-rw-r--r-- | telecomm/java/android/telecom/TelecomManager.java | 51 |
5 files changed, 131 insertions, 4 deletions
diff --git a/telecomm/java/android/telecom/Call.java b/telecomm/java/android/telecom/Call.java index 128d38da..8af52f2 100644 --- a/telecomm/java/android/telecom/Call.java +++ b/telecomm/java/android/telecom/Call.java @@ -236,8 +236,14 @@ public final class Call { */ public static final int CAPABILITY_SUPPORTS_TRANSFER = 0x04000000; + /** + * Call sends responses through connection. + * @hide + */ + public static final int CAPABILITY_CAN_SEND_RESPONSE_VIA_CONNECTION = 0x08000000; + //****************************************************************************************** - // Next CAPABILITY value: 0x08000000 + // Next CAPABILITY value: 0x10000000 //****************************************************************************************** /** diff --git a/telecomm/java/android/telecom/Connection.java b/telecomm/java/android/telecom/Connection.java index a972425..5e2ec3c 100644 --- a/telecomm/java/android/telecom/Connection.java +++ b/telecomm/java/android/telecom/Connection.java @@ -278,8 +278,15 @@ public abstract class Connection extends Conferenceable { */ public static final int CAPABILITY_SUPPORTS_TRANSFER = 0x04000000; + /** + * Indicates that the connection itself wants to handle any sort of reply response, rather than + * relying on SMS. + * @hide + */ + public static final int CAPABILITY_CAN_SEND_RESPONSE_VIA_CONNECTION = 0x00400000; + //********************************************************************************************** - // Next CAPABILITY value: 0x08000000 + // Next CAPABILITY value: 0x00800000 //********************************************************************************************** /** @@ -464,6 +471,10 @@ public abstract class Connection extends Conferenceable { if (can(capabilities, CAPABILITY_CONFERENCE_HAS_NO_CHILDREN)) { builder.append(" CAPABILITY_SINGLE_PARTY_CONFERENCE"); } + if (can(capabilities, CAPABILITY_CAN_SEND_RESPONSE_VIA_CONNECTION)) { + builder.append(" CAPABILITY_CAN_SEND_RESPONSE_VIA_CONNECTION"); + } + builder.append("]"); return builder.toString(); } @@ -1957,6 +1968,20 @@ public abstract class Connection extends Conferenceable { public void onTransfer() { } /** + * Notifies ths Connection of a request reject with a message. + * + * @hide + */ + public void onReject(String replyMessage) {} + + /** + * Notifies the Connection of a request to silence the ringer. + * + * @hide + */ + public void onSilence() {} + + /** * Notifies this Connection whether the user wishes to proceed with the post-dial DTMF codes. */ public void onPostDialContinue(boolean proceed) {} diff --git a/telecomm/java/android/telecom/ConnectionService.java b/telecomm/java/android/telecom/ConnectionService.java index 0054be6..f64fc99 100644 --- a/telecomm/java/android/telecom/ConnectionService.java +++ b/telecomm/java/android/telecom/ConnectionService.java @@ -101,8 +101,10 @@ public abstract class ConnectionService extends Service { private static final int MSG_ANSWER_VIDEO = 17; private static final int MSG_MERGE_CONFERENCE = 18; private static final int MSG_SWAP_CONFERENCE = 19; - private static final int MSG_SET_LOCAL_HOLD = 20; - private static final int MSG_EXPLICIT_TRANSFER = 21; + private static final int MSG_REJECT_WITH_MESSAGE = 20; + private static final int MSG_SILENCE = 21; + private static final int MSG_SET_LOCAL_HOLD = 22; + private static final int MSG_EXPLICIT_TRANSFER = 23; //Proprietary values starts after this. private static final int MSG_ADD_PARTICIPANT_WITH_CONFERENCE = 30; @@ -170,6 +172,19 @@ public abstract class ConnectionService extends Service { } @Override + public void rejectWithMessage(String callId, String message) { + SomeArgs args = SomeArgs.obtain(); + args.arg1 = callId; + args.arg2 = message; + mHandler.obtainMessage(MSG_REJECT_WITH_MESSAGE, args).sendToTarget(); + } + + @Override + public void silence(String callId) { + mHandler.obtainMessage(MSG_SILENCE, callId).sendToTarget(); + } + + @Override public void disconnect(String callId) { mHandler.obtainMessage(MSG_DISCONNECT, callId).sendToTarget(); } @@ -321,9 +336,21 @@ public abstract class ConnectionService extends Service { case MSG_REJECT: reject((String) msg.obj); break; + case MSG_REJECT_WITH_MESSAGE: { + SomeArgs args = (SomeArgs) msg.obj; + try { + reject((String) args.arg1, (String) args.arg2); + } finally { + args.recycle(); + } + break; + } case MSG_DISCONNECT: disconnect((String) msg.obj); break; + case MSG_SILENCE: + silence((String) msg.obj); + break; case MSG_HOLD: hold((String) msg.obj); break; @@ -757,6 +784,16 @@ public abstract class ConnectionService extends Service { findConnectionForAction(callId, "reject").onReject(); } + private void reject(String callId, String rejectWithMessage) { + Log.d(this, "reject %s with message", callId); + findConnectionForAction(callId, "reject").onReject(rejectWithMessage); + } + + private void silence(String callId) { + Log.d(this, "silence %s", callId); + findConnectionForAction(callId, "silence").onSilence(); + } + private void disconnect(String callId) { Log.d(this, "disconnect %s", callId); if (mConnectionById.containsKey(callId)) { diff --git a/telecomm/java/android/telecom/PhoneAccount.java b/telecomm/java/android/telecom/PhoneAccount.java index f890f4d..635a48b 100644 --- a/telecomm/java/android/telecom/PhoneAccount.java +++ b/telecomm/java/android/telecom/PhoneAccount.java @@ -122,6 +122,14 @@ public final class PhoneAccount implements Parcelable { public static final int CAPABILITY_CALL_SUBJECT = 0x40; /** + * Flag indicating that this {@code PhoneAccount} should only be used for emergency calls. + * <p> + * See {@link #getCapabilities} + * @hide + */ + public static final int CAPABILITY_EMERGENCY_CALLS_ONLY = 0x80; + + /** * URI scheme for telephone number URIs. */ public static final String SCHEME_TEL = "tel"; diff --git a/telecomm/java/android/telecom/TelecomManager.java b/telecomm/java/android/telecom/TelecomManager.java index 673adb2..ae7c18e 100644 --- a/telecomm/java/android/telecom/TelecomManager.java +++ b/telecomm/java/android/telecom/TelecomManager.java @@ -117,6 +117,15 @@ public class TelecomManager { "android.telecom.action.PHONE_ACCOUNT_REGISTERED"; /** + * The {@link android.content.Intent} action used indicate that a phone account was + * just unregistered. + * @hide + */ + @SystemApi + public static final String ACTION_PHONE_ACCOUNT_UNREGISTERED = + "android.telecom.action.PHONE_ACCOUNT_UNREGISTERED"; + + /** * Activity action: Shows a dialog asking the user whether or not they want to replace the * current default Dialer with the one specified in * {@link #EXTRA_CHANGE_DEFAULT_DIALER_PACKAGE_NAME}. @@ -368,6 +377,48 @@ public class TelecomManager { "android.telecom.intent.extra.TTY_PREFERRED"; /** + * Broadcast intent action for letting custom component know to show the missed call + * notification. + * @hide + */ + @SystemApi + public static final String ACTION_SHOW_MISSED_CALLS_NOTIFICATION = + "android.telecom.action.SHOW_MISSED_CALLS_NOTIFICATION"; + + /** + * The number of calls associated with the notification. + * @hide + */ + @SystemApi + public static final String EXTRA_NOTIFICATION_COUNT = + "android.telecom.extra.NOTIFICATION_COUNT"; + + /** + * The number associated with the missed calls. This number is only relevant + * when EXTRA_NOTIFICATION_COUNT is 1. + * @hide + */ + @SystemApi + public static final String EXTRA_NOTIFICATION_PHONE_NUMBER = + "android.telecom.extra.NOTIFICATION_PHONE_NUMBER"; + + /** + * The intent to clear missed calls. + * @hide + */ + @SystemApi + public static final String EXTRA_CLEAR_MISSED_CALLS_INTENT = + "android.telecom.extra.CLEAR_MISSED_CALLS_INTENT"; + + /** + * The intent to call back a missed call. + * @hide + */ + @SystemApi + public static final String EXTRA_CALL_BACK_INTENT = + "android.telecom.extra.CALL_BACK_INTENT"; + + /** * The following 4 constants define how properties such as phone numbers and names are * displayed to the user. */ |