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

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

Issue 2737093002: [Offline pages] Clean up of device conditions related code (Closed)
Patch Set: Compilation fix and small code update Created 3 years, 9 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/offlinepages/BackgroundSchedulerBridge.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/BackgroundSchedulerBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/BackgroundSchedulerBridge.java
index 1ed08e911e367e4fe89820faf3ff355e91c05254..cf09c6a84d6fb23448d24a8ad44394174a95936f 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/BackgroundSchedulerBridge.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/BackgroundSchedulerBridge.java
@@ -59,17 +59,17 @@ public class BackgroundSchedulerBridge {
@CalledByNative
private static boolean getPowerConditions() {
- return BackgroundScheduler.getPowerConditions(ContextUtils.getApplicationContext());
+ return DeviceConditions.isPowerConnected(ContextUtils.getApplicationContext());
}
@CalledByNative
private static int getBatteryConditions() {
- return BackgroundScheduler.getBatteryConditions(ContextUtils.getApplicationContext());
+ return DeviceConditions.getBatteryPercentage(ContextUtils.getApplicationContext());
}
@CalledByNative
private static int getNetworkConditions() {
- return BackgroundScheduler.getNetworkConditions(ContextUtils.getApplicationContext());
+ return DeviceConditions.getNetConnectionType(ContextUtils.getApplicationContext());
}
/**

Powered by Google App Engine
This is Rietveld 408576698