diff options
author | Lalit Kansara <lkansara@codeaurora.org> | 2016-12-06 14:47:45 +0530 |
---|---|---|
committer | Lalit Kansara <lkansara@codeaurora.org> | 2016-12-06 14:47:45 +0530 |
commit | aa2a937e6c8c9c93cc1a5fe344c368b4276243c1 (patch) | |
tree | 05648e985b986d372f3a3d7f60cab8d6b77e244d /src/com/android/bluetooth/pbap/BluetoothPbapReceiver.java | |
parent | c7ae94e96c0c7bb93ec80d548c024a968c411d32 (diff) | |
parent | 1c40f9218d815e4e67482fb8913fce6850e4fb1c (diff) | |
download | android_packages_apps_Bluetooth-aa2a937e6c8c9c93cc1a5fe344c368b4276243c1.tar.gz android_packages_apps_Bluetooth-aa2a937e6c8c9c93cc1a5fe344c368b4276243c1.tar.bz2 android_packages_apps_Bluetooth-aa2a937e6c8c9c93cc1a5fe344c368b4276243c1.zip |
Merge commit '1c40f9218d815e4e67482fb8913fce6850e4fb1c' into remote
Conflicts:
jni/com_android_bluetooth_hfp.cpp
src/com/android/bluetooth/avrcp/Avrcp.java
src/com/android/bluetooth/btservice/AdapterService.java
src/com/android/bluetooth/btservice/RemoteDevices.java
src/com/android/bluetooth/hfp/HeadsetStateMachine.java
src/com/android/bluetooth/map/BluetoothMapContentObserver.java
src/com/android/bluetooth/map/BluetoothMapService.java
src/com/android/bluetooth/opp/BluetoothOppSendFileInfo.java
src/com/android/bluetooth/pan/PanService.java
src/com/android/bluetooth/pbap/BluetoothPbapReceiver.java
Change-Id: I41068ac7787983519220fe6fee1e65ff66298db1
Diffstat (limited to 'src/com/android/bluetooth/pbap/BluetoothPbapReceiver.java')
-rw-r--r-- | src/com/android/bluetooth/pbap/BluetoothPbapReceiver.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/com/android/bluetooth/pbap/BluetoothPbapReceiver.java b/src/com/android/bluetooth/pbap/BluetoothPbapReceiver.java index a35ae5659..75388ee64 100644 --- a/src/com/android/bluetooth/pbap/BluetoothPbapReceiver.java +++ b/src/com/android/bluetooth/pbap/BluetoothPbapReceiver.java @@ -42,6 +42,8 @@ public class BluetoothPbapReceiver extends BroadcastReceiver { private static final String TAG = "BluetoothPbapReceiver"; + private static final boolean D = BluetoothPbapService.DEBUG; + private static final boolean V = Log.isLoggable(BluetoothPbapService.LOG_TAG, Log.VERBOSE); @Override @@ -52,12 +54,13 @@ public class BluetoothPbapReceiver extends BroadcastReceiver { in.setClass(context, BluetoothPbapService.class); String action = intent.getAction(); in.putExtra("action", action); - Log.i(TAG, "Enter - onReceive for intent:" + action); + if (D) Log.d(TAG, "PbapReceiver onReceive action = " + action); + boolean startService = true; if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED)) { int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.ERROR); in.putExtra(BluetoothAdapter.EXTRA_STATE, state); - Log.i(TAG, "State :" + state); + if (D) Log.d(TAG, "state = " + state); if ((state == BluetoothAdapter.STATE_TURNING_ON) || (state == BluetoothAdapter.STATE_OFF)) { //FIX: We turn on PBAP after BluetoothAdapter.STATE_ON, @@ -68,11 +71,13 @@ public class BluetoothPbapReceiver extends BroadcastReceiver { // Don't forward intent unless device has bluetooth and bluetooth is enabled. BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); if (adapter == null || !adapter.isEnabled()) { + if (D) Log.d(TAG, "BluetoothAdapter is not enabled (" + + adapter + "). Would not start service."); startService = false; } } if (startService) { - if (V) Log.v(TAG, "Calling start service!!!! with action = " + in.getAction()); + if (D) Log.d(TAG, "Calling start service with action = " + in.getAction()); context.startService(in); } Log.i(TAG, "Exit - onReceive for intent:" + action); |