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

Unified Diff: device/bluetooth/test/bluetooth_test_android.cc

Issue 2100313003: bluetooth: Remove Context from Wrappers and use LocationUtils directly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-location-utils
Patch Set: remove new line 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
Index: device/bluetooth/test/bluetooth_test_android.cc
diff --git a/device/bluetooth/test/bluetooth_test_android.cc b/device/bluetooth/test/bluetooth_test_android.cc
index b763733b51d2b31a2dc2215273e6388026634923..a3360743f9323fe2959736db48c38924c41d7857 100644
--- a/device/bluetooth/test/bluetooth_test_android.cc
+++ b/device/bluetooth/test/bluetooth_test_android.cc
@@ -34,6 +34,10 @@ BluetoothTestAndroid::~BluetoothTestAndroid() {
void BluetoothTestAndroid::SetUp() {
// Register in SetUp so that ASSERT can be used.
ASSERT_TRUE(RegisterNativesImpl(AttachCurrentThread()));
+
+ // Set the permission to true so that we can use the API.
+ Java_Fakes_setLocationServicesState(
+ AttachCurrentThread(), true /* hasPermission */, true /* isEnabled */);
}
void BluetoothTestAndroid::TearDown() {
@@ -68,8 +72,8 @@ void BluetoothTestAndroid::InitWithFakeAdapter() {
}
bool BluetoothTestAndroid::DenyPermission() {
- Java_FakeBluetoothAdapter_denyPermission(AttachCurrentThread(),
- j_fake_bluetooth_adapter_.obj());
+ Java_Fakes_setLocationServicesState(
+ AttachCurrentThread(), false /* hasPermission */, true /* isEnabled */);
return true;
}

Powered by Google App Engine
This is Rietveld 408576698