Disable Bluetooth after factory reset if required
Turn Bluetooth off by default after factory reset when booting with a
primary SIM from Vodafone on relevant countries, and SFR.
This is a squash of three commits, originally developed on Android 10
and reworked during Android 11 bringup:
This is the 1st commit message:
Set Bluetooth default state based on operators; set Bluetooth address for NFC
Port to Android 11:
* slight adjustments for Android 11
* improve readability a bit; make it easier to add more MCC/MNCs
* incorporate refactorings of Ib92d64a8a7299d959ffde10ed2a0d780fb0def26,
"Turn off Bluetooth by default When factory reset (or OOB) for
SFR."
Issue: FP3-A11#138
Issue: FP3-A11#231
Change-Id: I5abe3e384f30dff55a3eb71d60a514cab96316f1
This is the commit message #2:
Turn off Bluetooth for SFR after factory reset/OOB
Issue: PRJ8901-1673
Issue: FP3-A11#138
Issue: FP3-A11#231
Change-Id: I106f91c4ec6c2238ee4657131d31f847617b2b05
This is the commit message #3:
REWORK: Disable Bluetooth after factory reset if required
This is a rework and fixup of "Set Bluetooth default state based on
operators; set Bluetooth address for NFC" and follow-up commits.
The logic is streamlined, removed various corner-cases, removed state
changes in getter methods, reused existing (AOSP) code where possible.
* Detect first boot after factory reset and don't alter any logic
outside of this first boot.
* Trigger logic on first SIM load after factory reset.
* Reuse existing disable() call rather than implementing custom logic.
Issue: FP3-A11#243
Change-Id: I4a53095bc22e8efe7b7c56d7b9429010a7a52222
Issue: PRJ8901-1673
Issue: FP3-A11#138
Issue: FP3-A11#231
Issue: FP3-A11#243
Change-Id: I5abe3e384f30dff55a3eb71d60a514cab96316f1
1 file changed