Remove legacy network factories

Nothing on the system is using registerNetworkFactory,
unregisterNetworkFactory at the moment.

registerNetworkFactory, unregisterNetworkFactory are protected by
signature permissions, so could not be used by anything outside of the
system.

Remove the two methods and the underlying support for this legacy,
deprecated mechanism.

Bug: 179229316
Test: atest FrameworksNetTests
Change-Id: I7cdc9eed67f846c8774474af038133040aeccab3
This commit is contained in:
Remi NGUYEN VAN
2021-02-04 18:04:43 +09:00
parent c6bf15898a
commit 773d918ade
3 changed files with 10 additions and 82 deletions

View File

@@ -3231,32 +3231,6 @@ public class ConnectivityManager {
}
}
/** {@hide} - returns the factory serial number */
@UnsupportedAppUsage
@RequiresPermission(anyOf = {
NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK,
android.Manifest.permission.NETWORK_FACTORY})
public int registerNetworkFactory(Messenger messenger, String name) {
try {
return mService.registerNetworkFactory(messenger, name);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
/** {@hide} */
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
@RequiresPermission(anyOf = {
NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK,
android.Manifest.permission.NETWORK_FACTORY})
public void unregisterNetworkFactory(Messenger messenger) {
try {
mService.unregisterNetworkFactory(messenger);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
/**
* Registers the specified {@link NetworkProvider}.
* Each listener must only be registered once. The listener can be unregistered with