Show "Not available" summary when hotspot speed is unavailable

- Show "Not available" summary when hotspot bands (5 GHz and 6 GHz) are unavailable

- Update debug logs to track down issues

Bug: 285769583
Test: manual test
atest -c WifiHotspotSpeedSettingsTest
atest -c WifiHotspotSpeedViewModelTest

Change-Id: If1050c120b4b612d3a9adbe886c2f12db82b793e
This commit is contained in:
Weng Su
2023-06-07 18:59:30 +08:00
parent d05997872a
commit 7171e0a29b
5 changed files with 137 additions and 47 deletions

View File

@@ -108,15 +108,17 @@ public class WifiHotspotSpeedSettings extends DashboardFragment implements
if (radioButton == null) {
continue;
}
if (radioButton.isChecked() != speedInfo.mIsChecked) {
radioButton.setChecked(speedInfo.mIsChecked);
if (!speedInfo.mIsVisible) {
radioButton.setVisible(false);
continue;
}
if (radioButton.isEnabled() != speedInfo.mIsEnabled) {
radioButton.setEnabled(speedInfo.mIsEnabled);
}
if (radioButton.isVisible() != speedInfo.mIsVisible) {
radioButton.setVisible(speedInfo.mIsVisible);
radioButton.setEnabled(speedInfo.mIsEnabled);
radioButton.setChecked(speedInfo.mIsChecked);
if (speedInfo.mSummary != null) {
radioButton.setSummary(speedInfo.mSummary);
}
// setVisible at the end to avoid UI flickering
radioButton.setVisible(true);
}
}