Rename EXTRA_NETWORK ConnectivityManager constants.

Per b/18414703:

    s/\<EXTRA_NETWORK_REQUEST_NETWORK\>/EXTRA_NETWORK/g
    s/\<EXTRA_NETWORK_REQUEST_NETWORK_REQUEST\>/EXTRA_NETWORK_REQUEST/g

Additionally, associated string values updated to:

    android.net.extra.NETWORK
    android.net.extra.NETWORK_REQUEST

Bug: 18414703
Change-Id: I7aeed2161829742affc666e835a97ce2c28356fe
This commit is contained in:
Erik Kline
2014-11-19 12:12:24 +09:00
parent c52ae42e2f
commit 8a82621cdb
2 changed files with 6 additions and 8 deletions

View File

@@ -2381,15 +2381,14 @@ public class ConnectivityManager {
* successfully finding a network for the applications request. Retrieve it with
* {@link android.content.Intent#getParcelableExtra(String)}.
*/
public static final String EXTRA_NETWORK_REQUEST_NETWORK = "networkRequestNetwork";
public static final String EXTRA_NETWORK = "android.net.extra.NETWORK";
/**
* The lookup key for a {@link NetworkRequest} object included with the intent after
* successfully finding a network for the applications request. Retrieve it with
* {@link android.content.Intent#getParcelableExtra(String)}.
*/
public static final String EXTRA_NETWORK_REQUEST_NETWORK_REQUEST =
"networkRequestNetworkRequest";
public static final String EXTRA_NETWORK_REQUEST = "android.net.extra.NETWORK_REQUEST";
/**
@@ -2405,8 +2404,8 @@ public class ConnectivityManager {
* &lt;receiver&gt; tag in an AndroidManifest.xml file
* <p>
* The operation Intent is delivered with two extras, a {@link Network} typed
* extra called {@link #EXTRA_NETWORK_REQUEST_NETWORK} and a {@link NetworkRequest}
* typed extra called {@link #EXTRA_NETWORK_REQUEST_NETWORK_REQUEST} containing
* extra called {@link #EXTRA_NETWORK} and a {@link NetworkRequest}
* typed extra called {@link #EXTRA_NETWORK_REQUEST} containing
* the original requests parameters. It is important to create a new,
* {@link NetworkCallback} based request before completing the processing of the
* Intent to reserve the network or it will be released shortly after the Intent

View File

@@ -3839,9 +3839,8 @@ public class ConnectivityService extends IConnectivityManager.Stub
int notificationType) {
if (notificationType == ConnectivityManager.CALLBACK_AVAILABLE) {
Intent intent = new Intent();
intent.putExtra(ConnectivityManager.EXTRA_NETWORK_REQUEST_NETWORK, nri.request);
intent.putExtra(ConnectivityManager.EXTRA_NETWORK_REQUEST_NETWORK_REQUEST,
networkAgent.network);
intent.putExtra(ConnectivityManager.EXTRA_NETWORK, nri.request);
intent.putExtra(ConnectivityManager.EXTRA_NETWORK_REQUEST, networkAgent.network);
sendIntent(nri.mPendingIntent, intent);
}
// else not handled