Merge "Add API for external call audio route."
This commit is contained in:
commit
3907b90f84
@ -40266,6 +40266,7 @@ package android.telecom {
|
||||
field public static final int PROPERTY_NETWORK_IDENTIFIED_EMERGENCY_CALL = 2048; // 0x800
|
||||
field public static final int PROPERTY_RTT = 1024; // 0x400
|
||||
field public static final int PROPERTY_SELF_MANAGED = 256; // 0x100
|
||||
field public static final int PROPERTY_TETHERED_CALL = 32768; // 0x8000
|
||||
field public static final int PROPERTY_VOIP_AUDIO_MODE = 4096; // 0x1000
|
||||
field public static final int PROPERTY_WIFI = 8; // 0x8
|
||||
}
|
||||
@ -40294,6 +40295,7 @@ package android.telecom {
|
||||
field @NonNull public static final android.os.Parcelable.Creator<android.telecom.CallAudioState> CREATOR;
|
||||
field public static final int ROUTE_BLUETOOTH = 2; // 0x2
|
||||
field public static final int ROUTE_EARPIECE = 1; // 0x1
|
||||
field public static final int ROUTE_EXTERNAL = 16; // 0x10
|
||||
field public static final int ROUTE_SPEAKER = 8; // 0x8
|
||||
field public static final int ROUTE_WIRED_HEADSET = 4; // 0x4
|
||||
field public static final int ROUTE_WIRED_OR_EARPIECE = 5; // 0x5
|
||||
@ -40568,6 +40570,7 @@ package android.telecom {
|
||||
field public static final int PROPERTY_IS_RTT = 256; // 0x100
|
||||
field public static final int PROPERTY_NETWORK_IDENTIFIED_EMERGENCY_CALL = 1024; // 0x400
|
||||
field public static final int PROPERTY_SELF_MANAGED = 128; // 0x80
|
||||
field public static final int PROPERTY_TETHERED_CALL = 16384; // 0x4000
|
||||
field public static final int PROPERTY_WIFI = 8; // 0x8
|
||||
field public static final int STATE_ACTIVE = 4; // 0x4
|
||||
field public static final int STATE_DIALING = 3; // 0x3
|
||||
|
@ -701,8 +701,15 @@ public final class Call {
|
||||
*/
|
||||
public static final int PROPERTY_CROSS_SIM = 0x00004000;
|
||||
|
||||
/**
|
||||
* Connection is a tethered external call.
|
||||
* Indicates that the {@link Connection} is fixed on this device but the audio streams are
|
||||
* re-routed to another device.
|
||||
*/
|
||||
public static final int PROPERTY_TETHERED_CALL = 0x00008000;
|
||||
|
||||
//******************************************************************************************
|
||||
// Next PROPERTY value: 0x00004000
|
||||
// Next PROPERTY value: 0x00010000
|
||||
//******************************************************************************************
|
||||
|
||||
private final @CallState int mState;
|
||||
@ -899,6 +906,9 @@ public final class Call {
|
||||
if (hasProperty(properties, PROPERTY_CROSS_SIM)) {
|
||||
builder.append(" PROPERTY_CROSS_SIM");
|
||||
}
|
||||
if (hasProperty(properties, PROPERTY_TETHERED_CALL)) {
|
||||
builder.append(" PROPERTY_TETHERED_CALL");
|
||||
}
|
||||
builder.append("]");
|
||||
return builder.toString();
|
||||
}
|
||||
|
@ -27,7 +27,6 @@ import android.os.Parcelable;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
@ -42,7 +41,8 @@ import java.util.stream.Collectors;
|
||||
public final class CallAudioState implements Parcelable {
|
||||
/** @hide */
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
@IntDef(value={ROUTE_EARPIECE, ROUTE_BLUETOOTH, ROUTE_WIRED_HEADSET, ROUTE_SPEAKER},
|
||||
@IntDef(value = {ROUTE_EARPIECE, ROUTE_BLUETOOTH, ROUTE_WIRED_HEADSET, ROUTE_SPEAKER,
|
||||
ROUTE_EXTERNAL},
|
||||
flag=true)
|
||||
public @interface CallAudioRoute {}
|
||||
|
||||
@ -58,6 +58,9 @@ public final class CallAudioState implements Parcelable {
|
||||
/** Direct the audio stream through the device's speakerphone. */
|
||||
public static final int ROUTE_SPEAKER = 0x00000008;
|
||||
|
||||
/** Direct the audio stream through another device. */
|
||||
public static final int ROUTE_EXTERNAL = 0x00000010;
|
||||
|
||||
/**
|
||||
* Direct the audio stream through the device's earpiece or wired headset if one is
|
||||
* connected.
|
||||
@ -70,7 +73,7 @@ public final class CallAudioState implements Parcelable {
|
||||
* @hide
|
||||
**/
|
||||
public static final int ROUTE_ALL = ROUTE_EARPIECE | ROUTE_BLUETOOTH | ROUTE_WIRED_HEADSET |
|
||||
ROUTE_SPEAKER;
|
||||
ROUTE_SPEAKER | ROUTE_EXTERNAL;
|
||||
|
||||
private final boolean isMuted;
|
||||
private final int route;
|
||||
@ -189,7 +192,11 @@ public final class CallAudioState implements Parcelable {
|
||||
*/
|
||||
@CallAudioRoute
|
||||
public int getSupportedRouteMask() {
|
||||
return supportedRouteMask;
|
||||
if (route == ROUTE_EXTERNAL) {
|
||||
return ROUTE_EXTERNAL;
|
||||
} else {
|
||||
return supportedRouteMask;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -233,6 +240,10 @@ public final class CallAudioState implements Parcelable {
|
||||
listAppend(buffer, "SPEAKER");
|
||||
}
|
||||
|
||||
if ((route & ROUTE_EXTERNAL) == ROUTE_EXTERNAL) {
|
||||
listAppend(buffer, "EXTERNAL");
|
||||
}
|
||||
|
||||
return buffer.toString();
|
||||
}
|
||||
|
||||
|
@ -561,6 +561,15 @@ public abstract class Connection extends Conferenceable {
|
||||
*/
|
||||
public static final int PROPERTY_CROSS_SIM = 1 << 13;
|
||||
|
||||
/**
|
||||
* Connection is a tethered external call.
|
||||
* <p>
|
||||
* Indicates that the {@link Connection} is fixed on this device but the audio streams are
|
||||
* re-routed to another device.
|
||||
* <p>
|
||||
*/
|
||||
public static final int PROPERTY_TETHERED_CALL = 1 << 14;
|
||||
|
||||
//**********************************************************************************************
|
||||
// Next PROPERTY value: 1<<14
|
||||
//**********************************************************************************************
|
||||
|
Loading…
x
Reference in New Issue
Block a user