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

Unified Diff: device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothAdapter.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
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 7367e2f62d534c635393432c18e145551bb9a519..ebc9dc659c0ac0ad0b0a92a6256210d4d11f984a 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
@@ -209,13 +209,9 @@ final class ChromeBluetoothAdapter extends BroadcastReceiver {
* are on.
*/
private boolean canScan() {
- Context context = mAdapter.getContext();
-
- boolean havePermission = LocationUtils.getInstance().hasAndroidLocationPermission(context);
- boolean locationServicesOn =
- LocationUtils.getInstance().isSystemLocationSettingEnabled(context);
-
- return havePermission && locationServicesOn;
+ LocationUtils locationUtils = LocationUtils.getInstance();
+ return locationUtils.hasAndroidLocationPermission()
+ && locationUtils.isSystemLocationSettingEnabled();
}
private void registerBroadcastReceiver() {

Powered by Google App Engine
This is Rietveld 408576698