diff options
author | Elliott Slaughter <eds@google.com> | 2010-08-20 15:44:08 -0700 |
---|---|---|
committer | Elliott Slaughter <eds@google.com> | 2010-08-23 09:33:29 -0700 |
commit | 8389e996e600cf51d85fa29b4de12f69e34ccd2d (patch) | |
tree | 4ab923e94b50552a329eaa086eabcd9eed26ea7d /src | |
parent | 3f65c3831ff82a20f6f0edb08df2d7edae540044 (diff) | |
download | packages_apps_browser-8389e996e600cf51d85fa29b4de12f69e34ccd2d.zip packages_apps_browser-8389e996e600cf51d85fa29b4de12f69e34ccd2d.tar.gz packages_apps_browser-8389e996e600cf51d85fa29b4de12f69e34ccd2d.tar.bz2 |
Fix Browser incognito history for intents initiated in the same tab.
Change-Id: Ic3e8168ded978226eeace1fb86960082e8b9ebfd
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/browser/BrowserActivity.java | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java index e144f99..f380711 100644 --- a/src/com/android/browser/BrowserActivity.java +++ b/src/com/android/browser/BrowserActivity.java @@ -706,13 +706,17 @@ public class BrowserActivity extends Activity url = smartUrlFilter(url); final ContentResolver cr = mResolver; final String newUrl = url; - new AsyncTask<Void, Void, Void>() { - @Override - protected Void doInBackground(Void... unused) { - Browser.updateVisitedHistory(cr, newUrl, false); - return null; - } - }.execute(); + if (mTabControl == null + || mTabControl.getCurrentWebView() == null + || !mTabControl.getCurrentWebView().isPrivateBrowsingEnabled()) { + new AsyncTask<Void, Void, Void>() { + @Override + protected Void doInBackground(Void... unused) { + Browser.updateVisitedHistory(cr, newUrl, false); + return null; + } + }.execute(); + } String searchSource = "&source=android-" + GOOGLE_SEARCH_SOURCE_SUGGEST + "&"; if (url.contains(searchSource)) { String source = null; |