Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 89fbeb64 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

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

parents 2702e5ce 47bd62bd
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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">
        &lt;a href="<xliff:g example="http://www.google.com"
        id="url"> https://support.google.com/android/answer/3467281</xliff:g>">Learn more&lt;/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">
+0 −1
Original line number Diff line number Diff line
@@ -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>
+14 −6
Original line number Diff line number Diff line
@@ -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,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);
    }

    /**