Make NetworkAgent#sendNetworkInfo public again
Changing this method to private broke OEM code that would link
directly against the non-public methods of the module. This
should not be allowed, and we have changes in the works to
disallow this, but in the mean time we can't afford to break
devices in the field.
Test: will have to see how it behaves in the lab on relevant devices
Flag: EXEMPT bugfix
Bug: 406489362
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:f7e102081d578454ed9eea8616927fbf5100a6ce)
Merged-In: Ie6c1ebb04e49317fdda34ff3dd522cd9d4677556
Change-Id: Ie6c1ebb04e49317fdda34ff3dd522cd9d4677556
diff --git a/framework/src/android/net/NetworkAgent.java b/framework/src/android/net/NetworkAgent.java
index 95b45ce..d5a1ef3 100644
--- a/framework/src/android/net/NetworkAgent.java
+++ b/framework/src/android/net/NetworkAgent.java
@@ -1236,7 +1236,11 @@
* @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));
}