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

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

Issue 1610053005: bluetooth: android: Fix a couple of crashes when adapter is turned on/off. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 return mGatt; 276 return mGatt;
277 } 277 }
278 278
279 @Override 279 @Override
280 public String getAddress() { 280 public String getAddress() {
281 return mAddress; 281 return mAddress;
282 } 282 }
283 283
284 @Override 284 @Override
285 public int getBluetoothClass_getDeviceClass() { 285 public int getBluetoothClass_getDeviceClass() {
286 return 0x1F00; // Unspecified Device Class 286 return Wrappers.DEVICE_CLASS_UNSPECIFIED;
287 } 287 }
288 288
289 @Override 289 @Override
290 public int getBondState() { 290 public int getBondState() {
291 return BluetoothDevice.BOND_NONE; 291 return BluetoothDevice.BOND_NONE;
292 } 292 }
293 293
294 @Override 294 @Override
295 public String getName() { 295 public String getName() {
296 return mName; 296 return mName;
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 long nativeBluetoothTestAndroid); 654 long nativeBluetoothTestAndroid);
655 655
656 // Binds to BluetoothTestAndroid::OnFakeBluetoothGattWriteCharacteristic. 656 // Binds to BluetoothTestAndroid::OnFakeBluetoothGattWriteCharacteristic.
657 private static native void nativeOnFakeBluetoothGattWriteCharacteristic( 657 private static native void nativeOnFakeBluetoothGattWriteCharacteristic(
658 long nativeBluetoothTestAndroid, byte[] value); 658 long nativeBluetoothTestAndroid, byte[] value);
659 659
660 // Binds to BluetoothTestAndroid::OnFakeBluetoothGattWriteDescriptor. 660 // Binds to BluetoothTestAndroid::OnFakeBluetoothGattWriteDescriptor.
661 private static native void nativeOnFakeBluetoothGattWriteDescriptor( 661 private static native void nativeOnFakeBluetoothGattWriteDescriptor(
662 long nativeBluetoothTestAndroid, byte[] value); 662 long nativeBluetoothTestAndroid, byte[] value);
663 } 663 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698