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

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

Issue 2847523002: Android: Remove GetApplicationContext part 4 (Closed)
Patch Set: fix cronet Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698