Chromium Code Reviews (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out

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

Issue 2038753004: Add a LocationUtils class to give all Chromium Android code access to location helpers. (Closed) Base URL:
Patch Set: Adjust DEPS. 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/
diff --git a/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ b/device/bluetooth/android/java/src/org/chromium/device/bluetooth/
index 2cc705d22253d5a993bd2581f333c082b6478d4f..155897c18fd0ca600f4eb221b1bba9829f9fb35e 100644
--- a/device/bluetooth/android/java/src/org/chromium/device/bluetooth/
+++ b/device/bluetooth/android/java/src/org/chromium/device/bluetooth/
@@ -25,11 +25,11 @@ import android.content.IntentFilter;
import android.os.Build;
import android.os.ParcelUuid;
-import android.os.Process;
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.ArrayList;
import java.util.HashMap;
@@ -162,9 +162,8 @@ class Wrappers {
mContext = context;
- public boolean checkPermission(String permission) {
- return mContext.checkPermission(permission, Process.myPid(), Process.myUid())
- == PackageManager.PERMISSION_GRANTED;
+ public boolean hasAndroidLocationPermission() {
scheib 2016/06/22 19:36:50 The wrappers were designed to be the thinnest prac
ortuno 2016/06/27 21:05:53 Follow up patch here:
+ return LocationUtils.getInstance().hasAndroidLocationPermission(mContext);
public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter) {

Powered by Google App Engine
This is Rietveld 408576698