Fixes
This commit is contained in:
@@ -187,7 +187,7 @@ class WifiApDialogFragment : AlertDialogFragment<WifiApDialogFragment.Arg, WifiA
|
|||||||
MacAddressCompat.fromString(dialogView.persistentRandomizedMac.text.toString()).toPlatform()
|
MacAddressCompat.fromString(dialogView.persistentRandomizedMac.text.toString()).toPlatform()
|
||||||
} else null
|
} else null
|
||||||
allowedAcsChannels = acsList.associate { (band, text, _) -> band to RangeInput.fromString(text.text) }
|
allowedAcsChannels = acsList.associate { (band, text, _) -> band to RangeInput.fromString(text.text) }
|
||||||
maxChannelBandwidth = dialogView.maxChannelBandwidth.selectedItemId.toInt()
|
maxChannelBandwidth = (dialogView.maxChannelBandwidth.selectedItem as BandWidth).width
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -258,7 +258,7 @@ class WifiApDialogFragment : AlertDialogFragment<WifiApDialogFragment.Arg, WifiA
|
|||||||
if (!arg.readOnly) dialogView.bssid.addTextChangedListener(this@WifiApDialogFragment)
|
if (!arg.readOnly) dialogView.bssid.addTextChangedListener(this@WifiApDialogFragment)
|
||||||
if (arg.p2pMode) dialogView.hiddenSsid.isGone = true
|
if (arg.p2pMode) dialogView.hiddenSsid.isGone = true
|
||||||
if (arg.p2pMode && Build.VERSION.SDK_INT >= 29) dialogView.macRandomization.isEnabled = false
|
if (arg.p2pMode && Build.VERSION.SDK_INT >= 29) dialogView.macRandomization.isEnabled = false
|
||||||
else if (arg.p2pMode || Build.VERSION.SDK_INT < 31) dialogView.macRandomization.isGone = true
|
else if (arg.p2pMode || Build.VERSION.SDK_INT < 31) dialogView.macRandomizationWrapper.isGone = true
|
||||||
if (arg.p2pMode || Build.VERSION.SDK_INT < 31) {
|
if (arg.p2pMode || Build.VERSION.SDK_INT < 31) {
|
||||||
dialogView.ieee80211ax.isGone = true
|
dialogView.ieee80211ax.isGone = true
|
||||||
dialogView.bridgedModeOpportunisticShutdown.isGone = true
|
dialogView.bridgedModeOpportunisticShutdown.isGone = true
|
||||||
@@ -275,7 +275,7 @@ class WifiApDialogFragment : AlertDialogFragment<WifiApDialogFragment.Arg, WifiA
|
|||||||
dialogView.bridgedTimeout.isEnabled = false
|
dialogView.bridgedTimeout.isEnabled = false
|
||||||
dialogView.persistentRandomizedMacWrapper.isGone = true
|
dialogView.persistentRandomizedMacWrapper.isGone = true
|
||||||
for ((_, _, wrapper) in acsList) wrapper.isGone = true
|
for ((_, _, wrapper) in acsList) wrapper.isGone = true
|
||||||
dialogView.maxChannelBandwidth.isGone = true
|
dialogView.maxChannelBandwidthWrapper.isGone = true
|
||||||
} else {
|
} else {
|
||||||
dialogView.maxChannelBandwidth.adapter = ArrayAdapter(activity, android.R.layout.simple_spinner_item, 0,
|
dialogView.maxChannelBandwidth.adapter = ArrayAdapter(activity, android.R.layout.simple_spinner_item, 0,
|
||||||
bandWidthOptions).apply {
|
bandWidthOptions).apply {
|
||||||
|
|||||||
@@ -30,7 +30,9 @@ object RangeInput {
|
|||||||
if (input == null) return@apply
|
if (input == null) return@apply
|
||||||
for (unit in input.split(',')) {
|
for (unit in input.split(',')) {
|
||||||
if (unit.isBlank()) continue
|
if (unit.isBlank()) continue
|
||||||
val blocks = unit.split('-', limit = 2).map { it.trim().toInt() }
|
val blocks = unit.split('-', limit = 2).map { i ->
|
||||||
|
i.trim { it == '\u200b' || it.isWhitespace() }.toInt()
|
||||||
|
}
|
||||||
require(blocks[0] in min..max) { "Out of range: ${blocks[0]}" }
|
require(blocks[0] in min..max) { "Out of range: ${blocks[0]}" }
|
||||||
if (blocks.size == 2) {
|
if (blocks.size == 2) {
|
||||||
require(blocks[1] in min..max) { "Out of range: ${blocks[1]}" }
|
require(blocks[1] in min..max) { "Out of range: ${blocks[1]}" }
|
||||||
|
|||||||
@@ -233,6 +233,12 @@
|
|||||||
android:imeOptions="flagForceAscii"
|
android:imeOptions="flagForceAscii"
|
||||||
android:inputType="textNoSuggestions" />
|
android:inputType="textNoSuggestions" />
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/max_channel_bandwidth_wrapper"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dip"
|
||||||
|
android:orientation="vertical">
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -256,6 +262,7 @@
|
|||||||
tools:text="error text placeholder"
|
tools:text="error text placeholder"
|
||||||
tools:visibility="visible"/>
|
tools:visibility="visible"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/access_control_group"
|
android:id="@+id/access_control_group"
|
||||||
@@ -360,6 +367,12 @@
|
|||||||
android:inputType="textNoSuggestions"
|
android:inputType="textNoSuggestions"
|
||||||
android:maxLength="17" />
|
android:maxLength="17" />
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/mac_randomization_wrapper"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dip"
|
||||||
|
android:orientation="vertical">
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -391,6 +404,7 @@
|
|||||||
android:inputType="textNoSuggestions"
|
android:inputType="textNoSuggestions"
|
||||||
android:maxLength="17" />
|
android:maxLength="17" />
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
</LinearLayout>
|
||||||
<com.google.android.material.materialswitch.MaterialSwitch
|
<com.google.android.material.materialswitch.MaterialSwitch
|
||||||
android:id="@+id/hidden_ssid"
|
android:id="@+id/hidden_ssid"
|
||||||
style="@style/wifi_item_label"
|
style="@style/wifi_item_label"
|
||||||
|
|||||||
Reference in New Issue
Block a user