diff --git a/res/values/strings.xml b/res/values/strings.xml index 54b4e17e749..a02ac79675c 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -695,9 +695,8 @@ emergency responders when you call or text an emergency number. - - <a href=" https://support.google.com/android/answer/3467281">Learn more</a> + + https://support.google.com/android/answer/3467281 diff --git a/res/xml/location_settings.xml b/res/xml/location_settings.xml index cffab3ee06b..fe87efd73d7 100644 --- a/res/xml/location_settings.xml +++ b/res/xml/location_settings.xml @@ -71,7 +71,6 @@ diff --git a/src/com/android/settings/location/LocationSettingsFooterPreferenceController.java b/src/com/android/settings/location/LocationSettingsFooterPreferenceController.java index 281cc5abf9d..a3b68be7da2 100644 --- a/src/com/android/settings/location/LocationSettingsFooterPreferenceController.java +++ b/src/com/android/settings/location/LocationSettingsFooterPreferenceController.java @@ -31,6 +31,7 @@ import androidx.preference.Preference; import androidx.preference.PreferenceScreen; import com.android.settings.R; +import com.android.settingslib.HelpUtils; import com.android.settingslib.widget.FooterPreference; import java.util.ArrayList; @@ -104,15 +105,22 @@ public class LocationSettingsFooterPreferenceController extends LocationBasePref + footerString; } if (mFooterPreference != null) { - mFooterPreference.setTitle(Html.fromHtml(footerString - + PARAGRAPH_SEPARATOR - + mContext.getString( - R.string.location_settings_footer_learn_more))); - mFooterPreference.setContentDescription(Html.fromHtml(footerString + mContext.getString( - R.string.location_settings_footer_learn_more_content_description))); + mFooterPreference.setTitle(Html.fromHtml(footerString)); + mFooterPreference.setLearnMoreAction(v -> openLocationLearnMoreLink()); + mFooterPreference.setLearnMoreContentDescription(mContext.getString( + R.string.location_settings_footer_learn_more_content_description)); } } + private void openLocationLearnMoreLink() { + mFragment.startActivityForResult( + HelpUtils.getHelpIntent( + mContext, + mContext.getString(R.string.location_settings_footer_learn_more_link), + /*backupContext=*/""), + /*requestCode=*/ 0); + } + /** * Location footer preference group should always be displayed. */