diff options
Diffstat (limited to 'telecomm/java/android')
| -rw-r--r-- | telecomm/java/android/telecom/Conference.java | 2 | ||||
| -rw-r--r-- | telecomm/java/android/telecom/Conferenceable.java | 26 | ||||
| -rw-r--r-- | telecomm/java/android/telecom/Connection.java | 16 | ||||
| -rw-r--r-- | telecomm/java/android/telecom/ConnectionService.java | 10 | ||||
| -rw-r--r-- | telecomm/java/android/telecom/IConferenceable.java | 8 |
5 files changed, 45 insertions, 17 deletions
diff --git a/telecomm/java/android/telecom/Conference.java b/telecomm/java/android/telecom/Conference.java index 15a1da1..bab60fe 100644 --- a/telecomm/java/android/telecom/Conference.java +++ b/telecomm/java/android/telecom/Conference.java @@ -29,7 +29,7 @@ import java.util.concurrent.CopyOnWriteArraySet; /** * Represents a conference call which can contain any number of {@link Connection} objects. */ -public abstract class Conference implements IConferenceable { +public abstract class Conference implements Conferenceable { /** * Used to indicate that the conference connection time is not specified. If not specified, diff --git a/telecomm/java/android/telecom/Conferenceable.java b/telecomm/java/android/telecom/Conferenceable.java new file mode 100644 index 0000000..5c4cbc5 --- /dev/null +++ b/telecomm/java/android/telecom/Conferenceable.java @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2015 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License + */ + +package android.telecom; + +/** + * Interface used to identify entities with which another entity can participate in a conference + * call with. The {@link ConnectionService} implementation will only recognize + * {@link Conferenceable}s which are {@link Connection}s or {@link Conference}s. + */ +public interface Conferenceable { + +} diff --git a/telecomm/java/android/telecom/Connection.java b/telecomm/java/android/telecom/Connection.java index 11632dc..e79584f 100644 --- a/telecomm/java/android/telecom/Connection.java +++ b/telecomm/java/android/telecom/Connection.java @@ -44,7 +44,7 @@ import java.util.concurrent.ConcurrentHashMap; * must call {@link #destroy()} to signal to the framework that the {@code Connection} is no * longer used and associated resources may be recovered. */ -public abstract class Connection implements IConferenceable { +public abstract class Connection implements Conferenceable { public static final int STATE_INITIALIZING = 0; @@ -332,7 +332,7 @@ public abstract class Connection implements IConferenceable { public void onAudioModeIsVoipChanged(Connection c, boolean isVoip) {} public void onStatusHintsChanged(Connection c, StatusHints statusHints) {} public void onConferenceablesChanged( - Connection c, List<IConferenceable> conferenceables) {} + Connection c, List<Conferenceable> conferenceables) {} public void onConferenceChanged(Connection c, Conference conference) {} /** @hide */ public void onConferenceParticipantsChanged(Connection c, @@ -745,8 +745,8 @@ public abstract class Connection implements IConferenceable { */ private final Set<Listener> mListeners = Collections.newSetFromMap( new ConcurrentHashMap<Listener, Boolean>(8, 0.9f, 1)); - private final List<IConferenceable> mConferenceables = new ArrayList<>(); - private final List<IConferenceable> mUnmodifiableConferenceables = + private final List<Conferenceable> mConferenceables = new ArrayList<>(); + private final List<Conferenceable> mUnmodifiableConferenceables = Collections.unmodifiableList(mConferenceables); private int mState = STATE_NEW; @@ -1199,9 +1199,9 @@ public abstract class Connection implements IConferenceable { * * @param conferenceables The conferenceables. */ - public final void setConferenceables(List<IConferenceable> conferenceables) { + public final void setConferenceables(List<Conferenceable> conferenceables) { clearConferenceableList(); - for (IConferenceable c : conferenceables) { + for (Conferenceable c : conferenceables) { // If statement checks for duplicates in input. It makes it N^2 but we're dealing with a // small amount of items here. if (!mConferenceables.contains(c)) { @@ -1221,7 +1221,7 @@ public abstract class Connection implements IConferenceable { /** * Returns the connections or conferences with which this connection can be conferenced. */ - public final List<IConferenceable> getConferenceables() { + public final List<Conferenceable> getConferenceables() { return mUnmodifiableConferenceables; } @@ -1486,7 +1486,7 @@ public abstract class Connection implements IConferenceable { } private final void clearConferenceableList() { - for (IConferenceable c : mConferenceables) { + for (Conferenceable c : mConferenceables) { if (c instanceof Connection) { Connection connection = (Connection) c; connection.removeConnectionListener(mConnectionDeathListener); diff --git a/telecomm/java/android/telecom/ConnectionService.java b/telecomm/java/android/telecom/ConnectionService.java index 73d1644..9812815 100644 --- a/telecomm/java/android/telecom/ConnectionService.java +++ b/telecomm/java/android/telecom/ConnectionService.java @@ -539,7 +539,7 @@ public abstract class ConnectionService extends Service { @Override public void onConferenceablesChanged( - Connection connection, List<IConferenceable> conferenceables) { + Connection connection, List<Conferenceable> conferenceables) { mAdapter.setConferenceableConnections( mIdByConnection.get(connection), createIdList(conferenceables)); @@ -1168,14 +1168,14 @@ public abstract class ConnectionService extends Service { /** * Builds a list of {@link Connection} and {@link Conference} IDs based on the list of - * {@link IConferenceable}s passed in. + * {@link Conferenceable}s passed in. * - * @param conferenceables The {@link IConferenceable} connections and conferences. + * @param conferenceables The {@link Conferenceable} connections and conferences. * @return List of string conference and call Ids. */ - private List<String> createIdList(List<IConferenceable> conferenceables) { + private List<String> createIdList(List<Conferenceable> conferenceables) { List<String> ids = new ArrayList<>(); - for (IConferenceable c : conferenceables) { + for (Conferenceable c : conferenceables) { // Only allow Connection and Conference conferenceables. if (c instanceof Connection) { Connection connection = (Connection) c; diff --git a/telecomm/java/android/telecom/IConferenceable.java b/telecomm/java/android/telecom/IConferenceable.java index a9be20b..a664baa 100644 --- a/telecomm/java/android/telecom/IConferenceable.java +++ b/telecomm/java/android/telecom/IConferenceable.java @@ -19,8 +19,10 @@ package android.telecom; /** * Interface used to identify entities with which another entity can participate in a conference * call with. The {@link ConnectionService} implementation will only recognize - * {@link IConferenceable}s which are {@link Connection}s or {@link Conference}s. + * {@link Conferenceable}s which are {@link Connection}s or {@link Conference}s. + * <p> + * @deprecated use {@link Conferenceable} instead. + * @hide */ -public interface IConferenceable { - +public interface IConferenceable extends Conferenceable { } |
