wifi: Handle wifi ap initial state before register intent
The intent WIFI_AP_STATE_CHANGED_ACTION is not sticky intent after SC-V2, query wifi ap state and run intent handling after registering intent. Bug: 231214355 Test: make RunSettingsRoboTests ROBOTEST_FILTER=Hotspot Test: make RunSettingsRoboTests ROBOTEST_FILTER=Tether Test: Manual test, the state shows correctly even if resume hotspot settings page from recent app. Change-Id: Iab6b2b8628d725b003d5e5c4086420a329611745
This commit is contained in:
@@ -106,6 +106,9 @@ public class HotspotConditionController implements ConditionalCardController {
|
||||
@Override
|
||||
public void startMonitoringStateChange() {
|
||||
mAppContext.registerReceiver(mReceiver, WIFI_AP_STATE_FILTER);
|
||||
// The intent WIFI_AP_STATE_CHANGED_ACTION is not sticky intent anymore after SC-V2
|
||||
// Handle the initial state after register the receiver.
|
||||
mConditionManager.onConditionChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user