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

Skip to content
Commit 9a62c9cd authored by Jake Hamby's avatar Jake Hamby Committed by Jaikumar Ganesh
Browse files

Refactor android.server.BluetoothService classes.

Several cleanups to BluetoothService:
- Move BluetoothService.BondState inner class to top level.
- Extract adapter and remote device properties cache management
  logic into two new classes: BluetoothAdapterProperties and
  BluetoothDeviceProperties.
- Add getter methods for other classes in the package to access
  the new properties cache objects for multi-part operations.
- Inline log() method in BluetoothService and selected the
  appropriate Log method (Log.d, Log.w, Log.e) for each message.
- Refactor dump() method into smaller sized pieces.
- Clean up logic of updateCountersAndCheckForConnectionStateChange()
  method for better readability.
- Change sendConnectionStateChange() to return instead of sending
  an intent if the current or previous state values are invalid.
  Previously the code sent an intent with -1 for the invalid state.
- Added Javadoc comments to document the methods that are called from
  native Bluez code.
- Fixed some typos and code style issues.

Original Change by: Jake Hamby
Modified by: Jaikumar Ganesh

Change-Id: I76ebac00ecd29566dcb2d1ad3e7a486b7530ce24
parent 59362456
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment