Fine tune btif config mechanism to limit the number of section in bt config...
Fine tune btif config mechanism to limit the number of section in bt config cache and improve the bt config clone performance * Bt config cache will grow bigger and bigger without limitation and cause many Bluetooth stability issues * Do not clone the whole config cache before writing config cache into file, clone paired devices section instead. * Implement BtifConfigCache class to handle bt devices config add, remove, paired, unpaired,..etc. Bug: 143515989 Test: 1. Add BtifConfigCacheTest unit tests to test bt config cache setup, paire with a new devices, unpaire with a devices, remove the sections with specific key. 2. Checking the paired devices information still existed in settings after Bluetooth disable or device reboot. 3. Checking the paired devices information still saved in btif_config file after Bluetooth disable and device reboot. 4. Remove btif_confing files and enable Bluetooth, checking the btif_config file can be created and included adapter information normally. 5. Checking the paired devices information be clean in btif_config file after device factory reset 6. keep BLE scanning, then pair with a bluetooth device, connect a bluetooth device, disable Bluetooth, checking the function work normally. Tag: #stability Change-Id: Ide1ba1b6daaf9d102ab96976cbf28e65031423d0
Showing
- TEST_MAPPING 4 additions, 0 deletionsTEST_MAPPING
- system/btif/Android.bp 27 additions, 0 deletionssystem/btif/Android.bp
- system/btif/include/btif_config.h 1 addition, 1 deletionsystem/btif/include/btif_config.h
- system/btif/include/btif_config_cache.h 60 additions, 0 deletionssystem/btif/include/btif_config_cache.h
- system/btif/src/btif_config.cc 63 additions, 148 deletionssystem/btif/src/btif_config.cc
- system/btif/src/btif_config_cache.cc 301 additions, 0 deletionssystem/btif/src/btif_config_cache.cc
- system/btif/test/btif_config_cache_test.cc 527 additions, 0 deletionssystem/btif/test/btif_config_cache_test.cc
- system/test/run_unit_tests.sh 1 addition, 0 deletionssystem/test/run_unit_tests.sh
Loading
Please register or sign in to comment