Validate SSID only on the Submit button
- Avoid to validate the SSID when scanning a QR code Bug: 399791242 Flag: EXEMPT bugfix Test: Manual testing atest SettingsUnitTests:AddNetworkFragmentTest Change-Id: I91f010f8708490e397d762c96401569fc13601dd
This commit is contained in:
@@ -206,6 +206,9 @@ public class AddNetworkFragment extends InstrumentedFragment implements WifiConf
|
|||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
void handleSubmitAction() {
|
void handleSubmitAction() {
|
||||||
|
if (!mUIController.canFinish()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
successfullyFinish(mUIController.getConfig());
|
successfullyFinish(mUIController.getConfig());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -234,9 +237,6 @@ public class AddNetworkFragment extends InstrumentedFragment implements WifiConf
|
|||||||
|
|
||||||
activity.getSystemService(WifiManager.class).save(config, saveListener);
|
activity.getSystemService(WifiManager.class).save(config, saveListener);
|
||||||
} else {
|
} else {
|
||||||
if (!mUIController.canFinish()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Intent intent = new Intent();
|
Intent intent = new Intent();
|
||||||
intent.putExtra(WIFI_CONFIG_KEY, config);
|
intent.putExtra(WIFI_CONFIG_KEY, config);
|
||||||
activity.setResult(Activity.RESULT_OK, intent);
|
activity.setResult(Activity.RESULT_OK, intent);
|
||||||
|
Reference in New Issue
Block a user