summaryrefslogtreecommitdiff
path: root/telecomm/java/android/telecom/ParcelableCall.java
diff options
context:
space:
mode:
authorChristine Hallstrom <hallstrom@google.com>2016-11-30 16:06:42 -0800
committerHall Liu <hallliu@google.com>2016-12-13 17:48:50 -0800
commit2830ce9a096301acac8cc3dadeb2bf9a03edc4e3 (patch)
tree59e245b5c9ab452b8ab517cfabdc481e40ba4e70 /telecomm/java/android/telecom/ParcelableCall.java
parentfbeacb02c0fe331242dd1815a28e2b2f1d5a42c6 (diff)
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
Diffstat (limited to 'telecomm/java/android/telecom/ParcelableCall.java')
-rw-r--r--telecomm/java/android/telecom/ParcelableCall.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/telecomm/java/android/telecom/ParcelableCall.java b/telecomm/java/android/telecom/ParcelableCall.java
index 4a6fd7c16c1a..f7a6595241e0 100644
--- a/telecomm/java/android/telecom/ParcelableCall.java
+++ b/telecomm/java/android/telecom/ParcelableCall.java
@@ -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