diff options
author | Sailesh Nepal <sail@google.com> | 2014-08-14 17:39:34 -0700 |
---|---|---|
committer | Sailesh Nepal <sail@google.com> | 2014-08-15 01:39:07 +0000 |
commit | 8b9d3ca94189b183a2380ba5b289d9a06eb0493e (patch) | |
tree | d43cf0009433dde9840635abe8580fc4dd8fe99b /telecomm/java/android | |
parent | d3a73b254561f1f2f626d58f775a5d66240b9104 (diff) | |
download | frameworks_base-8b9d3ca94189b183a2380ba5b289d9a06eb0493e.zip frameworks_base-8b9d3ca94189b183a2380ba5b289d9a06eb0493e.tar.gz frameworks_base-8b9d3ca94189b183a2380ba5b289d9a06eb0493e.tar.bz2 |
Include more state in ParcelableConnection
This fixes a bug where setting status hints wouldn't
work.
Bug: 17044602
Change-Id: Ife85b2d53ead38f54dac350adc09b8c9d052fda4
Diffstat (limited to 'telecomm/java/android')
-rw-r--r-- | telecomm/java/android/telecomm/ConnectionService.java | 5 | ||||
-rw-r--r-- | telecomm/java/android/telecomm/ParcelableConnection.java | 34 |
2 files changed, 36 insertions, 3 deletions
diff --git a/telecomm/java/android/telecomm/ConnectionService.java b/telecomm/java/android/telecomm/ConnectionService.java index d5e4f1b..44aacfc 100644 --- a/telecomm/java/android/telecomm/ConnectionService.java +++ b/telecomm/java/android/telecomm/ConnectionService.java @@ -539,7 +539,10 @@ public abstract class ConnectionService extends Service { connection.getCallerDisplayNamePresentation(), connection.getVideoProvider() == null ? null : connection.getVideoProvider().getInterface(), - connection.getVideoState())); + connection.getVideoState(), + connection.isRequestingRingback(), + connection.getAudioModeIsVoip(), + connection.getStatusHints())); } private void abort(String callId) { diff --git a/telecomm/java/android/telecomm/ParcelableConnection.java b/telecomm/java/android/telecomm/ParcelableConnection.java index 78dd64a..7a87b87 100644 --- a/telecomm/java/android/telecomm/ParcelableConnection.java +++ b/telecomm/java/android/telecomm/ParcelableConnection.java @@ -38,6 +38,9 @@ public final class ParcelableConnection implements Parcelable { private int mCallerDisplayNamePresentation; private IVideoProvider mVideoProvider; private int mVideoState; + private boolean mRequestingRingback; + private boolean mAudioModeIsVoip; + private StatusHints mStatusHints; /** @hide */ public ParcelableConnection( @@ -49,7 +52,10 @@ public final class ParcelableConnection implements Parcelable { String callerDisplayName, int callerDisplayNamePresentation, IVideoProvider videoProvider, - int videoState) { + int videoState, + boolean requestingRingback, + boolean audioModeIsVoip, + StatusHints statusHints) { mPhoneAccount = phoneAccount; mState = state; mCapabilities = capabilities; @@ -59,6 +65,9 @@ public final class ParcelableConnection implements Parcelable { mCallerDisplayNamePresentation = callerDisplayNamePresentation; mVideoProvider = videoProvider; mVideoState = videoState; + mRequestingRingback = requestingRingback; + mAudioModeIsVoip = audioModeIsVoip; + mStatusHints = statusHints; } public PhoneAccountHandle getPhoneAccount() { @@ -98,6 +107,18 @@ public final class ParcelableConnection implements Parcelable { return mVideoState; } + public boolean isRequestingRingback() { + return mRequestingRingback; + } + + public boolean getAudioModeIsVoip() { + return mAudioModeIsVoip; + } + + public final StatusHints getStatusHints() { + return mStatusHints; + } + @Override public String toString() { return new StringBuilder() @@ -126,6 +147,9 @@ public final class ParcelableConnection implements Parcelable { IVideoProvider videoCallProvider = IVideoProvider.Stub.asInterface(source.readStrongBinder()); int videoState = source.readInt(); + boolean requestingRingback = source.readByte() == 1; + boolean audioModeIsVoip = source.readByte() == 1; + StatusHints statusHints = source.readParcelable(classLoader); return new ParcelableConnection( phoneAccount, @@ -136,7 +160,10 @@ public final class ParcelableConnection implements Parcelable { callerDisplayName, callerDisplayNamePresentation, videoCallProvider, - videoState); + videoState, + requestingRingback, + audioModeIsVoip, + statusHints); } @Override @@ -164,5 +191,8 @@ public final class ParcelableConnection implements Parcelable { destination.writeStrongBinder( mVideoProvider != null ? mVideoProvider.asBinder() : null); destination.writeInt(mVideoState); + destination.writeByte((byte) (mRequestingRingback ? 1 : 0)); + destination.writeByte((byte) (mAudioModeIsVoip ? 1 : 0)); + destination.writeParcelable(mStatusHints, 0); } } |