diff --git a/framework/src/android/net/NetworkAgent.java b/framework/src/android/net/NetworkAgent.java index 95b45ce481..d5a1ef3e13 100644 --- a/framework/src/android/net/NetworkAgent.java +++ b/framework/src/android/net/NetworkAgent.java @@ -1236,7 +1236,11 @@ public abstract class NetworkAgent { * @hide TODO: expose something better. */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) - private void sendNetworkInfo(final NetworkInfo networkInfo) { + // NoteĀ : this should be private, but is still called by some OEM network agents + // linking against the full module. They should not do this, and it should be + // forbidden, but as long as there are such devices this can't be made private + // on pain of breaking them. + public void sendNetworkInfo(final NetworkInfo networkInfo) { final NetworkInfo ni = new NetworkInfo(networkInfo); send(reg -> reg.sendNetworkInfo(ni)); }