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

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: Call close on destruction and reconnect 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 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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 mDevice = device; 318 mDevice = device;
319 mServices = new ArrayList<Wrappers.BluetoothGattServiceWrapper>(); 319 mServices = new ArrayList<Wrappers.BluetoothGattServiceWrapper>();
320 } 320 }
321 321
322 @Override 322 @Override
323 public void disconnect() { 323 public void disconnect() {
324 nativeOnFakeBluetoothGattDisconnect(mDevice.mAdapter.mNativeBluetoot hTestAndroid); 324 nativeOnFakeBluetoothGattDisconnect(mDevice.mAdapter.mNativeBluetoot hTestAndroid);
325 } 325 }
326 326
327 @Override 327 @Override
328 public void close() {}
scheib 2016/01/29 21:50:58 close implies disconnect, add: nativeOnFakeBluetoo
tommyt 2016/02/01 14:37:13 Done.
329
330 @Override
328 public void discoverServices() { 331 public void discoverServices() {
329 nativeOnFakeBluetoothGattDiscoverServices(mDevice.mAdapter.mNativeBl uetoothTestAndroid); 332 nativeOnFakeBluetoothGattDiscoverServices(mDevice.mAdapter.mNativeBl uetoothTestAndroid);
330 } 333 }
331 334
332 @Override 335 @Override
333 public List<Wrappers.BluetoothGattServiceWrapper> getServices() { 336 public List<Wrappers.BluetoothGattServiceWrapper> getServices() {
334 return mServices; 337 return mServices;
335 } 338 }
336 339
337 @Override 340 @Override
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 long nativeBluetoothTestAndroid); 690 long nativeBluetoothTestAndroid);
688 691
689 // Binds to BluetoothTestAndroid::OnFakeBluetoothGattWriteCharacteristic. 692 // Binds to BluetoothTestAndroid::OnFakeBluetoothGattWriteCharacteristic.
690 private static native void nativeOnFakeBluetoothGattWriteCharacteristic( 693 private static native void nativeOnFakeBluetoothGattWriteCharacteristic(
691 long nativeBluetoothTestAndroid, byte[] value); 694 long nativeBluetoothTestAndroid, byte[] value);
692 695
693 // Binds to BluetoothTestAndroid::OnFakeBluetoothGattWriteDescriptor. 696 // Binds to BluetoothTestAndroid::OnFakeBluetoothGattWriteDescriptor.
694 private static native void nativeOnFakeBluetoothGattWriteDescriptor( 697 private static native void nativeOnFakeBluetoothGattWriteDescriptor(
695 long nativeBluetoothTestAndroid, byte[] value); 698 long nativeBluetoothTestAndroid, byte[] value);
696 } 699 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698