Add notification to power save mode
Add small notification when mode is toggled and also disable web refiner
and edge navigation.
Change-Id: I166897c0e396b53884e05dac8189f049f34851f7
diff --git a/src/com/android/browser/BaseUi.java b/src/com/android/browser/BaseUi.java
index 3682d69..3a05724 100644
--- a/src/com/android/browser/BaseUi.java
+++ b/src/com/android/browser/BaseUi.java
@@ -446,7 +446,7 @@
}
public void refreshEdgeSwipeController(View container) {
- if (BrowserCommandLine.hasSwitch("ui-low-power-mode")) {
+ if (isUiLowPowerMode()) {
return;
}
@@ -696,6 +696,11 @@
return false;
}
+ public static boolean isUiLowPowerMode() {
+ return BrowserCommandLine.hasSwitch("ui-low-power-mode") ||
+ BrowserSettings.getInstance().isPowerSaveModeEnabled();
+ }
+
// -------------------------------------------------------------------------
protected void updateNavigationState(Tab tab) {