Add new auto-login UI.
When the WebView notifies us of an auto-login request, check if the account is
valid. If so, use it to log into the account manager. If that fails or the
account is not valid, display the login UI.
Bug: 3367381
Change-Id: I5a164ef676921eec03a89860fa5be722d3d987d4
diff --git a/src/com/android/browser/BaseUi.java b/src/com/android/browser/BaseUi.java
index 5084e31..71346ae 100644
--- a/src/com/android/browser/BaseUi.java
+++ b/src/com/android/browser/BaseUi.java
@@ -240,6 +240,7 @@
onProgressChanged(tab);
boolean incognito = mActiveTab.getWebView().isPrivateBrowsingEnabled();
getTitleBar().setIncognitoMode(incognito);
+ updateAutoLogin(tab, false);
}
Tab getActiveTab() {
@@ -546,11 +547,23 @@
&& mComboView == null;
}
+ @Override
+ public void showAutoLogin(Tab tab) {
+ updateAutoLogin(tab, true);
+ }
+
+ @Override
+ public void hideAutoLogin(Tab tab) {
+ updateAutoLogin(tab, true);
+ }
+
// -------------------------------------------------------------------------
protected void updateNavigationState(Tab tab) {
}
+ protected void updateAutoLogin(Tab tab, boolean animate) {}
+
/**
* Update the lock icon to correspond to our latest state.
*/