diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2016-09-23 00:08:58 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2016-09-23 00:08:58 +0000 |
commit | 6f54bb49508af469c9a4f6cec0e0ba4818988644 (patch) | |
tree | 94f59700e624d567b9fce41a2a31750e127ceb2c /src/com | |
parent | baf3b9b6c40e0e940a82e3651e4705fdf5a2b5d4 (diff) | |
parent | dda1ef88441ef5361aa891670b4e542230bd3bc1 (diff) | |
download | android_packages_apps_Bluetooth-6f54bb49508af469c9a4f6cec0e0ba4818988644.tar.gz android_packages_apps_Bluetooth-6f54bb49508af469c9a4f6cec0e0ba4818988644.tar.bz2 android_packages_apps_Bluetooth-6f54bb49508af469c9a4f6cec0e0ba4818988644.zip |
Merge "Enable debug logs by default in BluetoothPbapReceiver" into nyc-mr1-dev
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/bluetooth/pbap/BluetoothPbapReceiver.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/com/android/bluetooth/pbap/BluetoothPbapReceiver.java b/src/com/android/bluetooth/pbap/BluetoothPbapReceiver.java index 2356e81f0..c0150ed2c 100644 --- a/src/com/android/bluetooth/pbap/BluetoothPbapReceiver.java +++ b/src/com/android/bluetooth/pbap/BluetoothPbapReceiver.java @@ -42,24 +42,24 @@ public class BluetoothPbapReceiver extends BroadcastReceiver { private static final String TAG = "BluetoothPbapReceiver"; - private static final boolean V = BluetoothPbapService.VERBOSE; + private static final boolean D = BluetoothPbapService.DEBUG; @Override public void onReceive(Context context, Intent intent) { - if (V) Log.v(TAG, "PbapReceiver onReceive "); + if (D) Log.d(TAG, "PbapReceiver onReceive"); Intent in = new Intent(); in.putExtras(intent); in.setClass(context, BluetoothPbapService.class); String action = intent.getAction(); in.putExtra("action", action); - if (V) Log.v(TAG,"***********action = " + action); + if (D) Log.d(TAG, "***********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); - if (V) Log.v(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, @@ -70,11 +70,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); } } |