Loading res/values/strings.xml +2 −3 Original line number Diff line number Diff line Loading @@ -695,9 +695,8 @@ emergency responders when you call or text an emergency number. </string> <!-- Location settings footer link to support page [CHAR LIMIT=NONE] --> <string name="location_settings_footer_learn_more"> <a href="<xliff:g example="http://www.google.com" id="url"> https://support.google.com/android/answer/3467281</xliff:g>">Learn more</a> <string name="location_settings_footer_learn_more_link" translatable="false"> https://support.google.com/android/answer/3467281 </string> <!-- Location settings footer link content description [CHAR LIMIT=NONE] --> <string name="location_settings_footer_learn_more_content_description"> res/xml/location_settings.xml +0 −1 Original line number Diff line number Diff line Loading @@ -71,7 +71,6 @@ <com.android.settingslib.widget.FooterPreference android:title="@string/location_settings_footer_general" android:key="location_footer" android:selectable="false" settings:searchable="false" settings:controller="com.android.settings.location.LocationSettingsFooterPreferenceController"/> </PreferenceScreen> src/com/android/settings/location/LocationSettingsFooterPreferenceController.java +14 −6 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -104,13 +105,20 @@ 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); } /** Loading Loading
res/values/strings.xml +2 −3 Original line number Diff line number Diff line Loading @@ -695,9 +695,8 @@ emergency responders when you call or text an emergency number. </string> <!-- Location settings footer link to support page [CHAR LIMIT=NONE] --> <string name="location_settings_footer_learn_more"> <a href="<xliff:g example="http://www.google.com" id="url"> https://support.google.com/android/answer/3467281</xliff:g>">Learn more</a> <string name="location_settings_footer_learn_more_link" translatable="false"> https://support.google.com/android/answer/3467281 </string> <!-- Location settings footer link content description [CHAR LIMIT=NONE] --> <string name="location_settings_footer_learn_more_content_description">
res/xml/location_settings.xml +0 −1 Original line number Diff line number Diff line Loading @@ -71,7 +71,6 @@ <com.android.settingslib.widget.FooterPreference android:title="@string/location_settings_footer_general" android:key="location_footer" android:selectable="false" settings:searchable="false" settings:controller="com.android.settings.location.LocationSettingsFooterPreferenceController"/> </PreferenceScreen>
src/com/android/settings/location/LocationSettingsFooterPreferenceController.java +14 −6 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -104,13 +105,20 @@ 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); } /** Loading