diff options
author | Ashwini Munigala <AshwiniM@codeaurora.org> | 2015-08-14 16:39:32 +0530 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2016-08-24 08:17:06 -0600 |
commit | 7590fa18d7d772beeb3f3d561e6375506c7abe02 (patch) | |
tree | 3e4ba5c86c54d92a7d84211a14b836d71b5ae574 /src/com/android/bluetooth/hid | |
parent | 242653b0d672b400bbc27c460f8937d4cc763cd9 (diff) | |
download | android_packages_apps_Bluetooth-7590fa18d7d772beeb3f3d561e6375506c7abe02.tar.gz android_packages_apps_Bluetooth-7590fa18d7d772beeb3f3d561e6375506c7abe02.tar.bz2 android_packages_apps_Bluetooth-7590fa18d7d772beeb3f3d561e6375506c7abe02.zip |
BT: Dynamic logging for MAP, PBAP, OPP, HID, PAN and SAP profiles
VERBOSE level logging for each profile can be enabled runtime from
adb shell using following command and turn off/on BT:
setprop log.tag.LOG_TAG VERBOSE -> VERBOSE level Logging (or)
setprop log.tag.LOG_TAG DEBUG -> DEBUG level logging
where 'LOG_TAG' to be replaced with below for corresponding profile:
BluetoothHidHost - HID Host
BluetoothHidDev - HID Device
BluetoothMap - MAP Server
BluetoothOpp - OPP Profile
BluteoothPan - PAN Profile
BluetoothPbap - PBAP Server
BluetoothSap - SAP Server
CRs-fixed: 608230, 604523
Change-Id: I37b73f2f596a96098c4f6a1ec5097dff36af11f3
Diffstat (limited to 'src/com/android/bluetooth/hid')
-rw-r--r-- | src/com/android/bluetooth/hid/HidService.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/bluetooth/hid/HidService.java b/src/com/android/bluetooth/hid/HidService.java index 3bec957f7..551f683e3 100644 --- a/src/com/android/bluetooth/hid/HidService.java +++ b/src/com/android/bluetooth/hid/HidService.java @@ -47,8 +47,9 @@ import java.util.Map; * @hide */ public class HidService extends ProfileService { - private static final boolean DBG = true; private static final String TAG = "HidService"; + public static final String LOG_TAG = "BluetoothHidHost"; + private static boolean DBG = Log.isLoggable(LOG_TAG, Log.DEBUG); private Map<BluetoothDevice, Integer> mInputDevices; private boolean mNativeAvailable; @@ -85,6 +86,9 @@ public class HidService extends ProfileService { } protected boolean start() { + if(!DBG) + DBG = Log.isLoggable(LOG_TAG, Log.DEBUG); + if (DBG) log("Start Bluetooth HidService"); mInputDevices = Collections.synchronizedMap(new HashMap<BluetoothDevice, Integer>()); initializeNative(); mNativeAvailable=true; |