Revert "requestBwUpdate() public API review"
This reverts commit 32f21da41031595a315aaf0eb67f6a094365f2b4.
Change-Id: I8c22d285ff1f56f1bd31a0fa9f2e6a79959347b1
diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java
index 47d5fc6..b341600 100644
--- a/core/java/android/net/ConnectivityManager.java
+++ b/core/java/android/net/ConnectivityManager.java
@@ -2452,19 +2452,17 @@
}
/**
- * 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.
+ * 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.
*
* @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 requestBandwidthUpdate(Network network) {
+ public boolean requestBwUpdate(Network network) {
try {
- return mService.requestBandwidthUpdate(network);
+ return mService.requestBwUpdate(network);
} catch (RemoteException e) {
return false;
}
diff --git a/core/java/android/net/IConnectivityManager.aidl b/core/java/android/net/IConnectivityManager.aidl
index 9152f69..9d9b1bf 100644
--- a/core/java/android/net/IConnectivityManager.aidl
+++ b/core/java/android/net/IConnectivityManager.aidl
@@ -134,7 +134,7 @@
void registerNetworkFactory(in Messenger messenger, in String name);
- boolean requestBandwidthUpdate(in Network network);
+ boolean requestBwUpdate(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 f6f5c6f..b785d3d 100644
--- a/services/core/java/com/android/server/ConnectivityService.java
+++ b/services/core/java/com/android/server/ConnectivityService.java
@@ -3456,7 +3456,7 @@
}
@Override
- public boolean requestBandwidthUpdate(Network network) {
+ public boolean requestBwUpdate(Network network) {
enforceAccessPermission();
NetworkAgentInfo nai = null;
if (network == null) {