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

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

Issue 2038753004: 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: 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: chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebDiagnosticsPage.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebDiagnosticsPage.java b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebDiagnosticsPage.java
index c5d28e68d75d8c8ee86dfd355264b6349ff7a14c..69eff5569d65f814c0f00d036711934ee9b46e3e 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebDiagnosticsPage.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebDiagnosticsPage.java
@@ -19,6 +19,7 @@ import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.NativePage;
import org.chromium.chrome.browser.UrlConstants;
+import org.chromium.components.location.LocationUtils;
import java.util.HashSet;
import java.util.Set;
@@ -100,8 +101,9 @@ public class PhysicalWebDiagnosticsPage implements NativePage {
boolean isSdkVersionCorrect = isSdkVersionCorrect();
boolean isDataConnectionActive = Utils.isDataConnectionActive(mContext);
int bluetoothStatus = Utils.getBluetoothEnabledStatus(mContext);
- boolean isLocationServicesEnabled = Utils.isLocationServicesEnabled(mContext);
- boolean isLocationPermissionGranted = Utils.isLocationPermissionGranted(mContext);
+ LocationUtils locationUtils = LocationUtils.getInstance();
+ boolean isLocationServicesEnabled = locationUtils.isSystemLocationSettingEnabled(mContext);
+ boolean isLocationPermissionGranted = locationUtils.hasAndroidLocationPermission(mContext);
boolean isPreferenceEnabled = PhysicalWeb.isPhysicalWebPreferenceEnabled(mContext);
boolean isOnboarding = PhysicalWeb.isOnboarding(mContext);

Powered by Google App Engine
This is Rietveld 408576698