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

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

Issue 2105573002: Revert of Add a LocationUtils class to give all Chromium Android code access to location helpers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: 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 a03283f36af0444a783e4ceee4c6f3631bad5368..a7751f75fab24955e4642b3ad2cca6efb4924bbe 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
@@ -4,6 +4,7 @@
package org.chromium.device.bluetooth;
+import android.Manifest;
import android.annotation.TargetApi;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.le.ScanSettings;
@@ -189,8 +190,8 @@
*/
private boolean canScan() {
Wrappers.ContextWrapper context = mAdapter.getContext();
-
- return context.hasAndroidLocationPermission();
+ return context.checkPermission(Manifest.permission.ACCESS_COARSE_LOCATION)
+ || context.checkPermission(Manifest.permission.ACCESS_FINE_LOCATION);
}
private void registerBroadcastReceiver() {
« no previous file with comments | « device/bluetooth/android/java/DEPS ('k') | device/bluetooth/android/java/src/org/chromium/device/bluetooth/Wrappers.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698