Merge "Move NetworkMonitor to NetworkStack" am: b35979db6b am: 8255355c7d
am: 1ac32eff21
Change-Id: Ia5d742bd5186e92b8a45bb72fb414b9dbdd38f78
This commit is contained in:
@@ -2051,6 +2051,16 @@ public class ConnectivityManager {
|
||||
return (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public NetworkRequest getDefaultRequest() {
|
||||
try {
|
||||
// This is not racy as the default request is final in ConnectivityService.
|
||||
return mService.getDefaultRequest();
|
||||
} catch (RemoteException e) {
|
||||
throw e.rethrowFromSystemServer();
|
||||
}
|
||||
}
|
||||
|
||||
/* TODO: These permissions checks don't belong in client-side code. Move them to
|
||||
* services.jar, possibly in com.android.server.net. */
|
||||
|
||||
|
||||
@@ -167,6 +167,8 @@ interface IConnectivityManager
|
||||
|
||||
int getMultipathPreference(in Network Network);
|
||||
|
||||
NetworkRequest getDefaultRequest();
|
||||
|
||||
int getRestoreDefaultNetworkDelay(int networkType);
|
||||
|
||||
boolean addVpnAddress(String address, int prefixLength);
|
||||
|
||||
Reference in New Issue
Block a user