Bug 1342329 - Only link the "default browser" setting to the default apps screen. r=ahunt

MozReview-Commit-ID: I7mrsbXGng1

--HG--
extra : rebase_source : eae4762aabd973b56dba7e2be584e9638fd5bc3a
This commit is contained in:
Sebastian Kaspari 2017-03-03 11:12:48 +01:00
Родитель 88b23dd9a5
Коммит 3824713252
2 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -173,6 +173,7 @@ public class GeckoPreferences
public static final String PREFS_COMPACT_TABS = NON_PREF_PREFIX + "compact_tabs";
public static final String PREFS_SHOW_QUIT_MENU = NON_PREF_PREFIX + "distribution.show_quit_menu";
public static final String PREFS_SEARCH_SUGGESTIONS_ENABLED = "browser.search.suggest.enabled";
public static final String PREFS_DEFAULT_BROWSER = NON_PREF_PREFIX + "default_browser.link";
private static final String ACTION_STUMBLER_UPLOAD_PREF = "STUMBLER_PREF";

Просмотреть файл

@ -34,7 +34,10 @@ class LinkPreference extends Preference {
*/
@Override
protected void onClick() {
if (AppConstants.Versions.feature24Plus) {
if (GeckoPreferences.PREFS_DEFAULT_BROWSER.equals(getKey()) && AppConstants.Versions.feature24Plus) {
// We are special casing the link to set the default browser here: On old Android versions we
// link to a SUMO page but on new Android versions we can link to the default app settings where
// the user can actually set a default browser (Bug 1312686).
Intent changeDefaultApps = new Intent("android.settings.MANAGE_DEFAULT_APPS_SETTINGS");
getContext().startActivity(changeDefaultApps);
} else {