fix WifiUtils:isNetworkLockedDown() null pointer issue
In the WifiUtils class, the isNetworkLockedDown() method does not determine whether the context is empty, which will cause a null pointer exception. This change adds a condition for judging the input context as empty. Bug:261812909 Test:make RunSettingsRoboTests Change-Id: Ie0f17179c25a7e9d4b2f652a5667eef3cc577c7b Signed-off-by: xuelin <xuelin@xiaomi.corp-partner.google.com>
This commit is contained in:
@@ -86,7 +86,7 @@ public class WifiUtils extends com.android.settingslib.wifi.WifiUtils {
|
|||||||
* @return true if Settings cannot modify the config due to lockDown.
|
* @return true if Settings cannot modify the config due to lockDown.
|
||||||
*/
|
*/
|
||||||
public static boolean isNetworkLockedDown(Context context, WifiConfiguration config) {
|
public static boolean isNetworkLockedDown(Context context, WifiConfiguration config) {
|
||||||
if (config == null) {
|
if (context == null || config == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user