diff options
author | Michael Kolb <kolby@google.com> | 2012-05-16 13:17:34 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-05-16 13:17:34 -0700 |
commit | 9737677e3b8b44f548f2026eb1edc9ffcf8579d1 (patch) | |
tree | 8ef08f4d4afdac49424535f62a9192629d41e4e2 /src/com | |
parent | 4a6d851f150a5a5c30fce63985333182138e5f02 (diff) | |
parent | b9b293119d3a4a94b5d05d8e555070738ca3c36f (diff) | |
download | packages_apps_browser-9737677e3b8b44f548f2026eb1edc9ffcf8579d1.zip packages_apps_browser-9737677e3b8b44f548f2026eb1edc9ffcf8579d1.tar.gz packages_apps_browser-9737677e3b8b44f548f2026eb1edc9ffcf8579d1.tar.bz2 |
am b9b29311: Merge "Add setting to control tabs per app behavior" into jb-dev
* commit 'b9b293119d3a4a94b5d05d8e555070738ca3c36f':
Add setting to control tabs per app behavior
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/browser/BrowserSettings.java | 4 | ||||
-rw-r--r-- | src/com/android/browser/IntentHandler.java | 3 | ||||
-rw-r--r-- | src/com/android/browser/PreferenceKeys.java | 1 |
3 files changed, 7 insertions, 1 deletions
diff --git a/src/com/android/browser/BrowserSettings.java b/src/com/android/browser/BrowserSettings.java index 0b7e87a..8dfd4d7 100644 --- a/src/com/android/browser/BrowserSettings.java +++ b/src/com/android/browser/BrowserSettings.java @@ -652,6 +652,10 @@ public class BrowserSettings implements OnSharedPreferenceChangeListener, return mPrefs.getString(PREF_SEARCH_ENGINE, SearchEngine.GOOGLE); } + public boolean allowAppTabs() { + return mPrefs.getBoolean(PREF_ALLOW_APP_TABS, false); + } + public boolean openInBackground() { return mPrefs.getBoolean(PREF_OPEN_IN_BACKGROUND, false); } diff --git a/src/com/android/browser/IntentHandler.java b/src/com/android/browser/IntentHandler.java index 47cab70..e22c5dc 100644 --- a/src/com/android/browser/IntentHandler.java +++ b/src/com/android/browser/IntentHandler.java @@ -139,7 +139,8 @@ public class IntentHandler { } if (Intent.ACTION_VIEW.equals(action) && !mActivity.getPackageName().equals(appId)) { - if (!BrowserActivity.isTablet(mActivity)) { + if (!BrowserActivity.isTablet(mActivity) + && !mSettings.allowAppTabs()) { Tab appTab = mTabControl.getTabFromAppId(appId); if (appTab != null) { mController.reuseTab(appTab, urlData); diff --git a/src/com/android/browser/PreferenceKeys.java b/src/com/android/browser/PreferenceKeys.java index ff42aaf..1828032 100644 --- a/src/com/android/browser/PreferenceKeys.java +++ b/src/com/android/browser/PreferenceKeys.java @@ -46,6 +46,7 @@ public interface PreferenceKeys { static final String PREF_RESET_DEFAULT_PREFERENCES = "reset_default_preferences"; static final String PREF_SEARCH_ENGINE = "search_engine"; static final String PREF_WEBSITE_SETTINGS = "website_settings"; + static final String PREF_ALLOW_APP_TABS = "allow_apptabs"; // ---------------------- // Keys for debug_preferences.xml |