fix url action mode
Bug: 5093025
The url bar is kept visible now
It's still not perfect, because the url bar gets pushed down
under the user's finger
Change-Id: I7142cd1f442bf7e3b53af5aac150defda68661ed
diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java
index f20968b..0d22af0 100644
--- a/src/com/android/browser/Controller.java
+++ b/src/com/android/browser/Controller.java
@@ -1812,7 +1812,7 @@
void onActionModeStarted(ActionMode mode) {
mUi.onActionModeStarted(mode);
mActionMode = mode;
- if (mSimulateActionBarOverlayMode) {
+ if (mSimulateActionBarOverlayMode && !mUi.isEditingUrl()) {
WebView web = getCurrentWebView();
// Simulate overlay mode by scrolling the webview the amount it will be
// pushed down. Actual overlay mode doesn't work for us as otherwise
diff --git a/src/com/android/browser/PhoneUi.java b/src/com/android/browser/PhoneUi.java
index 901f5bd..32bc092 100644
--- a/src/com/android/browser/PhoneUi.java
+++ b/src/com/android/browser/PhoneUi.java
@@ -213,7 +213,9 @@
@Override
public void onActionModeStarted(ActionMode mode) {
- hideTitleBar();
+ if (!isEditingUrl()) {
+ hideTitleBar();
+ }
}
@Override
diff --git a/src/com/android/browser/UI.java b/src/com/android/browser/UI.java
index bc4c0cf..0929c0c 100644
--- a/src/com/android/browser/UI.java
+++ b/src/com/android/browser/UI.java
@@ -134,6 +134,8 @@
void editUrl(boolean clearInput);
+ boolean isEditingUrl();
+
boolean dispatchKey(int code, KeyEvent event);
public static interface DropdownChangeListener {