summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Matthew Xie <mattx@google.com> 2013-03-12 17:58:03 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2013-03-12 23:16:02 +0000
commitd6c87ccde6722c7dedd05a18f30d8634893e10ee (patch)
tree81b53578d28e9bbae4775fbedf6240e86c85d474
parent999c2a69b4c881b898555e8d84b1b38e276a65c0 (diff)
parent3f36660a60ce065b71f6d5eb24911012b6d66fdd (diff)
Merge "Fixed 32 bit characteristic value assignment" into jb-mr2-dev
-rw-r--r--core/java/android/bluetooth/BluetoothGattCharacteristic.java3
-rw-r--r--core/java/android/bluetooth/BluetoothGattServer.java4
2 files changed, 4 insertions, 3 deletions
diff --git a/core/java/android/bluetooth/BluetoothGattCharacteristic.java b/core/java/android/bluetooth/BluetoothGattCharacteristic.java
index 18492ab8ff6c..f44dc5c08bb9 100644
--- a/core/java/android/bluetooth/BluetoothGattCharacteristic.java
+++ b/core/java/android/bluetooth/BluetoothGattCharacteristic.java
@@ -529,7 +529,8 @@ public class BluetoothGattCharacteristic {
case FORMAT_UINT32:
mValue[offset++] = (byte)(value & 0xFF);
mValue[offset++] = (byte)((value >> 8) & 0xFF);
- mValue[offset] = (byte)((value >> 16) & 0xFF);
+ mValue[offset++] = (byte)((value >> 16) & 0xFF);
+ mValue[offset] = (byte)((value >> 24) & 0xFF);
break;
default:
diff --git a/core/java/android/bluetooth/BluetoothGattServer.java b/core/java/android/bluetooth/BluetoothGattServer.java
index 91a1a9443f8f..6b693779153e 100644
--- a/core/java/android/bluetooth/BluetoothGattServer.java
+++ b/core/java/android/bluetooth/BluetoothGattServer.java
@@ -534,7 +534,7 @@ public final class BluetoothGattServer implements BluetoothProfile {
*
* <p>The connection may not be established right away, but will be
* completed when the remote device is available. A
- * {@link BluetoothGattCallback#onConnectionStateChange} callback will be
+ * {@link BluetoothGattServerCallback#onConnectionStateChange} callback will be
* invoked when the connection state changes as a result of this function.
*
* <p>The autoConnect paramter determines whether to actively connect to
@@ -553,7 +553,7 @@ public final class BluetoothGattServer implements BluetoothProfile {
* @return true, if the connection attempt was initiated successfully
*/
public boolean connect(BluetoothDevice device, boolean autoConnect) {
- if (DBG) Log.d(TAG, "connect: " + device.getAddress() + ", auto: " + autoConnect);
+ if (DBG) Log.d(TAG, "connect() - device: " + device.getAddress() + ", auto: " + autoConnect);
if (mService == null || mServerIf == 0) return false;
try {