android source bluetooth

Android蓝牙架构详解
本文档详细介绍了Android蓝牙架构,包括其核心组件如Bluetooth Embedded System (BTE) 和 Bluetooth Application Layer (BTA),以及如何实现蓝牙低能耗APIs。此外,还深入探讨了蓝牙系统服务、JNI、HAL等关键部分,并提供了定制蓝牙堆栈的方法。

https://source.android.com/devices/bluetooth.html

Bluetooth

In this document

Android Bluetooth HAL icon

Android provides a default Bluetooth stack that is divided into two layers: The Bluetooth Embedded System (BTE),which implements the core Bluetooth functionality, and the Bluetooth Application Layer (BTA), whichcommunicates with Android framework applications.

To fully leverage the Bluetooth Low Energy APIsadded in Android 5.0, you should implement the Android 6.0 Bluetooth HCI Requirements.That document initially was provided as the Android 5.0 Bluetooth HCI Requirements.

Architecture

A Bluetooth system service communicates with the Bluetooth stack through JNI and with applications through Binder IPC. The system service provides developers with access to various Bluetooth profiles. The following diagram shows the general structure of the Bluetooth stack:

Android Bluetooth architecture

Figure 1. Bluetooth architecture

Application framework
At the application framework level is application code, which utilizes the android.bluetooth APIs to interact with the Bluetooth hardware. Internally, this code calls the Bluetooth process through the Binder IPC mechanism.
Bluetooth system service
The Bluetooth system service, located in packages/apps/Bluetooth, is packaged as an Android app and implements the Bluetooth service and profiles at the Android framework layer. This app calls into the HAL layer via JNI.
JNI
The JNI code associated with android.bluetooth is located in packages/apps/Bluetooth/jni. The JNI code calls into the HAL layer and receives callbacks from the HAL when certain Bluetooth operations occur, such as when devices are discovered.
HAL
The hardware abstraction layer defines the standard interface that the android.bluetooth APIs and Bluetooth process call into and that you must implement to have your Bluetooth hardware function correctly. The header file for the Bluetooth HAL is hardware/libhardware/include/hardware/bluetooth.h. Additionally, please review all of the hardware/libhardware/include/hardware/bt_*.h files.
Bluetooth stack
The default Bluetooth stack is provided for you and is located in system/bt. The stack implements the generic Bluetooth HAL and customizes it with extensions and configuration changes.
Vendor extensions
To add custom extensions and an HCI layer for tracing, you can create a libbt-vendor module and specify these components.

Implementing the HAL

The Bluetooth HAL is located in /hardware/libhardware/include/hardware/bluetooth.h. Thus, the bluetooth.h file contains the basic interface for the Bluetooth stack, and you must implement its functions.

Profile-specific files are located in the same directory. For details, see the HAL File Reference.

The following is a partial list of the profile-related files. For the complete set, see the /hardware/libhardware/include/hardware/ directory:

  • bt_av.h: Includes the interface definition for the A2DP profile.
  • bt_gatt.h, bt_gatt_client.h, and bt_gatt_server.h: These include the interface definition for the GATT profile.
  • bt_hf.h: Includes the interface definition for the HFP profile.
  • bt_hh.h: Includes the interface definition for the HID host profile.
  • bt_hl.h: Includes the interface definition for the HDP profile.
  • bt_mce.h: Includes the interface definition for the MAP profile.
  • bt_pan.h: Includes the interface definition for the PAN profile.
  • bt_rc.h: Includes the interface definition for the AVRCP profile.
  • bt_sock.h: Includes the interface definition for RFCOMM sockets.

Keep in mind that your Bluetooth implementation is not constrained to the featuresand profiles exposed in the HAL. You can find the default implementation locatedin the Bluetooth stack in the system/bt directory,which implements the default HAL and also extra features and customizations.

Customizing the Native Bluetooth Stack

If you are using the default Bluetooth stack, but want to make a few customizations, you cando the following:

  • Custom Bluetooth profiles - If you want to add Bluetooth profiles that do not haveHAL interfaces provided by Android, you must supply an SDK add-on download to make the profile available to app developers, make the APIs available in the Bluetooth system process app (packages/apps/Bluetooth), and add them to the default stack (system/bt).
  • Custom vendor extensions and configuration changes - You can add things such as extra AT commands or device-specific configuration changesby creating a libbt-vendor module. See the /hardware/broadcom/libbt directoryfor an example.
  • Host Controller Interface (HCI) - You can provide your own HCI by creating a libbt-hci module, whichis mainly used for debug tracing. See the external/bluetooth/hci directory for an example.

