summaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothGattServer.java
diff options
context:
space:
mode:
authorAndre Eisenbach <eisenbach@google.com>2014-07-18 14:38:36 -0700
committerAndre Eisenbach <eisenbach@google.com>2014-07-18 14:38:36 -0700
commit10020cd60014082832731102c958215258e28a93 (patch)
tree7511804936dd23f27c8da8f32e2316a5910bd4c5 /framework/java/android/bluetooth/BluetoothGattServer.java
parent467c88489a3b727b398d09a9f656e5a747731cde (diff)
Reduce GATT logging output
Change-Id: Iefdf101ac849e45bf50c55ce5999364f5fbd24a4
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothGattServer.java')
-rw-r--r--framework/java/android/bluetooth/BluetoothGattServer.java17
1 files changed, 9 insertions, 8 deletions
diff --git a/framework/java/android/bluetooth/BluetoothGattServer.java b/framework/java/android/bluetooth/BluetoothGattServer.java
index fbbc2f77bb..5a39dd6b3c 100644
--- a/framework/java/android/bluetooth/BluetoothGattServer.java
+++ b/framework/java/android/bluetooth/BluetoothGattServer.java
@@ -42,6 +42,7 @@ import java.util.UUID;
public final class BluetoothGattServer implements BluetoothProfile {
private static final String TAG = "BluetoothGattServer";
private static final boolean DBG = true;
+ private static final boolean VDBG = false;
private final Context mContext;
private BluetoothAdapter mAdapter;
@@ -83,7 +84,7 @@ public final class BluetoothGattServer implements BluetoothProfile {
* @hide
*/
public void onScanResult(String address, int rssi, byte[] advData) {
- if (DBG) Log.d(TAG, "onScanResult() - Device=" + address + " RSSI=" +rssi);
+ if (VDBG) Log.d(TAG, "onScanResult() - Device=" + address + " RSSI=" +rssi);
// no op
}
@@ -133,7 +134,7 @@ public final class BluetoothGattServer implements BluetoothProfile {
ParcelUuid srvcId, int charInstId, ParcelUuid charId) {
UUID srvcUuid = srvcId.getUuid();
UUID charUuid = charId.getUuid();
- if (DBG) Log.d(TAG, "onCharacteristicReadRequest() - "
+ if (VDBG) Log.d(TAG, "onCharacteristicReadRequest() - "
+ "service=" + srvcUuid + ", characteristic=" + charUuid);
BluetoothDevice device = mAdapter.getRemoteDevice(address);
@@ -161,7 +162,7 @@ public final class BluetoothGattServer implements BluetoothProfile {
UUID srvcUuid = srvcId.getUuid();
UUID charUuid = charId.getUuid();
UUID descrUuid = descrId.getUuid();
- if (DBG) Log.d(TAG, "onCharacteristicReadRequest() - "
+ if (VDBG) Log.d(TAG, "onCharacteristicReadRequest() - "
+ "service=" + srvcUuid + ", characteristic=" + charUuid
+ "descriptor=" + descrUuid);
@@ -192,7 +193,7 @@ public final class BluetoothGattServer implements BluetoothProfile {
int charInstId, ParcelUuid charId, byte[] value) {
UUID srvcUuid = srvcId.getUuid();
UUID charUuid = charId.getUuid();
- if (DBG) Log.d(TAG, "onCharacteristicWriteRequest() - "
+ if (VDBG) Log.d(TAG, "onCharacteristicWriteRequest() - "
+ "service=" + srvcUuid + ", characteristic=" + charUuid);
BluetoothDevice device = mAdapter.getRemoteDevice(address);
@@ -223,7 +224,7 @@ public final class BluetoothGattServer implements BluetoothProfile {
UUID srvcUuid = srvcId.getUuid();
UUID charUuid = charId.getUuid();
UUID descrUuid = descrId.getUuid();
- if (DBG) Log.d(TAG, "onDescriptorWriteRequest() - "
+ if (VDBG) Log.d(TAG, "onDescriptorWriteRequest() - "
+ "service=" + srvcUuid + ", characteristic=" + charUuid
+ "descriptor=" + descrUuid);
@@ -271,7 +272,7 @@ public final class BluetoothGattServer implements BluetoothProfile {
* @hide
*/
public void onNotificationSent(String address, int status) {
- if (DBG) Log.d(TAG, "onNotificationSent() - "
+ if (VDBG) Log.d(TAG, "onNotificationSent() - "
+ "device=" + address + ", status=" + status);
BluetoothDevice device = mAdapter.getRemoteDevice(address);
@@ -490,7 +491,7 @@ public final class BluetoothGattServer implements BluetoothProfile {
*/
public boolean sendResponse(BluetoothDevice device, int requestId,
int status, int offset, byte[] value) {
- if (DBG) Log.d(TAG, "sendResponse() - device: " + device.getAddress());
+ if (VDBG) Log.d(TAG, "sendResponse() - device: " + device.getAddress());
if (mService == null || mServerIf == 0) return false;
try {
@@ -522,7 +523,7 @@ public final class BluetoothGattServer implements BluetoothProfile {
*/
public boolean notifyCharacteristicChanged(BluetoothDevice device,
BluetoothGattCharacteristic characteristic, boolean confirm) {
- if (DBG) Log.d(TAG, "notifyCharacteristicChanged() - device: " + device.getAddress());
+ if (VDBG) Log.d(TAG, "notifyCharacteristicChanged() - device: " + device.getAddress());
if (mService == null || mServerIf == 0) return false;
BluetoothGattService service = characteristic.getService();