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/PhoneUi.java b/src/com/android/browser/PhoneUi.java
index 66656cf..e35e624 100644
--- a/src/com/android/browser/PhoneUi.java
+++ b/src/com/android/browser/PhoneUi.java
@@ -19,6 +19,7 @@
import android.app.Activity;
import android.content.Context;
import android.graphics.PixelFormat;
+import android.util.Log;
import android.view.ActionMode;
import android.view.Gravity;
import android.view.Menu;
@@ -118,6 +119,27 @@
}
@Override
+ public void setActiveTab(Tab tab) {
+ super.setActiveTab(tab);
+ WebView view = tab.getWebView();
+ // TabControl.setCurrentTab has been called before this,
+ // so the tab is guaranteed to have a webview
+ if (view == null) {
+ Log.e(LOGTAG, "active tab with no webview detected");
+ return;
+ }
+ view.setEmbeddedTitleBar(getEmbeddedTitleBar());
+ if (tab.isInVoiceSearchMode()) {
+ showVoiceTitleBar(tab.getVoiceDisplayTitle());
+ } else {
+ revertVoiceTitleBar(tab);
+ }
+ resetTitleIconAndProgress(tab);
+ updateLockIconToLatest(tab);
+ tab.getTopWindow().requestFocus();
+ }
+
+ @Override
protected void attachFakeTitleBar(WebView mainView) {
WindowManager manager = (WindowManager)
mActivity.getSystemService(Context.WINDOW_SERVICE);