Merge "[Thread] fix airplane mode race conditions" into main
This commit is contained in:
commit
22c6b6c9d7
1 changed files with 4 additions and 1 deletions
|
|
@ -623,7 +623,10 @@ final class ThreadNetworkControllerService extends IThreadNetworkController.Stub
|
|||
|
||||
return !mForceStopOtDaemonEnabled
|
||||
&& !mUserRestricted
|
||||
&& (!mAirplaneModeOn || enabledInAirplaneMode)
|
||||
// FIXME(b/340744397): Note that here we need to call `isAirplaneModeOn()` to get
|
||||
// the latest state of airplane mode but can't use `mIsAirplaneMode`. This is for
|
||||
// avoiding the race conditions described in b/340744397
|
||||
&& (!isAirplaneModeOn() || enabledInAirplaneMode)
|
||||
&& mPersistentSettings.get(ThreadPersistentSettings.THREAD_ENABLED);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue