OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "device/bluetooth/test/bluetooth_test_android.h" | 5 #include "device/bluetooth/test/bluetooth_test_android.h" |
6 | 6 |
7 #include <iterator> | 7 #include <iterator> |
8 #include <sstream> | 8 #include <sstream> |
9 | 9 |
10 #include "base/android/jni_array.h" | 10 #include "base/android/jni_array.h" |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 } | 349 } |
350 | 350 |
351 void BluetoothTestAndroid::OnFakeBluetoothGattWriteDescriptor( | 351 void BluetoothTestAndroid::OnFakeBluetoothGattWriteDescriptor( |
352 JNIEnv* env, | 352 JNIEnv* env, |
353 const JavaParamRef<jobject>& caller, | 353 const JavaParamRef<jobject>& caller, |
354 const JavaParamRef<jbyteArray>& value) { | 354 const JavaParamRef<jbyteArray>& value) { |
355 gatt_write_descriptor_attempts_++; | 355 gatt_write_descriptor_attempts_++; |
356 base::android::JavaByteArrayToByteVector(env, value, &last_write_value_); | 356 base::android::JavaByteArrayToByteVector(env, value, &last_write_value_); |
357 } | 357 } |
358 | 358 |
| 359 void BluetoothTestAndroid::OnFakeAdapterStateChanged( |
| 360 JNIEnv* env, |
| 361 const JavaParamRef<jobject>& caller, |
| 362 const bool powered) { |
| 363 adapter_->NotifyAdapterStateChanged(powered); |
| 364 } |
| 365 |
359 } // namespace device | 366 } // namespace device |
OLD | NEW |