Chromium Code Reviews| 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 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 Loading... | |
| 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 Loading... | |
| 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 } |
| OLD | NEW |