Command line flag to disable edge navigation
Added ui-low-power-mode command line flag. If present, it
disables the edge navigation feature in SWE browser. In
future this flag can be used to disable other features
that need high CPU utilization.
Change-Id: I2e987be7edc4afa87ea138c9b602c3208fa88515
diff --git a/src/com/android/browser/BaseUi.java b/src/com/android/browser/BaseUi.java
index c12b581..cd1388f 100644
--- a/src/com/android/browser/BaseUi.java
+++ b/src/com/android/browser/BaseUi.java
@@ -51,6 +51,7 @@
import com.android.browser.Tab.SecurityState;
+import org.codeaurora.swe.BrowserCommandLine;
import org.codeaurora.swe.WebView;
import java.util.List;
@@ -460,6 +461,10 @@
}
public void refreshEdgeSwipeController(View container) {
+ if (BrowserCommandLine.hasSwitch("ui-low-power-mode")) {
+ return;
+ }
+
if (mEdgeSwipeController != null) {
mEdgeSwipeController.cleanup();
}