| Index: device/bluetooth/test/android/java/src/org/chromium/device/bluetooth/Fakes.java
|
| diff --git a/device/bluetooth/test/android/java/src/org/chromium/device/bluetooth/Fakes.java b/device/bluetooth/test/android/java/src/org/chromium/device/bluetooth/Fakes.java
|
| index 5dc82771d76a43f0d348d5c427125b0623a7b4ed..aa79966eb8c78cb5ceaf9ef802a746b370b338dc 100644
|
| --- a/device/bluetooth/test/android/java/src/org/chromium/device/bluetooth/Fakes.java
|
| +++ b/device/bluetooth/test/android/java/src/org/chromium/device/bluetooth/Fakes.java
|
| @@ -9,13 +9,10 @@ import android.bluetooth.BluetoothDevice;
|
| import android.bluetooth.le.ScanFilter;
|
| import android.bluetooth.le.ScanSettings;
|
| import android.content.BroadcastReceiver;
|
| -import android.content.Context;
|
| import android.content.Intent;
|
| import android.content.IntentFilter;
|
| -
|
| import android.os.Build;
|
| import android.os.ParcelUuid;
|
| -
|
| import android.test.mock.MockContext;
|
|
|
| import org.chromium.base.Log;
|
| @@ -411,7 +408,7 @@ class Fakes {
|
| // Wrappers.BluetoothDeviceWrapper overrides:
|
|
|
| @Override
|
| - public Wrappers.BluetoothGattWrapper connectGatt(Context context, boolean autoConnect,
|
| + public Wrappers.BluetoothGattWrapper connectGatt(boolean autoConnect,
|
| Wrappers.BluetoothGattCallbackWrapper callback, int transport) {
|
| if (mGattCallback != null && mGattCallback != callback) {
|
| throw new IllegalArgumentException(
|
| @@ -647,9 +644,10 @@ class Fakes {
|
| @CalledByNative("FakeBluetoothGattCharacteristic")
|
| private static void valueRead(ChromeBluetoothRemoteGattCharacteristic chromeCharacteristic,
|
| int status, byte[] value) {
|
| - if (chromeCharacteristic == null && sRememberedCharacteristic == null)
|
| + if (chromeCharacteristic == null && sRememberedCharacteristic == null) {
|
| throw new IllegalArgumentException(
|
| "rememberCharacteristic wasn't called previously.");
|
| + }
|
|
|
| FakeBluetoothGattCharacteristic fakeCharacteristic = (chromeCharacteristic == null)
|
| ? sRememberedCharacteristic
|
| @@ -664,9 +662,10 @@ class Fakes {
|
| @CalledByNative("FakeBluetoothGattCharacteristic")
|
| private static void valueWrite(
|
| ChromeBluetoothRemoteGattCharacteristic chromeCharacteristic, int status) {
|
| - if (chromeCharacteristic == null && sRememberedCharacteristic == null)
|
| + if (chromeCharacteristic == null && sRememberedCharacteristic == null) {
|
| throw new IllegalArgumentException(
|
| "rememberCharacteristic wasn't called previously.");
|
| + }
|
|
|
| FakeBluetoothGattCharacteristic fakeCharacteristic = (chromeCharacteristic == null)
|
| ? sRememberedCharacteristic
|
| @@ -784,8 +783,9 @@ class Fakes {
|
| @CalledByNative("FakeBluetoothGattDescriptor")
|
| private static void valueRead(
|
| ChromeBluetoothRemoteGattDescriptor chromeDescriptor, int status, byte[] value) {
|
| - if (chromeDescriptor == null && sRememberedDescriptor == null)
|
| + if (chromeDescriptor == null && sRememberedDescriptor == null) {
|
| throw new IllegalArgumentException("rememberDescriptor wasn't called previously.");
|
| + }
|
|
|
| FakeBluetoothGattDescriptor fakeDescriptor = (chromeDescriptor == null)
|
| ? sRememberedDescriptor
|
| @@ -800,8 +800,9 @@ class Fakes {
|
| @CalledByNative("FakeBluetoothGattDescriptor")
|
| private static void valueWrite(
|
| ChromeBluetoothRemoteGattDescriptor chromeDescriptor, int status) {
|
| - if (chromeDescriptor == null && sRememberedDescriptor == null)
|
| + if (chromeDescriptor == null && sRememberedDescriptor == null) {
|
| throw new IllegalArgumentException("rememberDescriptor wasn't called previously.");
|
| + }
|
|
|
| FakeBluetoothGattDescriptor fakeDescriptor = (chromeDescriptor == null)
|
| ? sRememberedDescriptor
|
|
|