From cfb033e324f637a9d508ce7376b1cbc09e4cd5e5 Mon Sep 17 00:00:00 2001 From: David Su Date: Fri, 28 Aug 2020 13:15:07 -0700 Subject: LINK_CONFIGURATION_CHANGED broadcast: stop including EXTRA_LINK_PROPERTIES This extra is unused, and potentially exposes sensitive information that can be accessed without any permissions. Bug: 162246414 Test: atest FrameworksWifiTests Change-Id: I57c3db765283d8bbb410a0b790e27054c5ab561a Merged-In: I57c3db765283d8bbb410a0b790e27054c5ab561a --- wifi/java/android/net/wifi/WifiManager.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'wifi') diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java index fb6af5b550b0..4a61db894b89 100644 --- a/wifi/java/android/net/wifi/WifiManager.java +++ b/wifi/java/android/net/wifi/WifiManager.java @@ -1054,8 +1054,8 @@ public class WifiManager { /** * Broadcast intent action indicating that the link configuration changed on wifi. *
Included Extras: - *
{@link #EXTRA_LINK_PROPERTIES}: {@link android.net.LinkProperties} object associated - * with the Wi-Fi network. + *
{@link #EXTRA_LINK_PROPERTIES}: may not be set starting in Android 11. Check for + *
null before reading its value. *
No permissions are required to listen to this broadcast. * @hide */ @@ -1071,6 +1071,10 @@ public class WifiManager { * Included in the {@link #ACTION_LINK_CONFIGURATION_CHANGED} broadcast. * * Retrieve with {@link android.content.Intent#getParcelableExtra(String)}. + * + * Note: this extra may not be set starting in Android 11. Check for null before reading its + * value. + * * @hide */ @SystemApi -- cgit v1.2.3