Add quick controls

    Bug: http://b/issue?id=3277888
    Added Quick Controls Lab setting
    Implemented Quick Controls UI

Change-Id: I72011daf9140aa5d15c8b785126867c10bbc5501
diff --git a/src/com/android/browser/BrowserSettings.java b/src/com/android/browser/BrowserSettings.java
index 1f091e2..1b8acc6 100644
--- a/src/com/android/browser/BrowserSettings.java
+++ b/src/com/android/browser/BrowserSettings.java
@@ -117,6 +117,9 @@
     private boolean navDump = false;
     private boolean hardwareAccelerated = true;
 
+    // Lab settings
+    private boolean quickControls = false;
+
     // By default the error console is shown once the user navigates to about:debug.
     // The setting can be then toggled from the settings menu.
     private boolean showConsole = true;
@@ -167,6 +170,8 @@
     public final static String PREF_HARDWARE_ACCEL = "enable_hardware_accel";
     public final static String PREF_USER_AGENT = "user_agent";
 
+    public final static String PREF_QUICK_CONTROLS = "enable_quick_controls";
+
     private static final String DESKTOP_USERAGENT = "Mozilla/5.0 (Macintosh; " +
             "U; Intel Mac OS X 10_6_3; en-us) AppleWebKit/533.16 (KHTML, " +
             "like Gecko) Version/5.0 Safari/533.16";
@@ -490,6 +495,8 @@
             navDump = p.getBoolean("enable_nav_dump", navDump);
         }
 
+        quickControls = p.getBoolean(PREF_QUICK_CONTROLS, quickControls);
+
         // Only set these on startup if it is a dev build
         if (DEV_BUILD) {
             userAgent = Integer.parseInt(p.getString(PREF_USER_AGENT, "0"));
@@ -573,6 +580,10 @@
         return hardwareAccelerated;
     }
 
+    public boolean useQuickControls() {
+        return quickControls;
+    }
+
     public boolean showDebugSettings() {
         return showDebugSettings;
     }
@@ -836,6 +847,8 @@
         } else if (PREF_USER_AGENT.equals(key)) {
             userAgent = Integer.parseInt(p.getString(PREF_USER_AGENT, "0"));
             update();
+        } else if (PREF_QUICK_CONTROLS.equals(key)) {
+            quickControls = p.getBoolean(PREF_QUICK_CONTROLS, quickControls);
         }
     }
 }