Merge "Fix voice access problem on location page." into sc-dev

This commit is contained in:
TreeHugger Robot
2021-06-02 08:59:42 +00:00
committed by Android (Google) Code Review
3 changed files with 16 additions and 10 deletions

View File

@@ -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.
*/