fix qc urlbar position and show in auto-login
Bug: 4108540
Show the url bar when auto-login is in progress
Move url bar to top in QuickControls to work with instant
search
Remove suggestions reversal
Change-Id: I0040fa74dd26b5eecdab278c0104199fe5269aba
diff --git a/src/com/android/browser/TitleBarXLarge.java b/src/com/android/browser/TitleBarXLarge.java
index be5e90f..ccbb38d 100644
--- a/src/com/android/browser/TitleBarXLarge.java
+++ b/src/com/android/browser/TitleBarXLarge.java
@@ -211,20 +211,33 @@
default:
throw new IllegalStateException();
}
- if (animate) {
- mAutoLogin.startAnimation(AnimationUtils.loadAnimation(
- getContext(), R.anim.autologin_enter));
+ if (mUseQuickControls) {
+ mUi.showTitleBar();
+ } else {
+ if (animate) {
+ mAutoLogin.startAnimation(AnimationUtils.loadAnimation(
+ getContext(), R.anim.autologin_enter));
+ }
}
} else {
mAutoLoginHandler = null;
- if (animate) {
- hideAutoLogin();
- } else if (mAutoLogin.getAnimation() == null) {
+ if (mUseQuickControls) {
+ mUi.hideTitleBar();
mAutoLogin.setVisibility(View.GONE);
+ } else {
+ if (animate) {
+ hideAutoLogin();
+ } else if (mAutoLogin.getAnimation() == null) {
+ mAutoLogin.setVisibility(View.GONE);
+ }
}
}
}
+ boolean inAutoLogin() {
+ return mAutoLoginHandler != null;
+ }
+
private ViewGroup.LayoutParams makeLayoutParams() {
if (mUseQuickControls) {
return new FrameLayout.LayoutParams(LayoutParams.MATCH_PARENT,
@@ -247,12 +260,11 @@
void setUseQuickControls(boolean useQuickControls) {
mUseQuickControls = useQuickControls;
- mUrlInput.setUseQuickControls(mUseQuickControls);
setLayoutParams(makeLayoutParams());
}
void setShowProgressOnly(boolean progress) {
- if (progress) {
+ if (progress && !inAutoLogin()) {
mContainer.setVisibility(View.GONE);
} else {
mContainer.setVisibility(View.VISIBLE);