Merge "Fix bookmark long press "open in new window"" into honeycomb-mr1
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 8081504..856c2ef 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -389,6 +389,12 @@
<string name="pref_autologin_progress">Signing into Google sites using <xliff:g>%s</xliff:g>\nYour Privacy & Security settings control automatic Google sign-in</string>
<!-- Option in account list to disable autologin [CHAR-LIMIT=50] -->
<string name="pref_autologin_disable">Don\'t sign in automatically</string>
+ <!-- Auto-login bar description [CHAR-LIMIT=40] -->
+ <string name="autologin_bar_text">Automatic sign-in is available.</string>
+ <!-- Login button [CHAR-LIMIT=10] -->
+ <string name="autologin_bar_login_text">Login</string>
+ <!-- Login failure text [CHAR-LIMIT=25] -->
+ <string name="autologin_bar_error">Login failed.</string>
<!-- Heading for the AutoFill profile editor to tell the user what AutoFill does and why they should fill out the profile. [CHAR-LIMIT=None] -->
<string name="autofill_profile_editor_heading">AutoFill will use your profile to help you complete web forms in a single click.</string>
diff --git a/src/com/android/browser/BaseUi.java b/src/com/android/browser/BaseUi.java
index c01ec06..b108fd8 100644
--- a/src/com/android/browser/BaseUi.java
+++ b/src/com/android/browser/BaseUi.java
@@ -468,6 +468,10 @@
mContentView.addView(mComboView, COVER_SCREEN_PARAMS);
}
+ public boolean isComboViewShowing() {
+ return (mComboView != null);
+ }
+
/**
* dismiss the ComboPage
*/
diff --git a/src/com/android/browser/XLargeUi.java b/src/com/android/browser/XLargeUi.java
index 371e649..6225ad4 100644
--- a/src/com/android/browser/XLargeUi.java
+++ b/src/com/android/browser/XLargeUi.java
@@ -17,7 +17,6 @@
package com.android.browser;
import com.android.browser.ScrollWebView.ScrollListener;
-import com.android.browser.UI.DropdownChangeListener;
import android.animation.Animator;
import android.animation.Animator.AnimatorListener;
@@ -26,6 +25,7 @@
import android.app.Activity;
import android.content.pm.PackageManager;
import android.os.Bundle;
+import android.os.Handler;
import android.util.Log;
import android.view.ActionMode;
import android.view.Gravity;
@@ -52,6 +52,7 @@
private boolean mUseQuickControls;
private PieControl mPieControl;
private boolean mInAnimation = false;
+ private Handler mHandler;
/**
* @param browser
@@ -59,6 +60,7 @@
*/
public XLargeUi(Activity browser, UiController controller) {
super(browser, controller);
+ mHandler = new Handler();
mTitleBar = new TitleBarXLarge(mActivity, mUiController, this);
mTitleBar.setProgress(100);
mTabBar = new TabBar(mActivity, mUiController, this);
@@ -83,10 +85,12 @@
@Override
public void hideComboView() {
- checkTabCount();
- super.hideComboView();
- // ComboView changes the action bar, set it back up to what we want
- setupActionBar();
+ if (isComboViewShowing()) {
+ super.hideComboView();
+ // ComboView changes the action bar, set it back up to what we want
+ setupActionBar();
+ checkTabCount();
+ }
}
private void setUseQuickControls(boolean useQuickControls) {
@@ -119,9 +123,13 @@
if (mUseQuickControls) {
int n = mTabBar.getTabCount();
if (n >= 2) {
- mActivity.getActionBar().show();
+ mActionBar.show();
} else if (n == 1) {
- mActivity.getActionBar().hide();
+ mHandler.post(new Runnable() {
+ public void run() {
+ mActionBar.hide();
+ }
+ });
}
}
}