diff options
author | Etan Cohen <etancohen@google.com> | 2015-04-24 14:02:07 -0700 |
---|---|---|
committer | Etan Cohen <etancohen@google.com> | 2015-04-24 14:02:07 -0700 |
commit | 94f2c27aca75bf96a5600ada7395f34cc2df42ce (patch) | |
tree | 1394a21f5c59026dc55b275e12bd0be354511372 | |
parent | bd3dfa9d652eaa5bd2d0ef1236d83498112b8914 (diff) | |
parent | 7f61051949875edf4bfbf29b00ad6f2ede61d6cb (diff) | |
download | frameworks_base-94f2c27aca75bf96a5600ada7395f34cc2df42ce.zip frameworks_base-94f2c27aca75bf96a5600ada7395f34cc2df42ce.tar.gz frameworks_base-94f2c27aca75bf96a5600ada7395f34cc2df42ce.tar.bz2 |
Merge commit '7f61051' into merge2
-rw-r--r-- | api/current.txt | 2 | ||||
-rw-r--r-- | api/system-current.txt | 2 | ||||
-rw-r--r-- | telecomm/java/android/telecom/Conference.java | 21 | ||||
-rw-r--r-- | telecomm/java/android/telecom/ConnectionService.java | 11 | ||||
-rw-r--r-- | telecomm/java/android/telecom/ParcelableConference.java | 27 | ||||
-rw-r--r-- | wifi/java/android/net/wifi/RttManager.java | 11 |
6 files changed, 57 insertions, 17 deletions
diff --git a/api/current.txt b/api/current.txt index 83c2d58..6accb34 100644 --- a/api/current.txt +++ b/api/current.txt @@ -30219,6 +30219,7 @@ package android.telecom { method public final android.telecom.PhoneAccountHandle getPhoneAccountHandle(); method public android.telecom.Connection getPrimaryConnection(); method public final int getState(); + method public final android.telecom.StatusHints getStatusHints(); method public void onAudioStateChanged(android.telecom.AudioState); method public void onConnectionAdded(android.telecom.Connection); method public void onDisconnect(); @@ -30237,6 +30238,7 @@ package android.telecom { method public final void setConnectionCapabilities(int); method public final void setDisconnected(android.telecom.DisconnectCause); method public final void setOnHold(); + method public final void setStatusHints(android.telecom.StatusHints); field public static final long CONNECT_TIME_NOT_SPECIFIED = 0L; // 0x0L } diff --git a/api/system-current.txt b/api/system-current.txt index f2376ac..6c321ad 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -32330,6 +32330,7 @@ package android.telecom { method public final android.telecom.PhoneAccountHandle getPhoneAccountHandle(); method public android.telecom.Connection getPrimaryConnection(); method public final int getState(); + method public final android.telecom.StatusHints getStatusHints(); method public void onAudioStateChanged(android.telecom.AudioState); method public void onConnectionAdded(android.telecom.Connection); method public void onDisconnect(); @@ -32348,6 +32349,7 @@ package android.telecom { method public final void setConnectionCapabilities(int); method public final void setDisconnected(android.telecom.DisconnectCause); method public final void setOnHold(); + method public final void setStatusHints(android.telecom.StatusHints); field public static final long CONNECT_TIME_NOT_SPECIFIED = 0L; // 0x0L } diff --git a/telecomm/java/android/telecom/Conference.java b/telecomm/java/android/telecom/Conference.java index bab60fe..0424548 100644 --- a/telecomm/java/android/telecom/Conference.java +++ b/telecomm/java/android/telecom/Conference.java @@ -50,6 +50,7 @@ public abstract class Conference implements Conferenceable { 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 Conferenceable { 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 Conferenceable { 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 9812815..c039acf 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() { @@ -903,8 +909,9 @@ public abstract class ConnectionService extends Service { conference.getVideoProvider() == null ? null : conference.getVideoProvider().getInterface(), conference.getVideoState(), - conference.getConnectTimeMillis() - ); + 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); } } diff --git a/wifi/java/android/net/wifi/RttManager.java b/wifi/java/android/net/wifi/RttManager.java index b156d0c..ca169f8 100644 --- a/wifi/java/android/net/wifi/RttManager.java +++ b/wifi/java/android/net/wifi/RttManager.java @@ -808,7 +808,7 @@ public class RttManager { if (mRttCapabilities == null) { if(getRttCapabilities() == null) { Log.e(TAG, "Can not get RTT capabilities"); - //throw new IllegalStateException("RTT chip is not working"); + throw new IllegalStateException("RTT chip is not working"); } } @@ -866,6 +866,15 @@ public class RttManager { return true; } + /** + * Request to start an RTT ranging + * + * @param params -- RTT request Parameters + * @param listener -- Call back to inform RTT result + * @exception throw IllegalArgumentException when params are illegal + * throw IllegalStateException when RttCapabilities do not exist + */ + public void startRanging(RttParams[] params, RttListener listener) { int index = 0; for(RttParams rttParam : params) { |