summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/TitleBar.java
diff options
context:
space:
mode:
authorJonathan Dixon <joth@google.com>2013-08-25 19:35:27 -0700
committerJonathan Dixon <joth@google.com>2013-08-25 20:07:02 -0700
commitf9e1705d4012706664a2bdf63a50b8a784b833dd (patch)
tree9cf92ff971c6cd8124391da966f208db2f588baa /src/com/android/browser/TitleBar.java
parent56b5495f6761d5800918682a5b6bdd282019f14b (diff)
downloadpackages_apps_Browser-f9e1705d4012706664a2bdf63a50b8a784b833dd.zip
packages_apps_Browser-f9e1705d4012706664a2bdf63a50b8a784b833dd.tar.gz
packages_apps_Browser-f9e1705d4012706664a2bdf63a50b8a784b833dd.tar.bz2
De-classicify Android Browser part 2
Bug: 10427705 Allows Browser to compile even when WebViewClassic is no longer in frameworks/base. The deleted functionality was already disabled at runtime when using non-classic webview. Change-Id: I21b58ec52ac059c699b49a2dd80008d9a9e6791a
Diffstat (limited to 'src/com/android/browser/TitleBar.java')
-rw-r--r--src/com/android/browser/TitleBar.java38
1 files changed, 4 insertions, 34 deletions
diff --git a/src/com/android/browser/TitleBar.java b/src/com/android/browser/TitleBar.java
index a0cc857..83c6626 100644
--- a/src/com/android/browser/TitleBar.java
+++ b/src/com/android/browser/TitleBar.java
@@ -53,7 +53,6 @@ public class TitleBar extends RelativeLayout {
private AutologinBar mAutoLogin;
private NavigationBarBase mNavBar;
private boolean mUseQuickControls;
- private SnapshotBar mSnapshotBar;
//state
private boolean mShowing;
@@ -91,16 +90,6 @@ public class TitleBar extends RelativeLayout {
mAutoLogin.setTitleBar(this);
}
- private void inflateSnapshotBar() {
- if (mSnapshotBar != null) {
- return;
- }
-
- ViewStub stub = (ViewStub) findViewById(R.id.snapshotbar_stub);
- mSnapshotBar = (SnapshotBar) stub.inflate();
- mSnapshotBar.setTitleBar(this);
- }
-
@Override
protected void onConfigurationChanged(Configuration config) {
super.onConfigurationChanged(config);
@@ -119,14 +108,10 @@ public class TitleBar extends RelativeLayout {
}
private void setFixedTitleBar() {
- boolean isFixed = !mUseQuickControls
- && !mContext.getResources().getBoolean(R.bool.hide_title);
- isFixed |= mAccessibilityManager.isEnabled();
- isFixed |= !BrowserWebView.isClassic();
// If getParent() returns null, we are initializing
ViewGroup parent = (ViewGroup)getParent();
- if (mIsFixedTitleBar == isFixed && parent != null) return;
- mIsFixedTitleBar = isFixed;
+ if (mIsFixedTitleBar && parent != null) return;
+ mIsFixedTitleBar = true;
setSkipTitleBarAnimations(true);
show();
setSkipTitleBarAnimations(false);
@@ -365,9 +350,7 @@ public class TitleBar extends RelativeLayout {
}
public boolean wantsToBeVisible() {
- return inAutoLogin()
- || (mSnapshotBar != null && mSnapshotBar.getVisibility() == View.VISIBLE
- && mSnapshotBar.isAnimating());
+ return inAutoLogin();
}
private boolean inAutoLogin() {
@@ -419,20 +402,7 @@ public class TitleBar extends RelativeLayout {
}
public void onTabDataChanged(Tab tab) {
- if (mSnapshotBar != null) {
- mSnapshotBar.onTabDataChanged(tab);
- }
-
- if (tab.isSnapshot()) {
- inflateSnapshotBar();
- mSnapshotBar.setVisibility(VISIBLE);
- mNavBar.setVisibility(GONE);
- } else {
- if (mSnapshotBar != null) {
- mSnapshotBar.setVisibility(GONE);
- }
- mNavBar.setVisibility(VISIBLE);
- }
+ mNavBar.setVisibility(VISIBLE);
}
public void onScrollChanged() {