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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/BluetoothChooserDialog.java

Issue 2183563002: Remove Context param from LocationUtils methods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update BT Device Fakes class Created 4 years, 5 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 | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/BluetoothChooserDialog.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/BluetoothChooserDialog.java b/chrome/android/java/src/org/chromium/chrome/browser/BluetoothChooserDialog.java
index b764dd9cd95cfd48efe2ceab4bd903567f670a00..0076fe3c9fcef5556c0db0ca3c05f83e21faa5ef 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/BluetoothChooserDialog.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/BluetoothChooserDialog.java
@@ -200,10 +200,9 @@ public class BluetoothChooserDialog
// Returns true if Location Services is on and Chrome has permission to see the user's location.
private boolean checkLocationServicesAndPermission() {
- final boolean havePermission =
- LocationUtils.getInstance().hasAndroidLocationPermission(mActivity);
+ final boolean havePermission = LocationUtils.getInstance().hasAndroidLocationPermission();
final boolean locationServicesOn =
- LocationUtils.getInstance().isSystemLocationSettingEnabled(mActivity);
+ LocationUtils.getInstance().isSystemLocationSettingEnabled();
if (!havePermission
&& !mWindowAndroid.canRequestPermission(
@@ -323,8 +322,7 @@ public class BluetoothChooserDialog
@CalledByNative
private static BluetoothChooserDialog create(WindowAndroid windowAndroid, String origin,
int securityLevel, long nativeBluetoothChooserDialogPtr) {
- if (!LocationUtils.getInstance().hasAndroidLocationPermission(
- windowAndroid.getActivity().get())
+ if (!LocationUtils.getInstance().hasAndroidLocationPermission()
&& !windowAndroid.canRequestPermission(
Manifest.permission.ACCESS_COARSE_LOCATION)) {
// If we can't even ask for enough permission to scan for Bluetooth devices, don't open
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698