summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2011-08-11 16:26:53 -0700
committerJohn Reck <jreck@google.com>2011-08-11 16:26:53 -0700
commit3ba455394dd3413b6246f00d2bf2083547862735 (patch)
tree45456b6ded454a3a3ac2336dc53dccc395d438e0
parente3da7d615be4710da92a79e6ed70dc1982deda4c (diff)
downloadpackages_apps_Browser-3ba455394dd3413b6246f00d2bf2083547862735.zip
packages_apps_Browser-3ba455394dd3413b6246f00d2bf2083547862735.tar.gz
packages_apps_Browser-3ba455394dd3413b6246f00d2bf2083547862735.tar.bz2
Don't hide the navscreen when going to bookmarks
Bug: 5144826 Change-Id: If810b3d82c52265f841954f295f5974af9807a01
-rw-r--r--src/com/android/browser/BaseUi.java8
-rw-r--r--src/com/android/browser/Controller.java3
-rw-r--r--src/com/android/browser/NavScreen.java1
-rw-r--r--src/com/android/browser/PhoneUi.java19
-rw-r--r--src/com/android/browser/UI.java4
5 files changed, 23 insertions, 12 deletions
diff --git a/src/com/android/browser/BaseUi.java b/src/com/android/browser/BaseUi.java
index 372f2a9..f92368e 100644
--- a/src/com/android/browser/BaseUi.java
+++ b/src/com/android/browser/BaseUi.java
@@ -558,7 +558,7 @@ public abstract class BaseUi implements UI, OnTouchListener {
}
@Override
- public boolean showsWeb() {
+ public boolean isWebShowing() {
return mCustomView == null;
}
@@ -841,4 +841,10 @@ public abstract class BaseUi implements UI, OnTouchListener {
}
}
};
+
+ @Override
+ public void showWeb(boolean animate) {
+ mUiController.hideCustomView();
+ }
+
}
diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java
index 7c93e9f..8d8a2be 100644
--- a/src/com/android/browser/Controller.java
+++ b/src/com/android/browser/Controller.java
@@ -1177,6 +1177,7 @@ public class Controller
if (intent == null || resultCode != Activity.RESULT_OK) {
break;
}
+ mUi.showWeb(false);
if (Intent.ACTION_VIEW.equals(intent.getAction())) {
Tab t = getCurrentTab();
Uri uri = intent.getData();
@@ -2618,7 +2619,7 @@ public class Controller
boolean onKeyLongPress(int keyCode, KeyEvent event) {
switch(keyCode) {
case KeyEvent.KEYCODE_BACK:
- if (mUi.showsWeb()) {
+ if (mUi.isWebShowing()) {
bookmarksOrHistoryPicker(true);
return true;
}
diff --git a/src/com/android/browser/NavScreen.java b/src/com/android/browser/NavScreen.java
index 0190c1b..22f6257 100644
--- a/src/com/android/browser/NavScreen.java
+++ b/src/com/android/browser/NavScreen.java
@@ -156,7 +156,6 @@ public class NavScreen extends RelativeLayout
}
}
if (mBookmarks == v) {
- mUi.hideNavScreen(false);
switchToSelected();
mUiController.bookmarksOrHistoryPicker(false);
} else if (mNewTab == v) {
diff --git a/src/com/android/browser/PhoneUi.java b/src/com/android/browser/PhoneUi.java
index f33dbef..d1aed92 100644
--- a/src/com/android/browser/PhoneUi.java
+++ b/src/com/android/browser/PhoneUi.java
@@ -153,14 +153,6 @@ public class PhoneUi extends BaseUi {
}
}
- @Override
- public void showComboView(ComboViews startWith, Bundle extras) {
- if (mNavScreen != null) {
- hideNavScreen(false);
- }
- super.showComboView(startWith, extras);
- }
-
// menu handling callbacks
@Override
@@ -313,4 +305,15 @@ public class PhoneUi extends BaseUi {
return true;
}
+ @Override
+ public boolean isWebShowing() {
+ return super.isWebShowing() && mNavScreen == null;
+ }
+
+ @Override
+ public void showWeb(boolean animate) {
+ super.showWeb(animate);
+ hideNavScreen(animate);
+ }
+
}
diff --git a/src/com/android/browser/UI.java b/src/com/android/browser/UI.java
index 0929c0c..a9cbd7b 100644
--- a/src/com/android/browser/UI.java
+++ b/src/com/android/browser/UI.java
@@ -122,7 +122,9 @@ public interface UI {
public void setShouldShowErrorConsole(Tab tab, boolean show);
// returns if the web page is clear of any overlays (not including sub windows)
- public boolean showsWeb();
+ public boolean isWebShowing();
+
+ public void showWeb(boolean animate);
Bitmap getDefaultVideoPoster();