美文网首页
Settings中蓝牙连接流程

Settings中蓝牙连接流程

作者: 姑娘请别为难小僧 | 来源:发表于2017-11-25 10:52 被阅读141次

1、蓝牙界面
com/android/settings/bluetooth/BluetoothSettings.java
来看打开做了什么


image.png image.png

com/android/settings/bluetooth/BluetoothEnabler.java


image.png

mSwitchBar.addOnSwitchChangeListener(this);

image.png

这个就是开关流程

2、来看下配对连接流程
com/android/settings/bluetooth/BluetoothSettings.java

image.png

com/android/settings/bluetooth/DeviceListPreferenceFragment.java


image.png

com/android/settings/bluetooth/BluetoothDevicePreference.java


image.png

来看配对


image.png
com/android/settingslib/bluetooth/CachedBluetoothDevice.java
image.png

android/bluetooth/BluetoothDevice.java


image.png

alps/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/BondStateMachine.java

image.png image.png

private static IBluetooth sService;
extends IBluetooth.Stub
com/android/bluetooth/btservice/AdapterService.java

image.png

com/android/bluetooth/btservice/AdapterService.java


image.png

相关文章

网友评论

      本文标题:Settings中蓝牙连接流程

      本文链接:https://www.haomeiwen.com/subject/ksoqbxtx.html