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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 } |
OLD | NEW |