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

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

Issue 1226103005: Revert of bluetooth: android: Initial Low Energy Discovery Sessions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bta-manifest-
Patch Set: Created 5 years, 5 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
« no previous file with comments | « device/bluetooth/bluetooth_adapter_unittest.cc ('k') | device/bluetooth/test/bluetooth_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9751247135ad4f61ef889d21b251dbdabdcb00db..c5adcf7053acde59ffe3569a0228d33445ab1885 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
@@ -4,19 +4,12 @@
package org.chromium.device.bluetooth;
-import android.annotation.TargetApi;
-import android.bluetooth.le.ScanFilter;
-import android.os.Build;
-
import org.chromium.base.CalledByNative;
import org.chromium.base.Log;
-
-import java.util.List;
/**
* Fake implementations of android.bluetooth.* classes for testing.
*/
-@TargetApi(Build.VERSION_CODES.LOLLIPOP)
class Fakes {
private static final String TAG = "cr.Bluetooth";
@@ -24,8 +17,6 @@
* Fakes android.bluetooth.BluetoothAdapter.
*/
static class FakeBluetoothAdapter extends Wrappers.BluetoothAdapterWrapper {
- private final FakeBluetoothLeScanner mFakeScanner;
-
/**
* Creates a FakeBluetoothAdapter.
*/
@@ -36,8 +27,7 @@
}
private FakeBluetoothAdapter() {
- super(null, new FakeBluetoothLeScanner());
- mFakeScanner = (FakeBluetoothLeScanner) mScanner;
+ super(null);
}
// -----------------------------------------------------------------------------------------
@@ -68,72 +58,4 @@
return false;
}
}
-
- /**
- * Fakes android.bluetooth.le.BluetoothLeScanner.
- */
- static class FakeBluetoothLeScanner extends Wrappers.BluetoothLeScannerWrapper {
- public Wrappers.ScanCallbackWrapper mCallback;
-
- private FakeBluetoothLeScanner() {
- super(null);
- }
-
- @Override
- public void startScan(List<ScanFilter> filters, int scanSettingsScanMode,
- Wrappers.ScanCallbackWrapper callback) {
- if (mCallback != null) {
- throw new IllegalArgumentException(
- "FakeBluetoothLeScanner does not support multiple scans.");
- }
- mCallback = callback;
- }
-
- @Override
- public void stopScan(Wrappers.ScanCallbackWrapper callback) {
- if (mCallback != callback) {
- throw new IllegalArgumentException("No scan in progress.");
- }
- mCallback = null;
- }
- }
-
- /**
- * Fakes android.bluetooth.le.ScanResult
- */
- static class FakeScanResult extends Wrappers.ScanResultWrapper {
- private final FakeBluetoothDevice mDevice;
-
- FakeScanResult(FakeBluetoothDevice device) {
- super(null);
- mDevice = device;
- }
-
- @Override
- public Wrappers.BluetoothDeviceWrapper getDevice() {
- return mDevice;
- }
- }
-
- /**
- * Fakes android.bluetooth.BluetoothDevice.
- */
- static class FakeBluetoothDevice extends Wrappers.BluetoothDeviceWrapper {
- private static final String ADDRESS = "A1:B2:C3:DD:DD:DD";
- private static final String NAME = "FakeBluetoothDevice";
-
- public FakeBluetoothDevice() {
- super(null);
- }
-
- @Override
- public String getAddress() {
- return ADDRESS;
- }
-
- @Override
- public String getName() {
- return NAME;
- }
- }
}
« no previous file with comments | « device/bluetooth/bluetooth_adapter_unittest.cc ('k') | device/bluetooth/test/bluetooth_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698