SystemServer: Airplane change when FactoryReset
When receiving ACTION_SETTING_RESTORED we temporarily set the persisted
state to off.
If we leave airplane mode before the restore is executed we will have a
race condition on the start of the bluetooth.
This CL adds a check on the persistedState, to make sure we do not
wrongly interact with it
Bug: 328842491
Fix: 328842491
Test: atest ServiceBluetoothTests
Test: atest disableAirplane_whenFactoryReset_doesNotStartBluetooth
Test: atest disableAirplane_whenNothing_startBluetooth
Flag: Exempt, Adding a flag here does not add DF value as it is a very
edge case (you need to stress test factory reset & airplane mode)
Change-Id: I969e156c9f289aa0088887d8c7fafca15a4bc843
Loading
Please register or sign in to comment