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

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

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/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothAdapter.java
diff --git a/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothAdapter.java b/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothAdapter.java
index a320bfd0b1de44d643d795faff9d73b8a86f9aa7..8659685aed718444c70c662810ac26420241f570 100644
--- a/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothAdapter.java
+++ b/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothAdapter.java
@@ -17,6 +17,7 @@ import android.os.ParcelUuid;
import org.chromium.base.Log;
import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.annotations.JNINamespace;
+import org.chromium.components.location.LocationUtils;
import java.util.List;
@@ -207,9 +208,9 @@ final class ChromeBluetoothAdapter extends BroadcastReceiver {
* @return true if Chromium has permission to scan for Bluetooth devices.
*/
private boolean canScan() {
- Wrappers.ContextWrapper context = mAdapter.getContext();
+ Context context = mAdapter.getContext();
- return context.hasAndroidLocationPermission();
+ return LocationUtils.getInstance().hasAndroidLocationPermission(context);
}
private void registerBroadcastReceiver() {

Powered by Google App Engine
This is Rietveld 408576698