diff --git a/res/values/strings.xml b/res/values/strings.xml
index 34b8c2258b3..bea0bcc26e4 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -685,24 +685,24 @@
Loading\u2026
-
- <br><br>Apps with the Nearby devices permission can determine the
+
+ Apps with the Nearby devices permission can determine the
relative position of connected devices.
-
- <br><br><a href="
- https://support.google.com/android/answer/3467281">Learn more</a>
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="
+
+
+ <a href=" https://support.google.com/android/answer/3467281">Learn more</a>
+
+
+ Learn more about Location Settings.
+
Accounts
diff --git a/res/xml/location_settings.xml b/res/xml/location_settings.xml
index 857885dee39..880a326a221 100644
--- a/res/xml/location_settings.xml
+++ b/res/xml/location_settings.xml
@@ -70,8 +70,9 @@
diff --git a/res/xml/location_settings_personal.xml b/res/xml/location_settings_personal.xml
index 726a96c302a..bae1ac16db3 100644
--- a/res/xml/location_settings_personal.xml
+++ b/res/xml/location_settings_personal.xml
@@ -54,7 +54,7 @@
settings:controller="com.android.settings.location.LocationServicesPreferenceController"/>
diff --git a/res/xml/location_settings_workprofile.xml b/res/xml/location_settings_workprofile.xml
index 99ccf14bc70..51d8761bc4b 100644
--- a/res/xml/location_settings_workprofile.xml
+++ b/res/xml/location_settings_workprofile.xml
@@ -62,7 +62,7 @@
settings:controller="com.android.settings.location.LocationServicesForWorkPreferenceController"/>
diff --git a/src/com/android/settings/location/LocationSettingsFooterPreferenceController.java b/src/com/android/settings/location/LocationSettingsFooterPreferenceController.java
index d2d5c1ffa5b..281cc5abf9d 100644
--- a/src/com/android/settings/location/LocationSettingsFooterPreferenceController.java
+++ b/src/com/android/settings/location/LocationSettingsFooterPreferenceController.java
@@ -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;
@@ -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 = "
";
private static final Intent INJECT_INTENT =
new Intent(LocationManager.SETTINGS_FOOTER_DISPLAYED_ACTION);
@@ -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;
}
/**