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

Commit 876dbfb4 authored by Tyler Gunn's avatar Tyler Gunn
Browse files

Add API support for multi-endpoint.

This CL includes changes required to support multi-endpoint (see the
design doc linked off the bug).

Main changes include:
- support for indicating if a call/connection is "external" to the device.
- support for indicating if an external call can be pulled from the
remote device to the local device.
- API used to initiate a pull of a call external to the current device to
the current device.
- Made the "connection event" API public (was previously @hide); this will
be used to support passing some error events involving pulling calls to
the incall ui.
- Added new InCallService metadata which will be used to determine if an
InCallService wants to be informed of external calls.
- New disconnect causes which will be used to expose the fact that a
multi-endpoint call was answered elsewhere and that a call ended because
it was pulled to another device.
- New call log call types to indicate if calls were answered elsewhere
or pulled to another device.

Bug: 27458894
Change-Id: I423f64ff965b5e50194635a51868c327782db2a1
parent 791a1546
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -30762,6 +30762,7 @@ package android.provider {
  public static class CallLog.Calls implements android.provider.BaseColumns {
    ctor public CallLog.Calls();
    method public static java.lang.String getLastOutgoingCall(android.content.Context);
    field public static final int ANSWERED_EXTERNALLY_TYPE = 7; // 0x7
    field public static final int BLOCKED_TYPE = 6; // 0x6
    field public static final java.lang.String CACHED_FORMATTED_NUMBER = "formatted_number";
    field public static final java.lang.String CACHED_LOOKUP_URI = "lookup_uri";
@@ -30784,6 +30785,7 @@ package android.provider {
    field public static final java.lang.String DURATION = "duration";
    field public static final java.lang.String EXTRA_CALL_TYPE_FILTER = "android.provider.extra.CALL_TYPE_FILTER";
    field public static final java.lang.String FEATURES = "features";
    field public static final int FEATURES_PULLED_EXTERNALLY = 2; // 0x2
    field public static final int FEATURES_VIDEO = 1; // 0x1
    field public static final java.lang.String GEOCODED_LOCATION = "geocoded_location";
    field public static final int INCOMING_TYPE = 1; // 0x1
@@ -36058,9 +36060,11 @@ package android.telecom {
    method public void phoneAccountSelected(android.telecom.PhoneAccountHandle, boolean);
    method public void playDtmfTone(char);
    method public void postDialContinue(boolean);
    method public void pullExternalCall();
    method public void registerCallback(android.telecom.Call.Callback);
    method public void registerCallback(android.telecom.Call.Callback, android.os.Handler);
    method public void reject(boolean, java.lang.String);
    method public void sendCallEvent(java.lang.String, android.os.Bundle);
    method public void splitFromConference();
    method public void stopDtmfTone();
    method public void swapConference();
@@ -36074,6 +36078,7 @@ package android.telecom {
    field public static final int STATE_DISCONNECTING = 10; // 0xa
    field public static final int STATE_HOLDING = 3; // 0x3
    field public static final int STATE_NEW = 0; // 0x0
    field public static final int STATE_PULLING_CALL = 11; // 0xb
    field public static final int STATE_RINGING = 2; // 0x2
    field public static final int STATE_SELECT_PHONE_ACCOUNT = 8; // 0x8
  }
@@ -36084,6 +36089,7 @@ package android.telecom {
    method public void onCannedTextResponsesLoaded(android.telecom.Call, java.util.List<java.lang.String>);
    method public void onChildrenChanged(android.telecom.Call, java.util.List<android.telecom.Call>);
    method public void onConferenceableCallsChanged(android.telecom.Call, java.util.List<android.telecom.Call>);
    method public void onConnectionEvent(android.telecom.Call, java.lang.String, android.os.Bundle);
    method public void onDetailsChanged(android.telecom.Call, android.telecom.Call.Details);
    method public void onParentChanged(android.telecom.Call, android.telecom.Call);
    method public void onPostDialWait(android.telecom.Call, java.lang.String);
@@ -36114,6 +36120,7 @@ package android.telecom {
    method public static java.lang.String propertiesToString(int);
    field public static final int CAPABILITY_CANNOT_DOWNGRADE_VIDEO_TO_AUDIO = 4194304; // 0x400000
    field public static final int CAPABILITY_CAN_PAUSE_VIDEO = 1048576; // 0x100000
    field public static final int CAPABILITY_CAN_PULL_CALL = 8388608; // 0x800000
    field public static final int CAPABILITY_DISCONNECT_FROM_CONFERENCE = 8192; // 0x2000
    field public static final int CAPABILITY_HOLD = 1; // 0x1
    field public static final int CAPABILITY_MANAGE_CONFERENCE = 128; // 0x80
@@ -36133,6 +36140,7 @@ package android.telecom {
    field public static final int PROPERTY_EMERGENCY_CALLBACK_MODE = 4; // 0x4
    field public static final int PROPERTY_GENERIC_CONFERENCE = 2; // 0x2
    field public static final int PROPERTY_HIGH_DEF_AUDIO = 16; // 0x10
    field public static final int PROPERTY_IS_EXTERNAL_CALL = 64; // 0x40
    field public static final int PROPERTY_WIFI = 8; // 0x8
    field public static final int PROPERTY_WORK_CALL = 32; // 0x20
  }
@@ -36247,15 +36255,18 @@ package android.telecom {
    method public void onAnswer(int);
    method public void onAnswer();
    method public void onCallAudioStateChanged(android.telecom.CallAudioState);
    method public void onCallEvent(java.lang.String, android.os.Bundle);
    method public void onDisconnect();
    method public void onHold();
    method public void onPlayDtmfTone(char);
    method public void onPostDialContinue(boolean);
    method public void onPullExternalCall();
    method public void onReject();
    method public void onSeparate();
    method public void onStateChanged(int);
    method public void onStopDtmfTone();
    method public void onUnhold();
    method public void sendConnectionEvent(java.lang.String, android.os.Bundle);
    method public final void setActive();
    method public final void setAddress(android.net.Uri, int);
    method public final void setAudioModeIsVoip(boolean);
@@ -36279,9 +36290,11 @@ package android.telecom {
    method public static java.lang.String stateToString(int);
    field public static final int CAPABILITY_CANNOT_DOWNGRADE_VIDEO_TO_AUDIO = 8388608; // 0x800000
    field public static final int CAPABILITY_CAN_PAUSE_VIDEO = 1048576; // 0x100000
    field public static final int CAPABILITY_CAN_PULL_CALL = 33554432; // 0x2000000
    field public static final int CAPABILITY_CAN_UPGRADE_TO_VIDEO = 524288; // 0x80000
    field public static final int CAPABILITY_DISCONNECT_FROM_CONFERENCE = 8192; // 0x2000
    field public static final int CAPABILITY_HOLD = 1; // 0x1
    field public static final int CAPABILITY_IS_EXTERNAL_CALL = 16777216; // 0x1000000
    field public static final int CAPABILITY_MANAGE_CONFERENCE = 128; // 0x80
    field public static final int CAPABILITY_MERGE_CONFERENCE = 4; // 0x4
    field public static final int CAPABILITY_MUTE = 64; // 0x40
@@ -36295,6 +36308,7 @@ package android.telecom {
    field public static final int CAPABILITY_SUPPORTS_VT_REMOTE_TX = 2048; // 0x800
    field public static final int CAPABILITY_SUPPORT_HOLD = 2; // 0x2
    field public static final int CAPABILITY_SWAP_CONFERENCE = 8; // 0x8
    field public static final java.lang.String EVENT_CALL_PULL_FAILED = "android.telecom.event.CALL_PULL_FAILED";
    field public static final java.lang.String EXTRA_CALL_SUBJECT = "android.telecom.extra.CALL_SUBJECT";
    field public static final java.lang.String EXTRA_CHILD_ADDRESS = "android.telecom.extra.CHILD_ADDRESS";
    field public static final java.lang.String EXTRA_LAST_FORWARDED_NUMBER = "android.telecom.extra.LAST_FORWARDED_NUMBER";
@@ -36304,6 +36318,7 @@ package android.telecom {
    field public static final int STATE_HOLDING = 5; // 0x5
    field public static final int STATE_INITIALIZING = 0; // 0x0
    field public static final int STATE_NEW = 1; // 0x1
    field public static final int STATE_PULLING_CALL = 7; // 0x7
    field public static final int STATE_RINGING = 2; // 0x2
  }
@@ -36381,7 +36396,9 @@ package android.telecom {
    method public java.lang.String getReason();
    method public int getTone();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final int ANSWERED_ELSEWHERE = 11; // 0xb
    field public static final int BUSY = 7; // 0x7
    field public static final int CALL_PULLED = 12; // 0xc
    field public static final int CANCELED = 4; // 0x4
    field public static final int CONNECTION_MANAGER_NOT_SUPPORTED = 10; // 0xa
    field public static final android.os.Parcelable.Creator<android.telecom.DisconnectCause> CREATOR;
@@ -36417,6 +36434,7 @@ package android.telecom {
    method public void onCallAudioStateChanged(android.telecom.CallAudioState);
    method public void onCallRemoved(android.telecom.Call);
    method public void onCanAddCallChanged(boolean);
    method public void onConnectionEvent(android.telecom.Call, java.lang.String, android.os.Bundle);
    method public void onSilenceRinger();
    method public final void setAudioRoute(int);
    method public final void setMuted(boolean);
@@ -36567,6 +36585,7 @@ package android.telecom {
    method public boolean isVoipAudioMode();
    method public void playDtmfTone(char);
    method public void postDialContinue(boolean);
    method public void pullExternalCall();
    method public void registerCallback(android.telecom.RemoteConnection.Callback);
    method public void registerCallback(android.telecom.RemoteConnection.Callback, android.os.Handler);
    method public void reject();
@@ -36583,6 +36602,7 @@ package android.telecom {
    method public void onConferenceChanged(android.telecom.RemoteConnection, android.telecom.RemoteConference);
    method public void onConferenceableConnectionsChanged(android.telecom.RemoteConnection, java.util.List<android.telecom.RemoteConnection>);
    method public void onConnectionCapabilitiesChanged(android.telecom.RemoteConnection, int);
    method public void onConnectionEvent(android.telecom.RemoteConnection, java.lang.String, android.os.Bundle);
    method public void onDestroyed(android.telecom.RemoteConnection);
    method public void onDisconnected(android.telecom.RemoteConnection, android.telecom.DisconnectCause);
    method public void onExtrasChanged(android.telecom.RemoteConnection, android.os.Bundle);
@@ -36680,6 +36700,7 @@ package android.telecom {
    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 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_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 int PRESENTATION_ALLOWED = 1; // 0x1
+21 −0
Original line number Diff line number Diff line
@@ -33114,6 +33114,7 @@ package android.provider {
  public static class CallLog.Calls implements android.provider.BaseColumns {
    ctor public CallLog.Calls();
    method public static java.lang.String getLastOutgoingCall(android.content.Context);
    field public static final int ANSWERED_EXTERNALLY_TYPE = 7; // 0x7
    field public static final int BLOCKED_TYPE = 6; // 0x6
    field public static final java.lang.String CACHED_FORMATTED_NUMBER = "formatted_number";
    field public static final java.lang.String CACHED_LOOKUP_URI = "lookup_uri";
@@ -33136,6 +33137,7 @@ package android.provider {
    field public static final java.lang.String DURATION = "duration";
    field public static final java.lang.String EXTRA_CALL_TYPE_FILTER = "android.provider.extra.CALL_TYPE_FILTER";
    field public static final java.lang.String FEATURES = "features";
    field public static final int FEATURES_PULLED_EXTERNALLY = 2; // 0x2
    field public static final int FEATURES_VIDEO = 1; // 0x1
    field public static final java.lang.String GEOCODED_LOCATION = "geocoded_location";
    field public static final int INCOMING_TYPE = 1; // 0x1
@@ -38658,10 +38660,12 @@ package android.telecom {
    method public void phoneAccountSelected(android.telecom.PhoneAccountHandle, boolean);
    method public void playDtmfTone(char);
    method public void postDialContinue(boolean);
    method public void pullExternalCall();
    method public void registerCallback(android.telecom.Call.Callback);
    method public void registerCallback(android.telecom.Call.Callback, android.os.Handler);
    method public void reject(boolean, java.lang.String);
    method public deprecated void removeListener(android.telecom.Call.Listener);
    method public void sendCallEvent(java.lang.String, android.os.Bundle);
    method public void splitFromConference();
    method public void stopDtmfTone();
    method public void swapConference();
@@ -38676,6 +38680,7 @@ package android.telecom {
    field public static final int STATE_HOLDING = 3; // 0x3
    field public static final int STATE_NEW = 0; // 0x0
    field public static final deprecated int STATE_PRE_DIAL_WAIT = 8; // 0x8
    field public static final int STATE_PULLING_CALL = 11; // 0xb
    field public static final int STATE_RINGING = 2; // 0x2
    field public static final int STATE_SELECT_PHONE_ACCOUNT = 8; // 0x8
  }
@@ -38686,6 +38691,7 @@ package android.telecom {
    method public void onCannedTextResponsesLoaded(android.telecom.Call, java.util.List<java.lang.String>);
    method public void onChildrenChanged(android.telecom.Call, java.util.List<android.telecom.Call>);
    method public void onConferenceableCallsChanged(android.telecom.Call, java.util.List<android.telecom.Call>);
    method public void onConnectionEvent(android.telecom.Call, java.lang.String, android.os.Bundle);
    method public void onDetailsChanged(android.telecom.Call, android.telecom.Call.Details);
    method public void onParentChanged(android.telecom.Call, android.telecom.Call);
    method public void onPostDialWait(android.telecom.Call, java.lang.String);
@@ -38716,6 +38722,7 @@ package android.telecom {
    method public static java.lang.String propertiesToString(int);
    field public static final int CAPABILITY_CANNOT_DOWNGRADE_VIDEO_TO_AUDIO = 4194304; // 0x400000
    field public static final int CAPABILITY_CAN_PAUSE_VIDEO = 1048576; // 0x100000
    field public static final int CAPABILITY_CAN_PULL_CALL = 8388608; // 0x800000
    field public static final int CAPABILITY_DISCONNECT_FROM_CONFERENCE = 8192; // 0x2000
    field public static final int CAPABILITY_HOLD = 1; // 0x1
    field public static final int CAPABILITY_MANAGE_CONFERENCE = 128; // 0x80
@@ -38735,6 +38742,7 @@ package android.telecom {
    field public static final int PROPERTY_EMERGENCY_CALLBACK_MODE = 4; // 0x4
    field public static final int PROPERTY_GENERIC_CONFERENCE = 2; // 0x2
    field public static final int PROPERTY_HIGH_DEF_AUDIO = 16; // 0x10
    field public static final int PROPERTY_IS_EXTERNAL_CALL = 64; // 0x40
    field public static final int PROPERTY_WIFI = 8; // 0x8
    field public static final int PROPERTY_WORK_CALL = 32; // 0x20
  }
@@ -38860,15 +38868,18 @@ package android.telecom {
    method public void onAnswer();
    method public deprecated void onAudioStateChanged(android.telecom.AudioState);
    method public void onCallAudioStateChanged(android.telecom.CallAudioState);
    method public void onCallEvent(java.lang.String, android.os.Bundle);
    method public void onDisconnect();
    method public void onHold();
    method public void onPlayDtmfTone(char);
    method public void onPostDialContinue(boolean);
    method public void onPullExternalCall();
    method public void onReject();
    method public void onSeparate();
    method public void onStateChanged(int);
    method public void onStopDtmfTone();
    method public void onUnhold();
    method public void sendConnectionEvent(java.lang.String, android.os.Bundle);
    method public final void setActive();
    method public final void setAddress(android.net.Uri, int);
    method public final void setAudioModeIsVoip(boolean);
@@ -38892,9 +38903,11 @@ package android.telecom {
    method public static java.lang.String stateToString(int);
    field public static final int CAPABILITY_CANNOT_DOWNGRADE_VIDEO_TO_AUDIO = 8388608; // 0x800000
    field public static final int CAPABILITY_CAN_PAUSE_VIDEO = 1048576; // 0x100000
    field public static final int CAPABILITY_CAN_PULL_CALL = 33554432; // 0x2000000
    field public static final int CAPABILITY_CAN_UPGRADE_TO_VIDEO = 524288; // 0x80000
    field public static final int CAPABILITY_DISCONNECT_FROM_CONFERENCE = 8192; // 0x2000
    field public static final int CAPABILITY_HOLD = 1; // 0x1
    field public static final int CAPABILITY_IS_EXTERNAL_CALL = 16777216; // 0x1000000
    field public static final int CAPABILITY_MANAGE_CONFERENCE = 128; // 0x80
    field public static final int CAPABILITY_MERGE_CONFERENCE = 4; // 0x4
    field public static final int CAPABILITY_MUTE = 64; // 0x40
@@ -38908,6 +38921,7 @@ package android.telecom {
    field public static final int CAPABILITY_SUPPORTS_VT_REMOTE_TX = 2048; // 0x800
    field public static final int CAPABILITY_SUPPORT_HOLD = 2; // 0x2
    field public static final int CAPABILITY_SWAP_CONFERENCE = 8; // 0x8
    field public static final java.lang.String EVENT_CALL_PULL_FAILED = "android.telecom.event.CALL_PULL_FAILED";
    field public static final java.lang.String EXTRA_CALL_SUBJECT = "android.telecom.extra.CALL_SUBJECT";
    field public static final java.lang.String EXTRA_CHILD_ADDRESS = "android.telecom.extra.CHILD_ADDRESS";
    field public static final java.lang.String EXTRA_LAST_FORWARDED_NUMBER = "android.telecom.extra.LAST_FORWARDED_NUMBER";
@@ -38917,6 +38931,7 @@ package android.telecom {
    field public static final int STATE_HOLDING = 5; // 0x5
    field public static final int STATE_INITIALIZING = 0; // 0x0
    field public static final int STATE_NEW = 1; // 0x1
    field public static final int STATE_PULLING_CALL = 7; // 0x7
    field public static final int STATE_RINGING = 2; // 0x2
  }
@@ -38994,7 +39009,9 @@ package android.telecom {
    method public java.lang.String getReason();
    method public int getTone();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final int ANSWERED_ELSEWHERE = 11; // 0xb
    field public static final int BUSY = 7; // 0x7
    field public static final int CALL_PULLED = 12; // 0xc
    field public static final int CANCELED = 4; // 0x4
    field public static final int CONNECTION_MANAGER_NOT_SUPPORTED = 10; // 0xa
    field public static final android.os.Parcelable.Creator<android.telecom.DisconnectCause> CREATOR;
@@ -39031,6 +39048,7 @@ package android.telecom {
    method public void onCallAudioStateChanged(android.telecom.CallAudioState);
    method public void onCallRemoved(android.telecom.Call);
    method public void onCanAddCallChanged(boolean);
    method public void onConnectionEvent(android.telecom.Call, java.lang.String, android.os.Bundle);
    method public deprecated void onPhoneCreated(android.telecom.Phone);
    method public deprecated void onPhoneDestroyed(android.telecom.Phone);
    method public void onSilenceRinger();
@@ -39236,6 +39254,7 @@ package android.telecom {
    method public boolean isVoipAudioMode();
    method public void playDtmfTone(char);
    method public void postDialContinue(boolean);
    method public void pullExternalCall();
    method public void registerCallback(android.telecom.RemoteConnection.Callback);
    method public void registerCallback(android.telecom.RemoteConnection.Callback, android.os.Handler);
    method public void reject();
@@ -39253,6 +39272,7 @@ package android.telecom {
    method public void onConferenceChanged(android.telecom.RemoteConnection, android.telecom.RemoteConference);
    method public void onConferenceableConnectionsChanged(android.telecom.RemoteConnection, java.util.List<android.telecom.RemoteConnection>);
    method public void onConnectionCapabilitiesChanged(android.telecom.RemoteConnection, int);
    method public void onConnectionEvent(android.telecom.RemoteConnection, java.lang.String, android.os.Bundle);
    method public void onDestroyed(android.telecom.RemoteConnection);
    method public void onDisconnected(android.telecom.RemoteConnection, android.telecom.DisconnectCause);
    method public void onExtrasChanged(android.telecom.RemoteConnection, android.os.Bundle);
@@ -39377,6 +39397,7 @@ package android.telecom {
    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 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_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 int PRESENTATION_ALLOWED = 1; // 0x1
+21 −0

File changed.

Preview size limit exceeded, changes collapsed.

+10 −0
Original line number Diff line number Diff line
@@ -179,6 +179,7 @@ public class CallLog {
         * <li>{@link #VOICEMAIL_TYPE}</li>
         * <li>{@link #REJECTED_TYPE}</li>
         * <li>{@link #BLOCKED_TYPE}</li>
         * <li>{@link #ANSWERED_EXTERNALLY_TYPE}</li>
         * </ul>
         * </p>
         */
@@ -196,6 +197,12 @@ public class CallLog {
        public static final int REJECTED_TYPE = 5;
        /** Call log type for calls blocked automatically. */
        public static final int BLOCKED_TYPE = 6;
        /**
         * Call log type for a call which was answered on another device.  Used in situations where
         * a call rings on multiple devices simultaneously and it ended up being answered on a
         * device other than the current one.
         */
        public static final int ANSWERED_EXTERNALLY_TYPE = 7;

        /**
         * Bit-mask describing features of the call (e.g. video).
@@ -207,6 +214,9 @@ public class CallLog {
        /** Call had video. */
        public static final int FEATURES_VIDEO = 0x1;

        /** Call was pulled externally. */
        public static final int FEATURES_PULLED_EXTERNALLY = 0x2;

        /**
         * The phone number as the user entered it.
         * <P>Type: TEXT</P>
+127 −2

File changed.

Preview size limit exceeded, changes collapsed.

Loading