Implement INetworkMonitorCallbacks#notifyNetworkTestedWithExtras.
INetworkMonitorCallbacks defines notifyNetworkTestedWithExtras() for notifying ConnectivityService of networks being tested along with a PersistableBundle of extras. A new event is introduced for NetworkStateTrackerHandler to notify the ConnectivityDiagnosticsHandler before continuing with the normal processing for "network tested" notifications. The event is also used in the ConnectivityDiagnosticsHandler. Bug: 143187964 Bug: 147391402 Test: compiles. Test: atest CtsNetTestCases FrameworksNetTests Change-Id: Iab29da790c0f5faae68227770bc3a84bbc94f124 (cherry picked from commit c5326407d592490783259a48a8ca653c4ff13122)
This commit is contained in:
@@ -676,7 +676,8 @@ public class ConnectivityDiagnosticsManager {
|
||||
}
|
||||
|
||||
try {
|
||||
mService.registerConnectivityDiagnosticsCallback(binder, request);
|
||||
mService.registerConnectivityDiagnosticsCallback(
|
||||
binder, request, mContext.getOpPackageName());
|
||||
} catch (RemoteException exception) {
|
||||
exception.rethrowFromSystemServer();
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ interface IConnectivityManager
|
||||
boolean isCallerCurrentAlwaysOnVpnLockdownApp();
|
||||
|
||||
void registerConnectivityDiagnosticsCallback(in IConnectivityDiagnosticsCallback callback,
|
||||
in NetworkRequest request);
|
||||
in NetworkRequest request, String callingPackageName);
|
||||
void unregisterConnectivityDiagnosticsCallback(in IConnectivityDiagnosticsCallback callback);
|
||||
|
||||
IBinder startOrGetTestNetworkService();
|
||||
|
||||
@@ -858,8 +858,8 @@ public final class NetworkCapabilities implements Parcelable {
|
||||
*
|
||||
* <p>In general, user-supplied networks (such as WiFi networks) do not have an administrator.
|
||||
*
|
||||
* <p>An app is granted owner privileges over Networks that it supplies. Owner privileges
|
||||
* implicitly include administrator privileges.
|
||||
* <p>An app is granted owner privileges over Networks that it supplies. The owner UID MUST
|
||||
* always be included in administratorUids.
|
||||
*
|
||||
* @param administratorUids the UIDs to be set as administrators of this Network.
|
||||
* @hide
|
||||
|
||||
Reference in New Issue
Block a user