diff options
| author | Patrick Scott <phanna@android.com> | 2011-01-31 18:21:58 -0500 |
|---|---|---|
| committer | Patrick Scott <phanna@android.com> | 2011-01-31 18:27:47 -0500 |
| commit | cd135089d54a8c003f7b0a35d88b3230f0a206b5 (patch) | |
| tree | 7b11632e6bb43fc30d030e7da15aa741cebe9fd0 /src/com/android/browser/Controller.java | |
| parent | 2b2255d1860a54e62766db78ef8ed07553a1692e (diff) | |
Re-login after a week.
Refactor GoogleAccountLogin to handle the progress dialog. Store the last login
time and login after a week to refresh cookies.
Bug: 3367395
Change-Id: I62a277610af5b642f51cc775f17806c558812d4a
Diffstat (limited to 'src/com/android/browser/Controller.java')
| -rw-r--r-- | src/com/android/browser/Controller.java | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java index 472201b9..a2ddc8c9 100644 --- a/src/com/android/browser/Controller.java +++ b/src/com/android/browser/Controller.java @@ -2093,8 +2093,8 @@ public class Controller // This method does a ton of stuff. It will attempt to create a new tab // if we haven't reached MAX_TABS. Otherwise it uses the current tab. If // url isn't null, it will load the given url. - public Tab openTabAndShow(Tab parent, UrlData urlData, boolean closeOnExit, - String appId) { + public Tab openTabAndShow(Tab parent, final UrlData urlData, + boolean closeOnExit, String appId) { final Tab currentTab = mTabControl.getCurrentTab(); if (mTabControl.canCreateNewTab()) { final Tab tab = mTabControl.createNewTab(closeOnExit, appId, @@ -2105,9 +2105,17 @@ public class Controller // animation behavior. addTab(tab); setActiveTab(tab); - if (!urlData.isEmpty()) { - loadUrlDataIn(tab, urlData); - } + + // Callback to load the url data. + final Runnable load = new Runnable() { + @Override public void run() { + if (!urlData.isEmpty()) { + loadUrlDataIn(tab, urlData); + } + } + }; + + GoogleAccountLogin.startLoginIfNeeded(mActivity, mSettings, load); return tab; } else { // Get rid of the subwindow if it exists |
