зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1209352 - Update FAQ page URL. r=liuche
--HG-- extra : commitid : ZSIh9D7uhB extra : rebase_source : 330c77cd7f306ebd33111eaf9d1350cb83276441
This commit is contained in:
Родитель
0b49f3d776
Коммит
e76ac1bda3
|
@ -469,11 +469,8 @@ pref("app.releaseNotesURL", "http://www.mozilla.com/%LOCALE%/mobile/%VERSION%bet
|
|||
#else
|
||||
pref("app.releaseNotesURL", "http://www.mozilla.com/%LOCALE%/mobile/%VERSION%/releasenotes/");
|
||||
#endif
|
||||
#if MOZ_UPDATE_CHANNEL == beta
|
||||
pref("app.faqURL", "http://www.mozilla.com/%LOCALE%/mobile/beta/faq/");
|
||||
#else
|
||||
pref("app.faqURL", "http://www.mozilla.com/%LOCALE%/mobile/faq/");
|
||||
#endif
|
||||
|
||||
pref("app.faqURL", "https://support.mozilla.org/1/mobile/%VERSION%/%OS%/%LOCALE%/faq");
|
||||
|
||||
// Name of alternate about: page for certificate errors (when undefined, defaults to about:neterror)
|
||||
pref("security.alternate_certificate_error_page", "certerror");
|
||||
|
|
|
@ -143,6 +143,7 @@ OnSharedPreferenceChangeListener
|
|||
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 ACTION_STUMBLER_UPLOAD_PREF = AppConstants.ANDROID_PACKAGE_NAME + ".STUMBLER_PREF";
|
||||
|
||||
|
@ -921,6 +922,14 @@ OnSharedPreferenceChangeListener
|
|||
return true;
|
||||
}
|
||||
});
|
||||
} else if (PREFS_FAQ_LINK.equals(key)) {
|
||||
// Format the FAQ link
|
||||
final String VERSION = AppConstants.MOZ_APP_VERSION;
|
||||
final String OS = AppConstants.OS_TARGET;
|
||||
final String LOCALE = Locales.getLanguageTag(Locale.getDefault());
|
||||
|
||||
final String url = getResources().getString(R.string.faq_link, VERSION, OS, LOCALE);
|
||||
((LinkPreference) pref).setUrl(url);
|
||||
}
|
||||
|
||||
// Some Preference UI elements are not actually preferences,
|
||||
|
|
|
@ -12,7 +12,7 @@ import android.preference.Preference;
|
|||
import android.util.AttributeSet;
|
||||
|
||||
class LinkPreference extends Preference {
|
||||
private final String mUrl;
|
||||
private String mUrl;
|
||||
|
||||
public LinkPreference(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
|
@ -23,6 +23,10 @@ class LinkPreference extends Preference {
|
|||
mUrl = attrs.getAttributeValue(null, "url");
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
mUrl = url;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onClick() {
|
||||
Tabs.getInstance().loadUrlInTab(mUrl);
|
||||
|
|
|
@ -15,8 +15,7 @@
|
|||
|
||||
<org.mozilla.gecko.preferences.LinkPreference android:key="android.not_a_preference.faq.link"
|
||||
android:title="@string/pref_vendor_faqs"
|
||||
android:persistent="false"
|
||||
url="https://support.mozilla.org/kb/firefox-android-faq"/>
|
||||
android:persistent="false"/>
|
||||
|
||||
<org.mozilla.gecko.preferences.LinkPreference android:key="android.not_a_preference.feedback.link"
|
||||
android:title="@string/pref_vendor_feedback"
|
||||
|
|
|
@ -83,6 +83,9 @@
|
|||
|
||||
<string name="url_bar_default_text">&url_bar_default_text2;</string>
|
||||
|
||||
<!-- https://support.mozilla.org/1/mobile/%VERSION%/%OS%/%LOCALE%/faq -->
|
||||
<string name="faq_link">https://support.mozilla.org/1/mobile/&formatS1;/&formatS2;/&formatS3;/faq</string>
|
||||
|
||||
<!-- https://support.mozilla.org/1/mobile/%VERSION%/%OS%/%LOCALE%/ -->
|
||||
<string name="help_link">https://support.mozilla.org/1/mobile/&formatS1;/&formatS2;/&formatS3;/</string>
|
||||
<string name="help_menu">&help_menu;</string>
|
||||
|
|
Загрузка…
Ссылка в новой задаче