diff options
author | Nancy Chen <nancychen@google.com> | 2014-09-05 11:03:21 -0700 |
---|---|---|
committer | Nancy Chen <nancychen@google.com> | 2014-09-05 13:59:11 -0700 |
commit | 1d834f51df5396653ce669e614f9e7ef2cbd4a06 (patch) | |
tree | 008ce2599ebadc210740f93910fc909d2c43ace7 /telecomm | |
parent | 3512bcd3af103d35c5c3503cecc05fbec053c91f (diff) | |
download | frameworks_base-1d834f51df5396653ce669e614f9e7ef2cbd4a06.zip frameworks_base-1d834f51df5396653ce669e614f9e7ef2cbd4a06.tar.gz frameworks_base-1d834f51df5396653ce669e614f9e7ef2cbd4a06.tar.bz2 |
Rename listener to callback for ConferenceManager and rename strings 1/4
Updates for items from API review. See bug for details.
Bug: 17390175
Change-Id: I716a12b763766a385b08f8731d9533589639f467
Diffstat (limited to 'telecomm')
-rw-r--r-- | telecomm/java/android/telecomm/RemoteConference.java | 36 | ||||
-rw-r--r-- | telecomm/java/android/telecomm/RemoteConnectionService.java | 2 | ||||
-rw-r--r-- | telecomm/java/android/telecomm/TelecommManager.java | 22 |
3 files changed, 30 insertions, 30 deletions
diff --git a/telecomm/java/android/telecomm/RemoteConference.java b/telecomm/java/android/telecomm/RemoteConference.java index 02f6de6..b073827 100644 --- a/telecomm/java/android/telecomm/RemoteConference.java +++ b/telecomm/java/android/telecomm/RemoteConference.java @@ -32,7 +32,7 @@ import java.util.concurrent.CopyOnWriteArraySet; */ public final class RemoteConference { - public abstract static class Listener { + public abstract static class Callback { public void onStateChanged(RemoteConference conference, int oldState, int newState) {} public void onDisconnected(RemoteConference conference, int cause, String message) {} public void onConnectionAdded(RemoteConference conference, RemoteConnection connection) {} @@ -44,7 +44,7 @@ public final class RemoteConference { private final String mId; private final IConnectionService mConnectionService; - private final Set<Listener> mListeners = new CopyOnWriteArraySet<>(); + private final Set<Callback> mCallbacks = new CopyOnWriteArraySet<>(); private final List<RemoteConnection> mChildConnections = new CopyOnWriteArrayList<>(); private final List<RemoteConnection> mUnmodifiableChildConnections = Collections.unmodifiableList(mChildConnections); @@ -70,8 +70,8 @@ public final class RemoteConference { for (RemoteConnection connection : mChildConnections) { connection.setConference(null); } - for (Listener l : mListeners) { - l.onDestroyed(this); + for (Callback c : mCallbacks) { + c.onDestroyed(this); } } @@ -88,8 +88,8 @@ public final class RemoteConference { if (mState != newState) { int oldState = mState; mState = newState; - for (Listener l : mListeners) { - l.onStateChanged(this, oldState, newState); + for (Callback c : mCallbacks) { + c.onStateChanged(this, oldState, newState); } } } @@ -99,8 +99,8 @@ public final class RemoteConference { if (!mChildConnections.contains(connection)) { mChildConnections.add(connection); connection.setConference(this); - for (Listener l : mListeners) { - l.onConnectionAdded(this, connection); + for (Callback c : mCallbacks) { + c.onConnectionAdded(this, connection); } } } @@ -110,8 +110,8 @@ public final class RemoteConference { if (mChildConnections.contains(connection)) { mChildConnections.remove(connection); connection.setConference(null); - for (Listener l : mListeners) { - l.onConnectionRemoved(this, connection); + for (Callback c : mCallbacks) { + c.onConnectionRemoved(this, connection); } } } @@ -120,8 +120,8 @@ public final class RemoteConference { void setCallCapabilities(int capabilities) { if (mCallCapabilities != capabilities) { mCallCapabilities = capabilities; - for (Listener l : mListeners) { - l.onCapabilitiesChanged(this, mCallCapabilities); + for (Callback c : mCallbacks) { + c.onCapabilitiesChanged(this, mCallCapabilities); } } } @@ -132,8 +132,8 @@ public final class RemoteConference { mDisconnectCause = cause; mDisconnectMessage = message; setState(Connection.STATE_DISCONNECTED); - for (Listener l : mListeners) { - l.onDisconnected(this, cause, message); + for (Callback c : mCallbacks) { + c.onDisconnected(this, cause, message); } } } @@ -188,11 +188,11 @@ public final class RemoteConference { return mDisconnectMessage; } - public final void addListener(Listener listener) { - mListeners.add(listener); + public final void addCallback(Callback callback) { + mCallbacks.add(callback); } - public final void removeListener(Listener listener) { - mListeners.remove(listener); + public final void removeCallback(Callback callback) { + mCallbacks.remove(callback); } } diff --git a/telecomm/java/android/telecomm/RemoteConnectionService.java b/telecomm/java/android/telecomm/RemoteConnectionService.java index 0b6badb..79193c2 100644 --- a/telecomm/java/android/telecomm/RemoteConnectionService.java +++ b/telecomm/java/android/telecomm/RemoteConnectionService.java @@ -191,7 +191,7 @@ final class RemoteConnectionService { conference.setState(parcel.getState()); conference.setCallCapabilities(parcel.getCapabilities()); mConferenceById.put(callId, conference); - conference.addListener(new RemoteConference.Listener() { + conference.addCallback(new RemoteConference.Callback() { @Override public void onDestroyed(RemoteConference c) { mConferenceById.remove(callId); diff --git a/telecomm/java/android/telecomm/TelecommManager.java b/telecomm/java/android/telecomm/TelecommManager.java index b8f6964..5e9e6d0 100644 --- a/telecomm/java/android/telecomm/TelecommManager.java +++ b/telecomm/java/android/telecomm/TelecommManager.java @@ -46,34 +46,34 @@ public class TelecommManager { * * @hide */ - public static final String ACTION_INCOMING_CALL = "android.intent.action.INCOMING_CALL"; + public static final String ACTION_INCOMING_CALL = "android.telecomm.action.INCOMING_CALL"; /** * The {@link android.content.Intent} action used to configure a * {@link android.telecomm.ConnectionService}. */ public static final String ACTION_CONNECTION_SERVICE_CONFIGURE = - "android.intent.action.CONNECTION_SERVICE_CONFIGURE"; + "android.telecomm.action.CONNECTION_SERVICE_CONFIGURE"; /** * The {@link android.content.Intent} action used to show the call settings page. */ public static final String ACTION_SHOW_CALL_SETTINGS = - "android.telecomm.intent.action.SHOW_CALL_SETTINGS"; + "android.telecomm.action.SHOW_CALL_SETTINGS"; /** * The {@link android.content.Intent} action used to show the settings page used to configure * {@link PhoneAccount} preferences. */ public static final String ACTION_CHANGE_PHONE_ACCOUNTS = - "android.telecomm.intent.action.CHANGE_PHONE_ACCOUNTS"; + "android.telecomm.action.CHANGE_PHONE_ACCOUNTS"; /** * Optional extra for {@link android.content.Intent#ACTION_CALL} containing a boolean that * determines whether the speakerphone should be automatically turned on for an outgoing call. */ public static final String EXTRA_START_CALL_WITH_SPEAKERPHONE = - "android.intent.extra.START_CALL_WITH_SPEAKERPHONE"; + "android.telecomm.extra.START_CALL_WITH_SPEAKERPHONE"; /** * Optional extra for {@link android.content.Intent#ACTION_CALL} containing an integer that @@ -86,7 +86,7 @@ public class TelecommManager { * @hide */ public static final String EXTRA_START_CALL_WITH_VIDEO_STATE = - "android.intent.extra.START_CALL_WITH_VIDEO_STATE"; + "android.telecomm.extra.START_CALL_WITH_VIDEO_STATE"; /** * The extra used with an {@link android.content.Intent#ACTION_CALL} and @@ -96,7 +96,7 @@ public class TelecommManager { * Retrieve with {@link android.content.Intent#getParcelableExtra(String)}. */ public static final String EXTRA_PHONE_ACCOUNT_HANDLE = - "android.intent.extra.PHONE_ACCOUNT_HANDLE"; + "android.telecomm.extra.PHONE_ACCOUNT_HANDLE"; /** * Optional extra for {@link #ACTION_INCOMING_CALL} containing a {@link Bundle} which contains @@ -106,7 +106,7 @@ public class TelecommManager { * @hide */ public static final String EXTRA_INCOMING_CALL_EXTRAS = - "android.intent.extra.INCOMING_CALL_EXTRAS"; + "android.telecomm.extra.INCOMING_CALL_EXTRAS"; /** * Optional extra for {@link android.content.Intent#ACTION_CALL} and @@ -117,7 +117,7 @@ public class TelecommManager { * @hide */ public static final String EXTRA_OUTGOING_CALL_EXTRAS = - "android.intent.extra.OUTGOING_CALL_EXTRAS"; + "android.telecomm.extra.OUTGOING_CALL_EXTRAS"; /** * Optional extra for {@link android.telephony.TelephonyManager#ACTION_PHONE_STATE_CHANGED} @@ -203,7 +203,7 @@ public class TelecommManager { * @hide */ public static final String ACTION_CURRENT_TTY_MODE_CHANGED = - "android.telecomm.intent.action.CURRENT_TTY_MODE_CHANGED"; + "android.telecomm.action.CURRENT_TTY_MODE_CHANGED"; /** * The lookup key for an int that indicates the current TTY mode. @@ -226,7 +226,7 @@ public class TelecommManager { * @hide */ public static final String ACTION_TTY_PREFERRED_MODE_CHANGED = - "android.telecomm.intent.action.TTY_PREFERRED_MODE_CHANGED"; + "android.telecomm.action.TTY_PREFERRED_MODE_CHANGED"; /** * The lookup key for an int that indicates preferred TTY mode. Valid modes are: - |