diff options
author | fenglu <fenglu@google.com> | 2015-04-21 17:12:05 -0700 |
---|---|---|
committer | fenglu <fenglu@google.com> | 2015-04-21 17:12:05 -0700 |
commit | db57147a55aadca39280ed62516b4a49c69ba177 (patch) | |
tree | f823f1392155464fc210859966ecdba1809b10c5 | |
parent | 8fcd5fee60b468c36aee337da0cadad3cd8cf4cd (diff) | |
download | frameworks_base-db57147a55aadca39280ed62516b4a49c69ba177.zip frameworks_base-db57147a55aadca39280ed62516b4a49c69ba177.tar.gz frameworks_base-db57147a55aadca39280ed62516b4a49c69ba177.tar.bz2 |
update API name to requestBandwidthUpdate()
Change-Id: If26942978ffcc43f06f17dfad5da790f34758395
-rw-r--r-- | core/java/android/net/ConnectivityManager.java | 16 | ||||
-rw-r--r-- | core/java/android/net/IConnectivityManager.aidl | 2 | ||||
-rw-r--r-- | services/core/java/com/android/server/ConnectivityService.java | 2 |
3 files changed, 12 insertions, 8 deletions
diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java index b341600..b1a2b97 100644 --- a/core/java/android/net/ConnectivityManager.java +++ b/core/java/android/net/ConnectivityManager.java @@ -2452,17 +2452,21 @@ public class ConnectivityManager { } /** - * Request connectivityservice to refresh network capabilities for the given - * {@link network}. This method returns true if the network is still active, false - * otherwise. Notice the method call assumes the caller has registered for - * listening NetworkCapabilities updates. + * Requests bandwidth update for a given {@link Network} and returns whether the update request + * is accepted by ConnectivityService. Once accepted, ConnectivityService will poll underlying + * network connection for updated bandwidth information. The caller will be notified via + * {@link ConnectivityManager.NetworkCallback} if there is an update. Notice that this + * method assumes that the caller has previously called {@link #registerNetworkCallback} to + * listen for network changes. * * @param network{@link Network} specifying which network you're interested. + * @return {@code true} on success, {@code false} if the {@link Network} is no longer valid. + * * @hide */ - public boolean requestBwUpdate(Network network) { + public boolean requestBandwidthUpdate(Network network) { try { - return mService.requestBwUpdate(network); + return mService.requestBandwidthUpdate(network); } catch (RemoteException e) { return false; } diff --git a/core/java/android/net/IConnectivityManager.aidl b/core/java/android/net/IConnectivityManager.aidl index 9d9b1bf..9152f69 100644 --- a/core/java/android/net/IConnectivityManager.aidl +++ b/core/java/android/net/IConnectivityManager.aidl @@ -134,7 +134,7 @@ interface IConnectivityManager void registerNetworkFactory(in Messenger messenger, in String name); - boolean requestBwUpdate(in Network network); + boolean requestBandwidthUpdate(in Network network); void unregisterNetworkFactory(in Messenger messenger); diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java index b785d3d..f6f5c6f 100644 --- a/services/core/java/com/android/server/ConnectivityService.java +++ b/services/core/java/com/android/server/ConnectivityService.java @@ -3456,7 +3456,7 @@ public class ConnectivityService extends IConnectivityManager.Stub } @Override - public boolean requestBwUpdate(Network network) { + public boolean requestBandwidthUpdate(Network network) { enforceAccessPermission(); NetworkAgentInfo nai = null; if (network == null) { |