Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 0b21b3d7 authored by Zhihai Xu's avatar Zhihai Xu
Browse files

bluetooth won't turn on after turn Airplane mode off on setting screen on manta(tablet)

The root cause is normally when change the airplane mode, the bluetooth setting UI
 will not be foreground. No listener is setup for bluetooth setting UI when it is
 in background. So the onCheckedChanged won't be called and mLocalAdapter.setBluetoothEnabled
 won't be called. But for manta, airplane mode setting and bluetooth setting UI both
 will show on the foreground due to bigger screen size. When we turn ariplane mode on,
 bluetooth manager service will disable bluetooth without changing the persist bluetooth setting.
 But bluetooth setting UI will listen to the bluetooth state change intent, it will receive
 bluetooth state turn-off intent then it will call mSwitch.setChecked(false) in handleStateChanged,
 which cause checked status changed from true to false to trigger the listener (onCheckedChanged)
 being called. The listener will call mAdapter.disable() which will call mManagerService.disable(true)
 to change bluetooth persist state to OFF. So when we turn back airplane more to OFF,
 due to the bluetooth persist state is OFF, we won't turn back bluetooth to ON.

bug 7366814
Change-Id: I07d4a2dfe03fc6775cfeabb28cd3a0cc1fded44e
parent 891185a4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment