From 5a97ed19a82f7e80f1688cb88be3ff069c211a72 Mon Sep 17 00:00:00 2001 From: Lorenzo Colitti Date: Thu, 26 Nov 2015 11:03:17 +0900 Subject: [PATCH] Fix javadoc for the NetworkRequest version of requestNetwork. The documentation for this method says that the request can be released using releaseNetworkRequest, but that's not true. releaseNetworkRequest only takes a PendingIntent, and can only be used to release a request filed with a PendingIntent. Fix the docs to say that the request needs to be released using unregisterNetworkCallback. Change-Id: If044fd2d463ab8d09874172d5d56946251057a3c --- core/java/android/net/ConnectivityManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java index a5f712e4a9..e65edb7244 100644 --- a/core/java/android/net/ConnectivityManager.java +++ b/core/java/android/net/ConnectivityManager.java @@ -2540,7 +2540,7 @@ public class ConnectivityManager { * This function behaves identically to the non-timedout version, but if a suitable * network is not found within the given time (in milliseconds) the * {@link NetworkCallback#unavailable} callback is called. The request must - * still be released normally by calling {@link releaseNetworkRequest}. + * still be released normally by calling {@link unregisterNetworkCallback}. * *

This method requires the caller to hold either the * {@link android.Manifest.permission#CHANGE_NETWORK_STATE} permission