09-24 18:58:19.030560 1756 1941 E BluetoothAdapter: getControllerActivityEnergyInfoCallback: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter$OnBluetoothActivityEnergyInfoProxy.lambda$onError$2(BluetoothAdapter.java:1096) at android.bluetooth.BluetoothAdapter$OnBluetoothActivityEnergyInfoProxy$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0) at android.bluetooth.BluetoothAdapter$OnBluetoothActivityEnergyInfoProxy.onError(BluetoothAdapter.java:1096) at android.bluetooth.BluetoothAdapter.requestControllerActivityEnergyInfo(BluetoothAdapter.java:2941) 09-24 18:58:21.911603 5584 7431 D BluetoothAdapter: 227852177: getState(). Returning ON 09-24 19:00:00.258103 1756 1941 E BluetoothAdapter: getControllerActivityEnergyInfoCallback: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter$OnBluetoothActivityEnergyInfoProxy.lambda$onError$2(BluetoothAdapter.java:1096) at android.bluetooth.BluetoothAdapter$OnBluetoothActivityEnergyInfoProxy$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0) at android.bluetooth.BluetoothAdapter$OnBluetoothActivityEnergyInfoProxy.onError(BluetoothAdapter.java:1096) at android.bluetooth.BluetoothAdapter.requestControllerActivityEnergyInfo(BluetoothAdapter.java:2941) 09-24 19:00:00.733691 1756 1941 E BluetoothAdapter: getControllerActivityEnergyInfoCallback: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter$OnBluetoothActivityEnergyInfoProxy.lambda$onError$2(BluetoothAdapter.java:1096) at android.bluetooth.BluetoothAdapter$OnBluetoothActivityEnergyInfoProxy$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0) at android.bluetooth.BluetoothAdapter$OnBluetoothActivityEnergyInfoProxy.onError(BluetoothAdapter.java:1096) at android.bluetooth.BluetoothAdapter.requestControllerActivityEnergyInfo(BluetoothAdapter.java:2941) 09-24 19:02:08.729426 5584 8645 D BluetoothAdapter: 227852177: getState(). Returning ON 09-24 19:02:08.732878 5584 8645 D BluetoothAdapter: 227852177: getState(). Returning ON 09-24 19:02:09.994619 5584 7430 D BluetoothAdapter: 227852177: getState(). Returning ON 09-24 19:02:14.649910 5584 7430 D BluetoothAdapter: 227852177: getState(). Returning ON 09-24 19:02:14.808511 5584 5368 D BluetoothAdapter: getLeState() returning ON 09-24 19:02:14.818712 5584 5368 D BluetoothAdapter: getLeState() returning ON 09-24 19:02:14.819790 5584 5368 D BluetoothAdapter: isLeEnabled(): ON 09-24 19:02:14.826108 5584 5368 E BluetoothAdapter: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getBluetoothGatt(BluetoothAdapter.java:4309) 09-24 19:02:14.837846 5584 5368 E BluetoothAdapter: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getBluetoothGatt(BluetoothAdapter.java:4309) at android.bluetooth.BluetoothAdapterExtImpl.registerFilteredBluetoothRssiDetectCallback(BluetoothAdapterExtImpl.java:841) at android.bluetooth.OplusBluetoothAdapter.registerFilteredBluetoothRssiDetectCallback(OplusBluetoothAdapter.java:399) at oe.c.v(BluetoothAdapterWrapper.kt:79) 09-24 19:02:14.837946 5584 5368 W BluetoothAdapterExtImpl: iGatt null! 09-24 19:02:14.849719 5584 5368 D BluetoothAdapter: 227852177: getState(). Returning ON 09-24 19:02:14.945991 5584 8649 D BluetoothAdapter: 227852177: getState(). Returning ON 09-24 19:02:15.132976 27954 27617 E BluetoothAdapter: java.lang.RuntimeException: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getStateInternal(BluetoothAdapter.java:1533) at android.bluetooth.BluetoothAdapter.getLeState(BluetoothAdapter.java:1592) at android.bluetooth.BluetoothAdapter.getLeAccess(BluetoothAdapter.java:1601) at android.bluetooth.BluetoothAdapter.getBluetoothLeScanner(BluetoothAdapter.java:1283) 09-24 19:02:15.133054 27954 27617 D BluetoothAdapter: getLeState() returning OFF 09-24 19:02:15.134029 27954 27617 E BluetoothAdapter: java.lang.RuntimeException: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getStateInternal(BluetoothAdapter.java:1533) at android.bluetooth.BluetoothAdapter.getLeState(BluetoothAdapter.java:1592) at android.bluetooth.BluetoothAdapter.getLeAccess(BluetoothAdapter.java:1603) at android.bluetooth.BluetoothAdapter.getBluetoothLeScanner(BluetoothAdapter.java:1283) 09-24 19:02:15.134092 27954 27617 D BluetoothAdapter: getLeState() returning OFF 09-24 19:02:15.221845 5584 32538 D BluetoothAdapter: 227852177: getState(). Returning ON 09-24 19:02:15.251914 5584 5368 D BluetoothAdapter: getLeState() returning ON 09-24 19:02:15.252860 5584 5368 D BluetoothAdapter: getLeState() returning ON 09-24 19:02:15.252908 5584 5368 D BluetoothAdapter: isLeEnabled(): ON 09-24 19:02:15.253721 5584 5368 E BluetoothAdapter: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getBluetoothGatt(BluetoothAdapter.java:4309) 09-24 19:02:15.255397 5584 5368 E BluetoothAdapter: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getBluetoothGatt(BluetoothAdapter.java:4309) at android.bluetooth.BluetoothAdapterExtImpl.registerFilteredBluetoothRssiDetectCallback(BluetoothAdapterExtImpl.java:841) at android.bluetooth.OplusBluetoothAdapter.registerFilteredBluetoothRssiDetectCallback(OplusBluetoothAdapter.java:399) at oe.c.v(BluetoothAdapterWrapper.kt:79) 09-24 19:02:15.255438 5584 5368 W BluetoothAdapterExtImpl: iGatt null! 09-24 19:02:15.258341 5584 5368 D BluetoothAdapter: 227852177: getState(). Returning ON 09-24 19:02:15.972042 27954 23528 I NearbyMediums: BluetoothAdapter's name was not set by Nearby Connections, ignoring call to restore default scan mode. 09-24 19:02:15.974864 27954 23528 I NearbyMediums: BluetoothAdapter's name was not set by Nearby Connections, ignoring call to restore device name 09-24 19:02:16.319666 27954 27617 I NearbyMediums: BluetoothAdapter's name was not set by Nearby Connections, ignoring call to restore default scan mode. 09-24 19:02:16.324277 27954 27617 I NearbyMediums: BluetoothAdapter's name was not set by Nearby Connections, ignoring call to restore device name 09-24 19:03:24.203516 1756 1941 E BluetoothAdapter: getControllerActivityEnergyInfoCallback: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter$OnBluetoothActivityEnergyInfoProxy.lambda$onError$2(BluetoothAdapter.java:1096) at android.bluetooth.BluetoothAdapter$OnBluetoothActivityEnergyInfoProxy$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0) at android.bluetooth.BluetoothAdapter$OnBluetoothActivityEnergyInfoProxy.onError(BluetoothAdapter.java:1096) at android.bluetooth.BluetoothAdapter.requestControllerActivityEnergyInfo(BluetoothAdapter.java:2941) 09-24 19:04:47.225152 2424 2424 D BluetoothAdapter: 158948037: getState(). Returning ON 09-24 19:04:47.257232 2424 2424 D BluetoothAdapter: 158948037: getState(). Returning ON 09-24 19:04:47.312684 2424 2424 D BluetoothAdapter: 158948037: getState(). Returning ON 09-24 19:04:52.917173 2424 2424 D BluetoothAdapter: 158948037: getState(). Returning ON 09-24 19:04:52.920589 2424 2424 D BluetoothAdapter: 158948037: getState(). Returning ON 09-24 19:07:27.352718 5584 11346 D BluetoothAdapter: 227852177: getState(). Returning ON 09-24 19:07:27.968794 5584 32537 D BluetoothAdapter: 227852177: getState(). Returning ON 09-24 19:07:28.045290 5584 21660 D BluetoothAdapter: 227852177: getState(). Returning ON 09-24 19:07:29.202969 5584 11346 D BluetoothAdapter: 227852177: getState(). Returning ON 09-24 19:07:29.260482 5584 11346 D BluetoothAdapter: 227852177: getState(). Returning ON 09-24 19:08:16.039898 5584 11346 D BluetoothAdapter: 227852177: getState(). Returning ON 09-24 19:08:16.042197 5584 11346 D BluetoothAdapter: 227852177: getState(). Returning ON 09-24 19:08:16.230494 5584 11346 D BluetoothAdapter: 227852177: getState(). Returning ON 09-24 19:08:16.231275 5584 11346 D BluetoothAdapter: 227852177: getState(). Returning ON 09-24 19:08:26.044307 1756 1941 E BluetoothAdapter: getControllerActivityEnergyInfoCallback: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter$OnBluetoothActivityEnergyInfoProxy.lambda$onError$2(BluetoothAdapter.java:1096) at android.bluetooth.BluetoothAdapter$OnBluetoothActivityEnergyInfoProxy$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0) at android.bluetooth.BluetoothAdapter$OnBluetoothActivityEnergyInfoProxy.onError(BluetoothAdapter.java:1096) at android.bluetooth.BluetoothAdapter.requestControllerActivityEnergyInfo(BluetoothAdapter.java:2941) 09-24 19:09:20.384981 5584 11862 D BluetoothAdapter: 227852177: getState(). Returning ON 09-24 19:09:20.385134 5584 11837 D BluetoothAdapter: 227852177: getState(). Returning ON 09-24 19:09:22.196759 5584 21660 D BluetoothAdapter: 227852177: getState(). Returning ON 09-24 19:09:22.892208 5584 32537 D BluetoothAdapter: 227852177: getState(). Returning ON 09-24 19:09:22.908842 5584 11862 D BluetoothAdapter: 227852177: getState(). Returning ON 09-24 19:09:22.978543 5584 5368 D BluetoothAdapter: getLeState() returning ON 09-24 19:09:22.979288 5584 5368 D BluetoothAdapter: getLeState() returning ON 09-24 19:09:22.979335 5584 5368 D BluetoothAdapter: isLeEnabled(): ON 09-24 19:09:22.988128 5584 5368 E BluetoothAdapter: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getBluetoothGatt(BluetoothAdapter.java:4309) 09-24 19:09:22.989193 5584 5368 E BluetoothAdapter: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getBluetoothGatt(BluetoothAdapter.java:4309) at android.bluetooth.BluetoothAdapterExtImpl.registerFilteredBluetoothRssiDetectCallback(BluetoothAdapterExtImpl.java:841) at android.bluetooth.OplusBluetoothAdapter.registerFilteredBluetoothRssiDetectCallback(OplusBluetoothAdapter.java:399) at oe.c.v(BluetoothAdapterWrapper.kt:79) 09-24 19:09:22.989247 5584 5368 W BluetoothAdapterExtImpl: iGatt null! 09-24 19:09:23.004315 5584 5368 D BluetoothAdapter: 227852177: getState(). Returning ON 09-24 19:09:23.176457 27954 23528 E BluetoothAdapter: java.lang.RuntimeException: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getStateInternal(BluetoothAdapter.java:1533) at android.bluetooth.BluetoothAdapter.getLeState(BluetoothAdapter.java:1592) at android.bluetooth.BluetoothAdapter.getLeAccess(BluetoothAdapter.java:1601) at android.bluetooth.BluetoothAdapter.getBluetoothLeScanner(BluetoothAdapter.java:1283) 09-24 19:09:23.176575 27954 23528 D BluetoothAdapter: getLeState() returning OFF 09-24 19:09:23.177581 27954 23528 E BluetoothAdapter: java.lang.RuntimeException: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getStateInternal(BluetoothAdapter.java:1533) at android.bluetooth.BluetoothAdapter.getLeState(BluetoothAdapter.java:1592) at android.bluetooth.BluetoothAdapter.getLeAccess(BluetoothAdapter.java:1603) at android.bluetooth.BluetoothAdapter.getBluetoothLeScanner(BluetoothAdapter.java:1283) 09-24 19:09:23.177632 27954 23528 D BluetoothAdapter: getLeState() returning OFF 09-24 19:09:23.328581 27954 24751 I NearbyMediums: BluetoothAdapter's name was not set by Nearby Connections, ignoring call to restore default scan mode. 09-24 19:09:23.337848 27954 24751 I NearbyMediums: BluetoothAdapter's name was not set by Nearby Connections, ignoring call to restore device name 09-24 19:09:25.762897 1756 2236 E BluetoothAdapterExtImpl: android.os.DeadObjectException at android.bluetooth.BluetoothAdapterExtImpl.getBluetoothMonitorReport(BluetoothAdapterExtImpl.java:676) 09-24 19:09:25.763738 1756 2236 E BluetoothAdapterExtImpl: android.os.DeadObjectException at android.bluetooth.BluetoothAdapterExtImpl.getBluetoothMonitorReport(BluetoothAdapterExtImpl.java:676) 09-24 19:09:38.945554 11108 11108 E BluetoothAdapter: java.lang.RuntimeException: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getStateInternal(BluetoothAdapter.java:1533) at android.bluetooth.BluetoothAdapter.getState(BluetoothAdapter.java:1551) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.syncBluetoothState(Unknown Source:2) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.getBluetoothState(Unknown Source:1) 09-24 19:09:38.945663 11108 11108 D BluetoothAdapter: 207235373: getState(). Returning OFF 09-24 19:09:38.966596 11108 11108 E BluetoothAdapter: java.lang.RuntimeException: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getStateInternal(BluetoothAdapter.java:1533) at android.bluetooth.BluetoothAdapter.getState(BluetoothAdapter.java:1551) at android.bluetooth.BluetoothAdapter.isDiscovering(BluetoothAdapter.java:2277) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.stopScanning(Unknown Source:2) 09-24 19:09:38.966673 11108 11108 D BluetoothAdapter: 207235373: getState(). Returning OFF 09-24 19:09:38.980494 11108 11108 E BluetoothAdapter: java.lang.RuntimeException: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getStateInternal(BluetoothAdapter.java:1533) at android.bluetooth.BluetoothAdapter.getState(BluetoothAdapter.java:1551) at android.bluetooth.BluetoothAdapter.getBondedDevices(BluetoothAdapter.java:2996) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.getBondedDevices(Unknown Source:2) 09-24 19:09:38.982252 11108 11108 D BluetoothAdapter: 207235373: getState(). Returning OFF 09-24 19:09:43.085033 11108 11108 E BluetoothAdapter: java.lang.RuntimeException: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getStateInternal(BluetoothAdapter.java:1533) at android.bluetooth.BluetoothAdapter.getState(BluetoothAdapter.java:1551) at android.bluetooth.BluetoothAdapter.isDiscovering(BluetoothAdapter.java:2277) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.isDiscovering(Unknown Source:2) 09-24 19:09:43.085069 11108 11108 D BluetoothAdapter: 207235373: getState(). Returning OFF 09-24 19:09:43.092157 11108 11108 E BluetoothAdapter: java.lang.RuntimeException: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getStateInternal(BluetoothAdapter.java:1533) at android.bluetooth.BluetoothAdapter.getState(BluetoothAdapter.java:1551) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.syncBluetoothState(Unknown Source:2) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.getBluetoothState(Unknown Source:1) 09-24 19:09:43.092188 11108 11108 D BluetoothAdapter: 207235373: getState(). Returning OFF 09-24 19:09:43.099298 11108 11108 E BluetoothAdapter: java.lang.RuntimeException: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getStateInternal(BluetoothAdapter.java:1533) at android.bluetooth.BluetoothAdapter.getState(BluetoothAdapter.java:1551) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.syncBluetoothState(Unknown Source:2) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.getBluetoothState(Unknown Source:1) 09-24 19:09:43.099339 11108 11108 D BluetoothAdapter: 207235373: getState(). Returning OFF 09-24 19:09:43.103582 11108 11108 E BluetoothAdapter: java.lang.RuntimeException: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getStateInternal(BluetoothAdapter.java:1533) at android.bluetooth.BluetoothAdapter.getState(BluetoothAdapter.java:1551) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.syncBluetoothState(Unknown Source:2) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.getBluetoothState(Unknown Source:1) 09-24 19:09:43.103619 11108 11108 D BluetoothAdapter: 207235373: getState(). Returning OFF 09-24 19:09:43.105452 11108 11108 E BluetoothAdapter: java.lang.RuntimeException: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getStateInternal(BluetoothAdapter.java:1533) at android.bluetooth.BluetoothAdapter.getState(BluetoothAdapter.java:1551) at android.bluetooth.BluetoothAdapter.isDiscovering(BluetoothAdapter.java:2277) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.stopScanning(Unknown Source:2) 09-24 19:09:43.105480 11108 11108 D BluetoothAdapter: 207235373: getState(). Returning OFF 09-24 19:09:43.106081 11108 11108 E BluetoothAdapter: java.lang.RuntimeException: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getStateInternal(BluetoothAdapter.java:1533) at android.bluetooth.BluetoothAdapter.getState(BluetoothAdapter.java:1551) at android.bluetooth.BluetoothAdapter.getBondedDevices(BluetoothAdapter.java:2996) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.getBondedDevices(Unknown Source:2) 09-24 19:09:43.106110 11108 11108 D BluetoothAdapter: 207235373: getState(). Returning OFF 09-24 19:09:43.107583 11108 11108 E BluetoothAdapter: java.lang.RuntimeException: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getStateInternal(BluetoothAdapter.java:1533) at android.bluetooth.BluetoothAdapter.getState(BluetoothAdapter.java:1551) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.syncBluetoothState(Unknown Source:2) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.getBluetoothState(Unknown Source:1) 09-24 19:09:43.107610 11108 11108 D BluetoothAdapter: 207235373: getState(). Returning OFF 09-24 19:09:43.109566 11108 11108 D WS_BT_WirelessLocalBluetoothAdapter: getScanMode() mode is 21 09-24 19:09:43.110052 11108 11108 E BluetoothAdapter: java.lang.RuntimeException: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getStateInternal(BluetoothAdapter.java:1533) at android.bluetooth.BluetoothAdapter.getState(BluetoothAdapter.java:1551) at android.bluetooth.BluetoothAdapter.getScanMode(BluetoothAdapter.java:1968) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.getScanMode(SourceFile:2) 09-24 19:09:43.110077 11108 11108 D BluetoothAdapter: 207235373: getState(). Returning OFF 09-24 19:09:43.110094 11108 11108 D WS_BT_WirelessLocalBluetoothAdapter: getScanMode() reset mode 09-24 19:09:43.110568 11108 11108 E BluetoothAdapter: java.lang.RuntimeException: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getStateInternal(BluetoothAdapter.java:1533) at android.bluetooth.BluetoothAdapter.getState(BluetoothAdapter.java:1551) at android.bluetooth.BluetoothAdapter.setScanMode(BluetoothAdapter.java:2015) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.setScanMode(SourceFile:1) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.getScanMode(SourceFile:2) 09-24 19:09:43.110597 11108 11108 D BluetoothAdapter: 207235373: getState(). Returning OFF 09-24 19:09:43.112686 11108 11108 E BluetoothAdapter: java.lang.RuntimeException: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getStateInternal(BluetoothAdapter.java:1533) at android.bluetooth.BluetoothAdapter.getState(BluetoothAdapter.java:1551) at android.bluetooth.BluetoothAdapter.setScanMode(BluetoothAdapter.java:2015) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.setScanMode(SourceFile:1) 09-24 19:09:43.112711 11108 11108 D BluetoothAdapter: 207235373: getState(). Returning OFF 09-24 19:09:43.183153 11108 11108 E BluetoothAdapter: java.lang.RuntimeException: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getStateInternal(BluetoothAdapter.java:1533) at android.bluetooth.BluetoothAdapter.getState(BluetoothAdapter.java:1551) at android.bluetooth.BluetoothAdapter.isDiscovering(BluetoothAdapter.java:2277) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.stopScanning(Unknown Source:2) 09-24 19:09:43.183173 11108 11108 D BluetoothAdapter: 207235373: getState(). Returning OFF 09-24 19:09:43.185706 11108 11108 E BluetoothAdapter: java.lang.RuntimeException: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getStateInternal(BluetoothAdapter.java:1533) at android.bluetooth.BluetoothAdapter.getState(BluetoothAdapter.java:1551) at android.bluetooth.BluetoothAdapter.getBondedDevices(BluetoothAdapter.java:2996) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.getBondedDevices(Unknown Source:2) 09-24 19:09:43.185732 11108 11108 D BluetoothAdapter: 207235373: getState(). Returning OFF 09-24 19:09:44.898780 11108 11108 E BluetoothAdapter: java.lang.RuntimeException: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getStateInternal(BluetoothAdapter.java:1533) at android.bluetooth.BluetoothAdapter.getState(BluetoothAdapter.java:1551) at android.bluetooth.BluetoothAdapter.isDiscovering(BluetoothAdapter.java:2277) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.stopScanning(Unknown Source:2) 09-24 19:09:44.898809 11108 11108 D BluetoothAdapter: 207235373: getState(). Returning OFF 09-24 19:09:44.899430 11108 11108 E BluetoothAdapter: java.lang.RuntimeException: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getStateInternal(BluetoothAdapter.java:1533) at android.bluetooth.BluetoothAdapter.getState(BluetoothAdapter.java:1551) at android.bluetooth.BluetoothAdapter.getBondedDevices(BluetoothAdapter.java:2996) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.getBondedDevices(Unknown Source:2) 09-24 19:09:44.899451 11108 11108 D BluetoothAdapter: 207235373: getState(). Returning OFF 09-24 19:09:44.902267 11108 11108 E BluetoothAdapter: java.lang.RuntimeException: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getStateInternal(BluetoothAdapter.java:1533) at android.bluetooth.BluetoothAdapter.getState(BluetoothAdapter.java:1551) at android.bluetooth.BluetoothAdapter.isDiscovering(BluetoothAdapter.java:2277) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.isDiscovering(Unknown Source:2) 09-24 19:09:44.902284 11108 11108 D BluetoothAdapter: 207235373: getState(). Returning OFF 09-24 19:09:44.907242 11108 11108 E BluetoothAdapter: java.lang.RuntimeException: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getStateInternal(BluetoothAdapter.java:1533) at android.bluetooth.BluetoothAdapter.getState(BluetoothAdapter.java:1551) at android.bluetooth.BluetoothAdapter.isDiscovering(BluetoothAdapter.java:2277) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.isDiscovering(Unknown Source:2) 09-24 19:09:44.907285 11108 11108 D BluetoothAdapter: 207235373: getState(). Returning OFF 09-24 19:09:44.908192 11108 11108 E BluetoothAdapter: java.lang.RuntimeException: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getStateInternal(BluetoothAdapter.java:1533) at android.bluetooth.BluetoothAdapter.getState(BluetoothAdapter.java:1551) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.syncBluetoothState(Unknown Source:2) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.getBluetoothState(Unknown Source:1) 09-24 19:09:44.908316 11108 11108 D BluetoothAdapter: 207235373: getState(). Returning OFF 09-24 19:09:44.908443 11108 11108 D BluetoothAdapter: enable(): called by: com.oplus.wirelesssettings 09-24 19:09:44.908866 11108 11108 E BluetoothAdapter: java.lang.RuntimeException: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getStateInternal(BluetoothAdapter.java:1533) at android.bluetooth.BluetoothAdapter.getState(BluetoothAdapter.java:1551) at android.bluetooth.BluetoothAdapter.isEnabled(BluetoothAdapter.java:1338) at android.bluetooth.BluetoothAdapter.enable(BluetoothAdapter.java:1655) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.setBluetoothEnabled(Unknown Source:4) 09-24 19:09:44.908886 11108 11108 D BluetoothAdapter: 207235373: getState(). Returning OFF 09-24 19:09:44.913471 11108 11108 D BluetoothAdapter: checkPermission: android.permission.BLUETOOTH_ADMIN, pid=11108, uid=1000, ret=true 09-24 19:09:44.961172 11108 11108 E BluetoothAdapter: java.lang.RuntimeException: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getStateInternal(BluetoothAdapter.java:1533) at android.bluetooth.BluetoothAdapter.getState(BluetoothAdapter.java:1551) at android.bluetooth.BluetoothAdapter.isDiscovering(BluetoothAdapter.java:2277) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.startScanning(Unknown Source:2) 09-24 19:09:44.964629 11108 11108 D BluetoothAdapter: 207235373: getState(). Returning OFF 09-24 19:09:44.964710 11108 11108 D BluetoothAdapter: startDiscovery(): called by: com.oplus.wirelesssettings 09-24 19:09:44.965202 11108 11108 E BluetoothAdapter: java.lang.RuntimeException: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getStateInternal(BluetoothAdapter.java:1533) at android.bluetooth.BluetoothAdapter.getState(BluetoothAdapter.java:1551) at android.bluetooth.BluetoothAdapter.startDiscovery(BluetoothAdapter.java:2198) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.startScanning(Unknown Source:65) 09-24 19:09:44.965234 11108 11108 D BluetoothAdapter: 207235373: getState(). Returning OFF 09-24 19:09:46.348688 12386 12500 W cr_media: getBluetoothAdapter() requires BLUETOOTH permission 09-24 19:09:52.930196 11108 11108 E BluetoothAdapter: java.lang.RuntimeException: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getStateInternal(BluetoothAdapter.java:1533) at android.bluetooth.BluetoothAdapter.getState(BluetoothAdapter.java:1551) at android.bluetooth.BluetoothAdapter.isEnabled(BluetoothAdapter.java:1338) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.isEnabled(Unknown Source:2) 09-24 19:09:52.930217 11108 11108 D BluetoothAdapter: 207235373: getState(). Returning OFF 09-24 19:09:52.934393 11108 11108 E BluetoothAdapter: java.lang.RuntimeException: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getStateInternal(BluetoothAdapter.java:1533) at android.bluetooth.BluetoothAdapter.getState(BluetoothAdapter.java:1551) at android.bluetooth.BluetoothAdapter.isDiscovering(BluetoothAdapter.java:2277) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.stopScanning(Unknown Source:2) 09-24 19:09:52.934419 11108 11108 D BluetoothAdapter: 207235373: getState(). Returning OFF 09-24 19:09:52.935337 11108 11108 E BluetoothAdapter: java.lang.RuntimeException: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getStateInternal(BluetoothAdapter.java:1533) at android.bluetooth.BluetoothAdapter.getState(BluetoothAdapter.java:1551) at android.bluetooth.BluetoothAdapter.getBondedDevices(BluetoothAdapter.java:2996) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.getBondedDevices(Unknown Source:2) 09-24 19:09:52.935360 11108 11108 D BluetoothAdapter: 207235373: getState(). Returning OFF 09-24 19:09:54.147730 11108 11108 E BluetoothAdapter: java.lang.RuntimeException: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getStateInternal(BluetoothAdapter.java:1533) at android.bluetooth.BluetoothAdapter.getState(BluetoothAdapter.java:1551) at android.bluetooth.BluetoothAdapter.isDiscovering(BluetoothAdapter.java:2277) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.stopScanning(Unknown Source:2) 09-24 19:09:54.147751 11108 11108 D BluetoothAdapter: 207235373: getState(). Returning OFF 09-24 19:09:54.148244 11108 11108 E BluetoothAdapter: java.lang.RuntimeException: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getStateInternal(BluetoothAdapter.java:1533) at android.bluetooth.BluetoothAdapter.getState(BluetoothAdapter.java:1551) at android.bluetooth.BluetoothAdapter.getBondedDevices(BluetoothAdapter.java:2996) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.getBondedDevices(Unknown Source:2) 09-24 19:09:54.148267 11108 11108 D BluetoothAdapter: 207235373: getState(). Returning OFF 09-24 19:09:54.153472 11108 11108 E BluetoothAdapter: java.lang.RuntimeException: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getStateInternal(BluetoothAdapter.java:1533) at android.bluetooth.BluetoothAdapter.getState(BluetoothAdapter.java:1551) at android.bluetooth.BluetoothAdapter.isDiscovering(BluetoothAdapter.java:2277) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.isDiscovering(Unknown Source:2) 09-24 19:09:54.154411 11108 11108 D BluetoothAdapter: 207235373: getState(). Returning OFF 09-24 19:09:54.158597 11108 11108 E BluetoothAdapter: java.lang.RuntimeException: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getStateInternal(BluetoothAdapter.java:1533) at android.bluetooth.BluetoothAdapter.getState(BluetoothAdapter.java:1551) at android.bluetooth.BluetoothAdapter.isDiscovering(BluetoothAdapter.java:2277) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.isDiscovering(Unknown Source:2) 09-24 19:09:54.158618 11108 11108 D BluetoothAdapter: 207235373: getState(). Returning OFF 09-24 19:09:54.158706 11108 11108 D BluetoothAdapter: enable(): called by: com.oplus.wirelesssettings 09-24 19:09:54.161606 11108 11108 E BluetoothAdapter: java.lang.RuntimeException: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getStateInternal(BluetoothAdapter.java:1533) at android.bluetooth.BluetoothAdapter.getState(BluetoothAdapter.java:1551) at android.bluetooth.BluetoothAdapter.isEnabled(BluetoothAdapter.java:1338) at android.bluetooth.BluetoothAdapter.enable(BluetoothAdapter.java:1655) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.setBluetoothEnabled(Unknown Source:4) 09-24 19:09:54.161658 11108 11108 D BluetoothAdapter: 207235373: getState(). Returning OFF 09-24 19:09:54.162305 11108 11108 D BluetoothAdapter: checkPermission: android.permission.BLUETOOTH_ADMIN, pid=11108, uid=1000, ret=true 09-24 19:09:54.185700 11108 11108 E BluetoothAdapter: java.lang.RuntimeException: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getStateInternal(BluetoothAdapter.java:1533) at android.bluetooth.BluetoothAdapter.getState(BluetoothAdapter.java:1551) at android.bluetooth.BluetoothAdapter.isDiscovering(BluetoothAdapter.java:2277) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.startScanning(Unknown Source:2) 09-24 19:09:54.185735 11108 11108 D BluetoothAdapter: 207235373: getState(). Returning OFF 09-24 19:09:54.185765 11108 11108 D BluetoothAdapter: startDiscovery(): called by: com.oplus.wirelesssettings 09-24 19:09:54.186108 11108 11108 E BluetoothAdapter: java.lang.RuntimeException: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getStateInternal(BluetoothAdapter.java:1533) at android.bluetooth.BluetoothAdapter.getState(BluetoothAdapter.java:1551) at android.bluetooth.BluetoothAdapter.startDiscovery(BluetoothAdapter.java:2198) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.startScanning(Unknown Source:65) 09-24 19:09:54.186138 11108 11108 D BluetoothAdapter: 207235373: getState(). Returning OFF 09-24 19:10:02.166026 11108 11108 E BluetoothAdapter: java.lang.RuntimeException: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getStateInternal(BluetoothAdapter.java:1533) at android.bluetooth.BluetoothAdapter.getState(BluetoothAdapter.java:1551) at android.bluetooth.BluetoothAdapter.isEnabled(BluetoothAdapter.java:1338) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.isEnabled(Unknown Source:2) 09-24 19:10:02.166118 11108 11108 D BluetoothAdapter: 207235373: getState(). Returning OFF 09-24 19:10:02.169518 11108 11108 E BluetoothAdapter: java.lang.RuntimeException: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getStateInternal(BluetoothAdapter.java:1533) at android.bluetooth.BluetoothAdapter.getState(BluetoothAdapter.java:1551) at android.bluetooth.BluetoothAdapter.isDiscovering(BluetoothAdapter.java:2277) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.stopScanning(Unknown Source:2) 09-24 19:10:02.169614 11108 11108 D BluetoothAdapter: 207235373: getState(). Returning OFF 09-24 19:10:02.170733 11108 11108 E BluetoothAdapter: java.lang.RuntimeException: android.os.DeadObjectException at android.bluetooth.BluetoothAdapter.getStateInternal(BluetoothAdapter.java:1533) at android.bluetooth.BluetoothAdapter.getState(BluetoothAdapter.java:1551) at android.bluetooth.BluetoothAdapter.getBondedDevices(BluetoothAdapter.java:2996) at com.android.settingslib.bluetooth.LocalBluetoothAdapter.getBondedDevices(Unknown Source:2) 09-24 19:10:02.170790 11108 11108 D BluetoothAdapter: 207235373: getState(). Returning OFF
最新发布
10-11
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值