diff options
author | Andrew Lee <anwlee@google.com> | 2015-04-16 13:11:55 -0700 |
---|---|---|
committer | Andrew Lee <anwlee@google.com> | 2015-04-16 13:11:55 -0700 |
commit | 0f51da328d11f8709d99890a61d6b4021a2207a5 (patch) | |
tree | 8af6b1a21abc93107c47e3f679296b6b1f3cf1be /telecomm | |
parent | 167c3a717f0538615a593f946031d0980943b93a (diff) | |
parent | edc625f52e5db5d0cb3d60387218f8f8365167f7 (diff) | |
download | frameworks_base-0f51da328d11f8709d99890a61d6b4021a2207a5.zip frameworks_base-0f51da328d11f8709d99890a61d6b4021a2207a5.tar.gz frameworks_base-0f51da328d11f8709d99890a61d6b4021a2207a5.tar.bz2 |
resolve merge conflicts of edc625f to m-wireless-dev.
Change-Id: Ibbcd764505ccc38f9f61c96993d979a099f1cc6b
Diffstat (limited to 'telecomm')
-rw-r--r-- | telecomm/java/android/telecom/Conference.java | 21 | ||||
-rw-r--r-- | telecomm/java/android/telecom/ConnectionService.java | 9 | ||||
-rw-r--r-- | telecomm/java/android/telecom/ParcelableConference.java | 27 |
3 files changed, 42 insertions, 15 deletions
diff --git a/telecomm/java/android/telecom/Conference.java b/telecomm/java/android/telecom/Conference.java index 15a1da1..3acf945 100644 --- a/telecomm/java/android/telecom/Conference.java +++ b/telecomm/java/android/telecom/Conference.java @@ -50,6 +50,7 @@ public abstract class Conference implements IConferenceable { Conference conference, int connectionCapabilities) {} public void onVideoStateChanged(Conference c, int videoState) { } public void onVideoProviderChanged(Conference c, Connection.VideoProvider videoProvider) {} + public void onStatusHintsChanged(Conference conference, StatusHints statusHints) {} } private final Set<Listener> mListeners = new CopyOnWriteArraySet<>(); @@ -67,6 +68,7 @@ public abstract class Conference implements IConferenceable { private int mConnectionCapabilities; private String mDisconnectMessage; private long mConnectTimeMillis = CONNECT_TIME_NOT_SPECIFIED; + private StatusHints mStatusHints; private final Connection.Listener mConnectionDeathListener = new Connection.Listener() { @Override @@ -535,4 +537,23 @@ public abstract class Conference implements IConferenceable { getVideoProvider(), super.toString()); } + + /** + * Sets the label and icon status to display in the InCall UI. + * + * @param statusHints The status label and icon to set. + */ + public final void setStatusHints(StatusHints statusHints) { + mStatusHints = statusHints; + for (Listener l : mListeners) { + l.onStatusHintsChanged(this, statusHints); + } + } + + /** + * @return The status hints for this conference. + */ + public final StatusHints getStatusHints() { + return mStatusHints; + } } diff --git a/telecomm/java/android/telecom/ConnectionService.java b/telecomm/java/android/telecom/ConnectionService.java index e36d32b..05a0d08 100644 --- a/telecomm/java/android/telecom/ConnectionService.java +++ b/telecomm/java/android/telecom/ConnectionService.java @@ -427,6 +427,12 @@ public abstract class ConnectionService extends Service { videoProvider); mAdapter.setVideoProvider(id, videoProvider); } + + @Override + public void onStatusHintsChanged(Conference conference, StatusHints statusHints) { + String id = mIdByConference.get(conference); + mAdapter.setStatusHints(id, statusHints); + } }; private final Connection.Listener mConnectionListener = new Connection.Listener() { @@ -912,7 +918,8 @@ public abstract class ConnectionService extends Service { null : conference.getVideoProvider().getInterface(), conference.getVideoState(), conference.getConnectTimeMillis() - ); + conference.getStatusHints()); + mAdapter.addConferenceCall(id, parcelableConference); mAdapter.setVideoProvider(id, conference.getVideoProvider()); mAdapter.setVideoState(id, conference.getVideoState()); diff --git a/telecomm/java/android/telecom/ParcelableConference.java b/telecomm/java/android/telecom/ParcelableConference.java index 6a221e6..e54e79d 100644 --- a/telecomm/java/android/telecom/ParcelableConference.java +++ b/telecomm/java/android/telecom/ParcelableConference.java @@ -34,9 +34,10 @@ public final class ParcelableConference implements Parcelable { private int mState; private int mConnectionCapabilities; private List<String> mConnectionIds; - private long mConnectTimeMillis; + private long mConnectTimeMillis = Conference.CONNECT_TIME_NOT_SPECIFIED; private final IVideoProvider mVideoProvider; private final int mVideoState; + private StatusHints mStatusHints; public ParcelableConference( PhoneAccountHandle phoneAccount, @@ -44,7 +45,9 @@ public final class ParcelableConference implements Parcelable { int connectionCapabilities, List<String> connectionIds, IVideoProvider videoProvider, - int videoState) { + int videoState, + long connectTimeMillis, + StatusHints statusHints) { mPhoneAccount = phoneAccount; mState = state; mConnectionCapabilities = connectionCapabilities; @@ -52,18 +55,8 @@ public final class ParcelableConference implements Parcelable { mConnectTimeMillis = Conference.CONNECT_TIME_NOT_SPECIFIED; mVideoProvider = videoProvider; mVideoState = videoState; - } - - public ParcelableConference( - PhoneAccountHandle phoneAccount, - int state, - int connectionCapabilities, - List<String> connectionIds, - IVideoProvider videoProvider, - int videoState, - long connectTimeMillis) { - this(phoneAccount, state, connectionCapabilities, connectionIds, videoProvider, videoState); mConnectTimeMillis = connectTimeMillis; + mStatusHints = statusHints; } @Override @@ -113,6 +106,10 @@ public final class ParcelableConference implements Parcelable { return mVideoState; } + public StatusHints getStatusHints() { + return mStatusHints; + } + public static final Parcelable.Creator<ParcelableConference> CREATOR = new Parcelable.Creator<ParcelableConference> () { @Override @@ -124,13 +121,14 @@ public final class ParcelableConference implements Parcelable { List<String> connectionIds = new ArrayList<>(2); source.readList(connectionIds, classLoader); long connectTimeMillis = source.readLong(); + StatusHints statusHints = source.readParcelable(classLoader); IVideoProvider videoCallProvider = IVideoProvider.Stub.asInterface(source.readStrongBinder()); int videoState = source.readInt(); return new ParcelableConference(phoneAccount, state, capabilities, connectionIds, - videoCallProvider, videoState, connectTimeMillis); + videoCallProvider, videoState, connectTimeMillis, statusHints); } @Override @@ -156,5 +154,6 @@ public final class ParcelableConference implements Parcelable { destination.writeStrongBinder( mVideoProvider != null ? mVideoProvider.asBinder() : null); destination.writeInt(mVideoState); + destination.writeParcelable(mStatusHints, 0); } } |