Bug 1235902 - (Part 2) Update feedback settings item to read URL from gecko prefs. r=mfinkle

--HG--
extra : commitid : 8dFWLd8fUy2
extra : rebase_source : 5d65f779fc7ebe3127a92d9c1d68fdb4c8525f63
This commit is contained in:
Margaret Leibovic 2015-12-31 16:20:27 -05:00
Родитель 79e8fc7fb7
Коммит 323fde5fac
2 изменённых файлов: 14 добавлений и 6 удалений

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

@ -133,18 +133,15 @@ OnSharedPreferenceChangeListener
private static final String PREFS_TRACKING_PROTECTION_PB = "privacy.trackingprotection.pbmode.enabled";
public static final String PREFS_VOICE_INPUT_ENABLED = NON_PREF_PREFIX + "voice_input_enabled";
public static final String PREFS_QRCODE_ENABLED = NON_PREF_PREFIX + "qrcode_enabled";
private static final String PREFS_ADVANCED = NON_PREF_PREFIX + "advanced.enabled";
private static final String PREFS_ACCESSIBILITY = NON_PREF_PREFIX + "accessibility.enabled";
private static final String PREFS_CUSTOMIZE_HOME = NON_PREF_PREFIX + "customize_home";
private static final String PREFS_TRACKING_PROTECTION_PRIVATE_BROWSING = "privacy.trackingprotection.pbmode.enabled";
private static final String PREFS_TRACKING_PROTECTION_LEARN_MORE = NON_PREF_PREFIX + "trackingprotection.learn_more";
private static final String PREFS_CLEAR_PRIVATE_DATA = NON_PREF_PREFIX + "privacy.clear";
private static final String PREFS_CLEAR_PRIVATE_DATA_EXIT = NON_PREF_PREFIX + "history.clear_on_exit";
private static final String PREFS_SCREEN_ADVANCED = NON_PREF_PREFIX + "advanced_screen";
private static final String PREFS_CATEGORY_HOMEPAGE = NON_PREF_PREFIX + "category_homepage";
public static final String PREFS_HOMEPAGE = NON_PREF_PREFIX + "homepage";
public static final String PREFS_HISTORY_SAVED_SEARCH = NON_PREF_PREFIX + "search.search_history.enabled";
private static final String PREFS_FAQ_LINK = NON_PREF_PREFIX + "faq.link";
private static final String PREFS_FEEDBACK_LINK = NON_PREF_PREFIX + "feedback.link";
private static final String ACTION_STUMBLER_UPLOAD_PREF = AppConstants.ANDROID_PACKAGE_NAME + ".STUMBLER_PREF";
@ -852,6 +849,18 @@ OnSharedPreferenceChangeListener
final String url = getResources().getString(R.string.faq_link, VERSION, OS, LOCALE);
((LinkPreference) pref).setUrl(url);
} else if (PREFS_FEEDBACK_LINK.equals(key)) {
PrefsHelper.getPref("app.feedbackURL", new PrefsHelper.PrefHandlerBase() {
@Override
public void prefValue(String prefName, final String value) {
ThreadUtils.postToUiThread(new Runnable() {
@Override
public void run() {
((LinkPreference) pref).setUrl(value);
}
});
}
});
}
// Some Preference UI elements are not actually preferences,

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

@ -19,7 +19,6 @@
<org.mozilla.gecko.preferences.LinkPreference android:key="android.not_a_preference.feedback.link"
android:title="@string/pref_vendor_feedback"
android:persistent="false"
url="about:feedback" />
android:persistent="false"/>
</PreferenceScreen>