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

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

Issue 2032273002: If location services are turned off, have the BT chooser prompt the user to turn them on. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Sync Created 4 years, 6 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_android.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 ae1873581adce554331f4e26fee34bd6a2b9e362..7d718aad29413665db0baf63fe6762b1a6c7c82a 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
@@ -68,6 +68,11 @@ class Fakes {
mFakeContext.mHasLocation = false;
}
+ @CalledByNative("FakeBluetoothAdapter")
+ public void simulateLocationServicesOff() {
+ mFakeContext.mIsSystemLocationSettingEnabled = false;
+ }
+
/**
* Creates and discovers a new device.
*/
@@ -192,6 +197,7 @@ class Fakes {
*/
static class FakeContext extends Wrappers.ContextWrapper {
public boolean mHasLocation = true;
+ public boolean mIsSystemLocationSettingEnabled = true;
public FakeContext() {
super(null);
@@ -203,6 +209,11 @@ class Fakes {
}
@Override
+ public boolean isSystemLocationSettingEnabled() {
+ return mIsSystemLocationSettingEnabled;
+ }
+
+ @Override
public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter) {
return null;
}
« no previous file with comments | « device/bluetooth/bluetooth_adapter_unittest.cc ('k') | device/bluetooth/test/bluetooth_test_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698