Fix unexpected Wi-Fi hotspot shutdown
- Filter out unnecessary onSwitchChanged callbacks when the switch is disabled, which should not be triggered by user input. - Refine the state handling function to avoid unnecessary onSwitchChanged callback. - Refine the error handling of isHotspotPasswordValid function. Bug: 227719584 Test: manual test make RunSettingsRoboTests \ ROBOTEST_FILTER=WifiTetherSwitchBarControllerTest Change-Id: If62aaadc8ddb214769b1367d7801b6125bb5377c
This commit is contained in:
@@ -72,7 +72,7 @@ public class WifiUtils extends com.android.settingslib.wifi.WifiUtils {
|
||||
}
|
||||
}
|
||||
configBuilder.setPassphrase(password, securityType);
|
||||
} catch (IllegalArgumentException e) {
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user