Loading res/values/strings.xml +10 −10 Original line number Diff line number Diff line Loading @@ -685,24 +685,24 @@ <!-- Location settings, loading the number of apps which have location permission [CHAR LIMIT=30] --> <string name="location_settings_loading_app_permission_stats">Loading\u2026</string> <!-- Location settings footer warning text when location is on [CHAR LIMIT=NONE] --> <string name="location_settings_footer_location_on"> <br><br>Apps with the Nearby devices permission can determine the <string name="location_settings_footer_general"> Apps with the Nearby devices permission can determine the relative position of connected devices. <br><br><a href="<xliff:g example="http://www.google.com" id="url"> https://support.google.com/android/answer/3467281</xliff:g>">Learn more</a> </string> <!-- Location settings footer warning text when location is off [CHAR LIMIT=NONE] --> <string name="location_settings_footer_location_off"> Location access is off for apps and services. Your device location may still be sent to emergency responders when you call or text an emergency number. <br><br>Apps with the Nearby devices permission can determine the relative position of connected devices. <br><br><a href="<xliff:g example="http://www.google.com" </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> <!-- Location settings footer link content description [CHAR LIMIT=NONE] --> <string name="location_settings_footer_learn_more_content_description"> Learn more about Location Settings. </string> <!-- Main Settings screen setting option title for the item to take you to the accounts screen [CHAR LIMIT=22] --> <string name="account_settings_title">Accounts</string> res/xml/location_settings.xml +2 −1 Original line number Diff line number Diff line Loading @@ -70,8 +70,9 @@ </PreferenceCategory> <com.android.settingslib.widget.FooterPreference android:title="@string/location_settings_footer_location_on" 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> res/xml/location_settings_personal.xml +1 −1 Original line number Diff line number Diff line Loading @@ -54,7 +54,7 @@ settings:controller="com.android.settings.location.LocationServicesPreferenceController"/> <com.android.settingslib.widget.FooterPreference android:title="@string/location_settings_footer_location_on" android:title="@string/location_settings_footer_general" android:key="location_footer" settings:controller="com.android.settings.location.LocationSettingsFooterPreferenceController" android:selectable="false"/> Loading res/xml/location_settings_workprofile.xml +1 −1 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ settings:controller="com.android.settings.location.LocationServicesForWorkPreferenceController"/> <com.android.settingslib.widget.FooterPreference android:title="@string/location_settings_footer_location_on" android:title="@string/location_settings_footer_general" android:key="location_footer" settings:controller="com.android.settings.location.LocationSettingsFooterPreferenceController" android:selectable="false"/> Loading src/com/android/settings/location/LocationSettingsFooterPreferenceController.java +19 −8 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.location.LocationManager; import android.text.Html; import android.text.TextUtils; import android.util.Log; import androidx.preference.Preference; Loading @@ -42,6 +43,7 @@ import java.util.List; */ public class LocationSettingsFooterPreferenceController extends LocationBasePreferenceController { private static final String TAG = "LocationFooter"; private static final String PARAGRAPH_SEPARATOR = "<br><br>"; private static final Intent INJECT_INTENT = new Intent(LocationManager.SETTINGS_FOOTER_DISPLAYED_ACTION); Loading Loading @@ -90,24 +92,33 @@ public class LocationSettingsFooterPreferenceController extends LocationBasePref } private void updateFooterPreference() { String footerString = mContext.getString( mLocationEnabled ? R.string.location_settings_footer_location_on : R.string.location_settings_footer_location_off); String footerString = mContext.getString(R.string.location_settings_footer_general); if (mLocationEnabled) { footerString = mInjectedFooterString + footerString; if (!TextUtils.isEmpty(mInjectedFooterString)) { footerString = Html.escapeHtml(mInjectedFooterString) + PARAGRAPH_SEPARATOR + footerString; } } else { footerString = mContext.getString(R.string.location_settings_footer_location_off) + PARAGRAPH_SEPARATOR + footerString; } if (mFooterPreference != null) { mFooterPreference.setTitle(Html.fromHtml(footerString)); 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))); } } /** * Location footer preference group should be displayed if there is at least one footer to * inject. * Location footer preference group should always be displayed. */ @Override public int getAvailabilityStatus() { return !getFooterData().isEmpty() ? AVAILABLE : UNSUPPORTED_ON_DEVICE; return AVAILABLE; } /** Loading Loading
res/values/strings.xml +10 −10 Original line number Diff line number Diff line Loading @@ -685,24 +685,24 @@ <!-- Location settings, loading the number of apps which have location permission [CHAR LIMIT=30] --> <string name="location_settings_loading_app_permission_stats">Loading\u2026</string> <!-- Location settings footer warning text when location is on [CHAR LIMIT=NONE] --> <string name="location_settings_footer_location_on"> <br><br>Apps with the Nearby devices permission can determine the <string name="location_settings_footer_general"> Apps with the Nearby devices permission can determine the relative position of connected devices. <br><br><a href="<xliff:g example="http://www.google.com" id="url"> https://support.google.com/android/answer/3467281</xliff:g>">Learn more</a> </string> <!-- Location settings footer warning text when location is off [CHAR LIMIT=NONE] --> <string name="location_settings_footer_location_off"> Location access is off for apps and services. Your device location may still be sent to emergency responders when you call or text an emergency number. <br><br>Apps with the Nearby devices permission can determine the relative position of connected devices. <br><br><a href="<xliff:g example="http://www.google.com" </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> <!-- Location settings footer link content description [CHAR LIMIT=NONE] --> <string name="location_settings_footer_learn_more_content_description"> Learn more about Location Settings. </string> <!-- Main Settings screen setting option title for the item to take you to the accounts screen [CHAR LIMIT=22] --> <string name="account_settings_title">Accounts</string>
res/xml/location_settings.xml +2 −1 Original line number Diff line number Diff line Loading @@ -70,8 +70,9 @@ </PreferenceCategory> <com.android.settingslib.widget.FooterPreference android:title="@string/location_settings_footer_location_on" 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>
res/xml/location_settings_personal.xml +1 −1 Original line number Diff line number Diff line Loading @@ -54,7 +54,7 @@ settings:controller="com.android.settings.location.LocationServicesPreferenceController"/> <com.android.settingslib.widget.FooterPreference android:title="@string/location_settings_footer_location_on" android:title="@string/location_settings_footer_general" android:key="location_footer" settings:controller="com.android.settings.location.LocationSettingsFooterPreferenceController" android:selectable="false"/> Loading
res/xml/location_settings_workprofile.xml +1 −1 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ settings:controller="com.android.settings.location.LocationServicesForWorkPreferenceController"/> <com.android.settingslib.widget.FooterPreference android:title="@string/location_settings_footer_location_on" android:title="@string/location_settings_footer_general" android:key="location_footer" settings:controller="com.android.settings.location.LocationSettingsFooterPreferenceController" android:selectable="false"/> Loading
src/com/android/settings/location/LocationSettingsFooterPreferenceController.java +19 −8 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.location.LocationManager; import android.text.Html; import android.text.TextUtils; import android.util.Log; import androidx.preference.Preference; Loading @@ -42,6 +43,7 @@ import java.util.List; */ public class LocationSettingsFooterPreferenceController extends LocationBasePreferenceController { private static final String TAG = "LocationFooter"; private static final String PARAGRAPH_SEPARATOR = "<br><br>"; private static final Intent INJECT_INTENT = new Intent(LocationManager.SETTINGS_FOOTER_DISPLAYED_ACTION); Loading Loading @@ -90,24 +92,33 @@ public class LocationSettingsFooterPreferenceController extends LocationBasePref } private void updateFooterPreference() { String footerString = mContext.getString( mLocationEnabled ? R.string.location_settings_footer_location_on : R.string.location_settings_footer_location_off); String footerString = mContext.getString(R.string.location_settings_footer_general); if (mLocationEnabled) { footerString = mInjectedFooterString + footerString; if (!TextUtils.isEmpty(mInjectedFooterString)) { footerString = Html.escapeHtml(mInjectedFooterString) + PARAGRAPH_SEPARATOR + footerString; } } else { footerString = mContext.getString(R.string.location_settings_footer_location_off) + PARAGRAPH_SEPARATOR + footerString; } if (mFooterPreference != null) { mFooterPreference.setTitle(Html.fromHtml(footerString)); 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))); } } /** * Location footer preference group should be displayed if there is at least one footer to * inject. * Location footer preference group should always be displayed. */ @Override public int getAvailabilityStatus() { return !getFooterData().isEmpty() ? AVAILABLE : UNSUPPORTED_ON_DEVICE; return AVAILABLE; } /** Loading