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

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

Issue 2847523002: Android: Remove GetApplicationContext part 4 (Closed)
Patch Set: Rebase and fix build 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..b045395b390b1ef1cc7cbfc7bd2781d069d6a126 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
@@ -12,10 +12,8 @@ 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;
@@ -647,9 +645,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 +663,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 +784,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 +801,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