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

Side by Side Diff: device/bluetooth/test/android/java/src/org/chromium/device/bluetooth/Fakes.java

Issue 1618273002: Call BluetoothGatt#close() after disconnecting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit tests on Android Created 4 years, 11 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 package org.chromium.device.bluetooth; 5 package org.chromium.device.bluetooth;
6 6
7 import android.Manifest; 7 import android.Manifest;
8 import android.annotation.TargetApi; 8 import android.annotation.TargetApi;
9 import android.bluetooth.BluetoothDevice; 9 import android.bluetooth.BluetoothDevice;
10 import android.bluetooth.le.ScanFilter; 10 import android.bluetooth.le.ScanFilter;
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 mDevice = device; 313 mDevice = device;
314 mServices = new ArrayList<Wrappers.BluetoothGattServiceWrapper>(); 314 mServices = new ArrayList<Wrappers.BluetoothGattServiceWrapper>();
315 } 315 }
316 316
317 @Override 317 @Override
318 public void disconnect() { 318 public void disconnect() {
319 nativeOnFakeBluetoothGattDisconnect(mDevice.mAdapter.mNativeBluetoot hTestAndroid); 319 nativeOnFakeBluetoothGattDisconnect(mDevice.mAdapter.mNativeBluetoot hTestAndroid);
320 } 320 }
321 321
322 @Override 322 @Override
323 public void close() {}
324
325 @Override
323 public void discoverServices() { 326 public void discoverServices() {
324 nativeOnFakeBluetoothGattDiscoverServices(mDevice.mAdapter.mNativeBl uetoothTestAndroid); 327 nativeOnFakeBluetoothGattDiscoverServices(mDevice.mAdapter.mNativeBl uetoothTestAndroid);
325 } 328 }
326 329
327 @Override 330 @Override
328 public List<Wrappers.BluetoothGattServiceWrapper> getServices() { 331 public List<Wrappers.BluetoothGattServiceWrapper> getServices() {
329 return mServices; 332 return mServices;
330 } 333 }
331 334
332 @Override 335 @Override
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 long nativeBluetoothTestAndroid); 685 long nativeBluetoothTestAndroid);
683 686
684 // Binds to BluetoothTestAndroid::OnFakeBluetoothGattWriteCharacteristic. 687 // Binds to BluetoothTestAndroid::OnFakeBluetoothGattWriteCharacteristic.
685 private static native void nativeOnFakeBluetoothGattWriteCharacteristic( 688 private static native void nativeOnFakeBluetoothGattWriteCharacteristic(
686 long nativeBluetoothTestAndroid, byte[] value); 689 long nativeBluetoothTestAndroid, byte[] value);
687 690
688 // Binds to BluetoothTestAndroid::OnFakeBluetoothGattWriteDescriptor. 691 // Binds to BluetoothTestAndroid::OnFakeBluetoothGattWriteDescriptor.
689 private static native void nativeOnFakeBluetoothGattWriteDescriptor( 692 private static native void nativeOnFakeBluetoothGattWriteDescriptor(
690 long nativeBluetoothTestAndroid, byte[] value); 693 long nativeBluetoothTestAndroid, byte[] value);
691 } 694 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698