Add ability to set supported audio routes on phone accounts and connection
The set audio routes are used by Telecom to restrict where the audio may be routed to. For example, an account can specify that calls may not be routed over bluetooth headsets, which will prevent a new call from being routed to this source. This is a cherry-pick of abandoned ag/1521009. Bug: 32958838 Change-Id: Idd5e4d38b157f11454f3d991385644f2f384596e
This commit is contained in:
committed by
Hall Liu
parent
fbeacb02c0
commit
2830ce9a09
@@ -39,6 +39,7 @@ public final class ParcelableCall implements Parcelable {
|
||||
private final List<String> mCannedSmsResponses;
|
||||
private final int mCapabilities;
|
||||
private final int mProperties;
|
||||
private final int mSupportedAudioRoutes;
|
||||
private final long mConnectTimeMillis;
|
||||
private final Uri mHandle;
|
||||
private final int mHandlePresentation;
|
||||
@@ -64,6 +65,7 @@ public final class ParcelableCall implements Parcelable {
|
||||
List<String> cannedSmsResponses,
|
||||
int capabilities,
|
||||
int properties,
|
||||
int supportedAudioRoutes,
|
||||
long connectTimeMillis,
|
||||
Uri handle,
|
||||
int handlePresentation,
|
||||
@@ -86,6 +88,7 @@ public final class ParcelableCall implements Parcelable {
|
||||
mCannedSmsResponses = cannedSmsResponses;
|
||||
mCapabilities = capabilities;
|
||||
mProperties = properties;
|
||||
mSupportedAudioRoutes = supportedAudioRoutes;
|
||||
mConnectTimeMillis = connectTimeMillis;
|
||||
mHandle = handle;
|
||||
mHandlePresentation = handlePresentation;
|
||||
@@ -137,6 +140,11 @@ public final class ParcelableCall implements Parcelable {
|
||||
/** Bitmask of properties of the call. */
|
||||
public int getProperties() { return mProperties; }
|
||||
|
||||
/** Bitmask of supported routes of the call */
|
||||
public int getSupportedAudioRoutes() {
|
||||
return mSupportedAudioRoutes;
|
||||
}
|
||||
|
||||
/** The time that the call switched to the active state. */
|
||||
public long getConnectTimeMillis() {
|
||||
return mConnectTimeMillis;
|
||||
@@ -292,6 +300,7 @@ public final class ParcelableCall implements Parcelable {
|
||||
source.readList(conferenceableCallIds, classLoader);
|
||||
Bundle intentExtras = source.readBundle(classLoader);
|
||||
Bundle extras = source.readBundle(classLoader);
|
||||
int supportedAudioRoutes = source.readInt();
|
||||
return new ParcelableCall(
|
||||
id,
|
||||
state,
|
||||
@@ -299,6 +308,7 @@ public final class ParcelableCall implements Parcelable {
|
||||
cannedSmsResponses,
|
||||
capabilities,
|
||||
properties,
|
||||
supportedAudioRoutes,
|
||||
connectTimeMillis,
|
||||
handle,
|
||||
handlePresentation,
|
||||
@@ -355,6 +365,7 @@ public final class ParcelableCall implements Parcelable {
|
||||
destination.writeList(mConferenceableCallIds);
|
||||
destination.writeBundle(mIntentExtras);
|
||||
destination.writeBundle(mExtras);
|
||||
destination.writeInt(mSupportedAudioRoutes);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user