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:
@@ -2381,15 +2381,14 @@ public class ConnectivityManager {
|
|||||||
* successfully finding a network for the applications request. Retrieve it with
|
* successfully finding a network for the applications request. Retrieve it with
|
||||||
* {@link android.content.Intent#getParcelableExtra(String)}.
|
* {@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
|
* The lookup key for a {@link NetworkRequest} object included with the intent after
|
||||||
* successfully finding a network for the applications request. Retrieve it with
|
* successfully finding a network for the applications request. Retrieve it with
|
||||||
* {@link android.content.Intent#getParcelableExtra(String)}.
|
* {@link android.content.Intent#getParcelableExtra(String)}.
|
||||||
*/
|
*/
|
||||||
public static final String EXTRA_NETWORK_REQUEST_NETWORK_REQUEST =
|
public static final String EXTRA_NETWORK_REQUEST = "android.net.extra.NETWORK_REQUEST";
|
||||||
"networkRequestNetworkRequest";
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2405,8 +2404,8 @@ public class ConnectivityManager {
|
|||||||
* <receiver> tag in an AndroidManifest.xml file
|
* <receiver> tag in an AndroidManifest.xml file
|
||||||
* <p>
|
* <p>
|
||||||
* The operation Intent is delivered with two extras, a {@link Network} typed
|
* The operation Intent is delivered with two extras, a {@link Network} typed
|
||||||
* extra called {@link #EXTRA_NETWORK_REQUEST_NETWORK} and a {@link NetworkRequest}
|
* extra called {@link #EXTRA_NETWORK} and a {@link NetworkRequest}
|
||||||
* typed extra called {@link #EXTRA_NETWORK_REQUEST_NETWORK_REQUEST} containing
|
* typed extra called {@link #EXTRA_NETWORK_REQUEST} containing
|
||||||
* the original requests parameters. It is important to create a new,
|
* the original requests parameters. It is important to create a new,
|
||||||
* {@link NetworkCallback} based request before completing the processing of the
|
* {@link NetworkCallback} based request before completing the processing of the
|
||||||
* Intent to reserve the network or it will be released shortly after the Intent
|
* Intent to reserve the network or it will be released shortly after the Intent
|
||||||
|
|||||||
@@ -3839,9 +3839,8 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
int notificationType) {
|
int notificationType) {
|
||||||
if (notificationType == ConnectivityManager.CALLBACK_AVAILABLE) {
|
if (notificationType == ConnectivityManager.CALLBACK_AVAILABLE) {
|
||||||
Intent intent = new Intent();
|
Intent intent = new Intent();
|
||||||
intent.putExtra(ConnectivityManager.EXTRA_NETWORK_REQUEST_NETWORK, nri.request);
|
intent.putExtra(ConnectivityManager.EXTRA_NETWORK, nri.request);
|
||||||
intent.putExtra(ConnectivityManager.EXTRA_NETWORK_REQUEST_NETWORK_REQUEST,
|
intent.putExtra(ConnectivityManager.EXTRA_NETWORK_REQUEST, networkAgent.network);
|
||||||
networkAgent.network);
|
|
||||||
sendIntent(nri.mPendingIntent, intent);
|
sendIntent(nri.mPendingIntent, intent);
|
||||||
}
|
}
|
||||||
// else not handled
|
// else not handled
|
||||||
|
|||||||
Reference in New Issue
Block a user