| 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.BluetoothAdapter; | 9 import android.bluetooth.BluetoothAdapter; |
| 10 import android.bluetooth.BluetoothDevice; | 10 import android.bluetooth.BluetoothDevice; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 import android.os.Build; | 21 import android.os.Build; |
| 22 import android.os.ParcelUuid; | 22 import android.os.ParcelUuid; |
| 23 | 23 |
| 24 import org.chromium.base.Log; | 24 import org.chromium.base.Log; |
| 25 import org.chromium.base.annotations.CalledByNative; | 25 import org.chromium.base.annotations.CalledByNative; |
| 26 import org.chromium.base.annotations.JNINamespace; | 26 import org.chromium.base.annotations.JNINamespace; |
| 27 | 27 |
| 28 import java.util.ArrayList; | 28 import java.util.ArrayList; |
| 29 import java.util.HashMap; | 29 import java.util.HashMap; |
| 30 import java.util.List; | 30 import java.util.List; |
| 31 import java.util.UUID; |
| 31 | 32 |
| 32 /** | 33 /** |
| 33 * Wrapper classes around android.bluetooth.* classes that provide an | 34 * Wrapper classes around android.bluetooth.* classes that provide an |
| 34 * indirection layer enabling fake implementations when running tests. | 35 * indirection layer enabling fake implementations when running tests. |
| 35 * | 36 * |
| 36 * Each Wrapper base class accepts an Android API object and passes through | 37 * Each Wrapper base class accepts an Android API object and passes through |
| 37 * calls to it. When under test, Fake subclasses override all methods that | 38 * calls to it. When under test, Fake subclasses override all methods that |
| 38 * pass through to the Android object and instead provide fake implementations. | 39 * pass through to the Android object and instead provide fake implementations. |
| 39 */ | 40 */ |
| 40 @JNINamespace("device") | 41 @JNINamespace("device") |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 static class BluetoothGattServiceWrapper { | 327 static class BluetoothGattServiceWrapper { |
| 327 private final BluetoothGattService mService; | 328 private final BluetoothGattService mService; |
| 328 | 329 |
| 329 public BluetoothGattServiceWrapper(BluetoothGattService service) { | 330 public BluetoothGattServiceWrapper(BluetoothGattService service) { |
| 330 mService = service; | 331 mService = service; |
| 331 } | 332 } |
| 332 | 333 |
| 333 public int getInstanceId() { | 334 public int getInstanceId() { |
| 334 return mService.getInstanceId(); | 335 return mService.getInstanceId(); |
| 335 } | 336 } |
| 337 |
| 338 public UUID getUuid() { |
| 339 return mService.getUuid(); |
| 340 } |
| 336 } | 341 } |
| 337 } | 342 } |
| OLD | NEW |