Fix the race between entitlement start/stop
For very quickly hotspot OFF/ON, there is race between tethering start entitlement from Settings and stop entitlement from wifi's intent broadcast. Entitlement would only be started when Settings call #startTethering(). But there are two points that tethering would stop entitlement. One is #stopTethering() from Settings. Another one is wifi tell tethering that it is shuting down. In this change, second point of stop entitlement is removed to avoid this race problem. Entitlement may have chance that do not be stopped (e.g. network reset). This is not great but the behavior is the same as P. TODO: Don't reply on caller to stop entitlement. Refactor the design to call #stopProvisioningIfNeeded when IpServer leaving TETHERED state. TODO: mWifiTetherRequested may also suffer this race condition. Bug: 137034691 Test: -build, flash, boot -atest FrameworkNetTests -Enable hotspot with entitlement supported SIM, then changing the AP band. Change-Id: I63f858356b4543b5bdda41d03e45adc944b86da3 Merged-In: I63f858356b4543b5bdda41d03e45adc944b86da3
Loading
Please register or sign in to comment