Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1087)

Side by Side Diff: device/bluetooth/test/bluetooth_test_android.cc

Issue 1711393002: bluetooth: android: register for adapter on/off events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased on master Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698