Fixed accessibility issues in Wi-Fi password view for SUW
- Keep the Save button enabled at all times - Show "*required" or "The password is invalid" to remind the user Bug: 386897596 Flag: EXEMPT bugfix Test: Manual testing atest WifiConfigControllerTest Change-Id: I442d2f958efd85f3c92309d0bed7cd3aa9ec9876
This commit is contained in:
@@ -21,14 +21,10 @@ import androidx.appcompat.app.AlertDialog
|
||||
|
||||
class WifiDialogHelper(
|
||||
alertDialog: AlertDialog,
|
||||
private val ssidInputGroup: TextInputGroup? = null,
|
||||
private val validator: TextInputValidator,
|
||||
) : AlertDialogHelper(alertDialog) {
|
||||
|
||||
override fun canDismiss(): Boolean {
|
||||
val isValid = ssidInputGroup?.validate() ?: true
|
||||
if (!isValid) Log.w(TAG, "SSID is invalid!")
|
||||
return isValid
|
||||
}
|
||||
override fun canDismiss(): Boolean = validator.validate()
|
||||
|
||||
companion object {
|
||||
const val TAG = "WifiDialogHelper"
|
||||
|
||||
Reference in New Issue
Block a user