Fine-tune launch time in Network & Internet settings

- Avoid creating WifiPickerTracker if Hotspot network feature is not enabled

Fix: 312905628
Test: unit test
atest -c InternetPreferenceControllerTest

Change-Id: I5818698ce06244aa7660e90a5f2fd372a3a221bf
This commit is contained in:
Weng Su
2023-11-28 06:45:19 +08:00
parent 958a6ab7aa
commit 129ff9b8fe
2 changed files with 15 additions and 1 deletions

View File

@@ -298,4 +298,11 @@ public class InternetPreferenceControllerTest {
assertThat(mPreference.getSummary().toString()).isEqualTo(TEST_SUMMARY);
}
@Test
public void updateHotspotNetwork_hotspotNetworkNotEnabled_returnFalse() {
mController.mWifiPickerTrackerHelper = null;
assertThat(mController.updateHotspotNetwork()).isFalse();
}
}