Fallback to "Extended Compatibility" if Speed feature is not ready
- Fallback to the "Extended Compatibility" design when the following conditions occur - 5 GHz band is not supported on the device - 5 GHz SAP available channels cannot be obtained from WifiManager - 6 GHz SAP available channels cannot be obtained from WifiManager Bug: 272450463 Test: manual test atest -c WifiTetherSettingsTest atest -c WifiTetherViewModelTest \ WifiHotspotRepositoryTest \ WifiTetherSecurityPreferenceControllerTest.java \ WifiTetherMaximizeCompatibilityPreferenceControllerTest Change-Id: If7c8c41ebe86f5e7d8e4737ab7a82d38c9d633de
This commit is contained in:
@@ -83,8 +83,21 @@ public class WifiTetherViewModel extends AndroidViewModel {
|
||||
|
||||
@Override
|
||||
protected void onCleared() {
|
||||
mWifiHotspotRepository.getSecurityType().removeObserver(mSecurityTypeObserver);
|
||||
mWifiHotspotRepository.getSpeedType().removeObserver(mSpeedTypeObserver);
|
||||
if (mSecuritySummary != null) {
|
||||
mWifiHotspotRepository.getSecurityType().removeObserver(mSecurityTypeObserver);
|
||||
}
|
||||
if (mSpeedSummary != null) {
|
||||
mWifiHotspotRepository.getSpeedType().removeObserver(mSpeedTypeObserver);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return whether Wi-Fi Hotspot Speed Feature is available or not.
|
||||
*
|
||||
* @return {@code true} if Wi-Fi Hotspot Speed Feature is available
|
||||
*/
|
||||
public boolean isSpeedFeatureAvailable() {
|
||||
return mWifiHotspotRepository.isSpeedFeatureAvailable();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user