summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2011-08-11 17:38:45 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-08-11 17:38:45 -0700
commit31a8579c697615e83ff2f4ddc8131ce3bf1bea8a (patch)
tree41640bab15de13c68f644c8e00f072c92bab2e34
parent4da81c8ec8fa457f091c709ff0986353f7ffe08f (diff)
parent3ba455394dd3413b6246f00d2bf2083547862735 (diff)
downloadpackages_apps_Browser-31a8579c697615e83ff2f4ddc8131ce3bf1bea8a.zip
packages_apps_Browser-31a8579c697615e83ff2f4ddc8131ce3bf1bea8a.tar.gz
packages_apps_Browser-31a8579c697615e83ff2f4ddc8131ce3bf1bea8a.tar.bz2
Merge "Don't hide the navscreen when going to bookmarks"
-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 cafbafb..2144dd0 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();
@@ -2616,7 +2617,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 7321267..bb6b63e 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
@@ -309,4 +301,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();