Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bba3270c authored by Robert Greenwalt's avatar Robert Greenwalt Committed by Android (Google) Code Review
Browse files

Merge "Revert "requestBwUpdate() public API review""

parents 1c7f96f3 2c22a91d
Loading
Loading
Loading
Loading
+7 −9
Original line number Diff line number Diff line
@@ -2441,19 +2441,17 @@ public class ConnectivityManager {
    }

    /**
     * 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;
        }
+1 −1
Original line number Diff line number Diff line
@@ -134,7 +134,7 @@ interface IConnectivityManager

    void registerNetworkFactory(in Messenger messenger, in String name);

    boolean requestBandwidthUpdate(in Network network);
    boolean requestBwUpdate(in Network network);

    void unregisterNetworkFactory(in Messenger messenger);

+1 −1
Original line number Diff line number Diff line
@@ -3454,7 +3454,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
    }

    @Override
    public boolean requestBandwidthUpdate(Network network) {
    public boolean requestBwUpdate(Network network) {
        enforceAccessPermission();
        NetworkAgentInfo nai = null;
        if (network == null) {