diff options
author | Yu-Han Yang <yuhany@google.com> | 2021-05-05 20:34:36 +0000 |
---|---|---|
committer | Yu-Han Yang <yuhany@google.com> | 2021-05-08 15:57:26 +0000 |
commit | 7b1f58ce2da1048b6dd10247c4f344fa95dad101 (patch) | |
tree | 4b9bb3f72ba814215c94522ee315c05bf07ba9ab | |
parent | a157bb33997ab36a2921bfc5c0d4106fa0df693e (diff) |
Revert "Remove dynamic location settings footer"
Revert "Remove dynamic location settings footer"
Revert submission 13809184-location_footer
Reason for revert: b/187211885
Reverted Changes:
Iaf14044e0:Remove dynamic location settings footer
Ifa6468b11:Remove dynamic location settings footer
If3ab49241:Remove dynamic location settings footer
Bug: 187211885
Change-Id: Ib53c42b3583fd93c87d21feb9882f3431b133d40
-rw-r--r-- | location/java/android/location/LocationManager.java | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/location/java/android/location/LocationManager.java b/location/java/android/location/LocationManager.java index f1879fc4c5d8..e73e915bf88b 100644 --- a/location/java/android/location/LocationManager.java +++ b/location/java/android/location/LocationManager.java @@ -346,6 +346,43 @@ public class LocationManager { */ public static final String EXTRA_GNSS_CAPABILITIES = "android.location.extra.GNSS_CAPABILITIES"; + /** + * Broadcast intent action for Settings app to inject a footer at the bottom of location + * settings. This is for use only by apps that are included in the system image. + * + * <p>To inject a footer to location settings, you must declare a broadcast receiver for + * this action in the manifest: + * <pre> + * <receiver android:name="com.example.android.footer.MyFooterInjector"> + * <intent-filter> + * <action android:name="com.android.settings.location.INJECT_FOOTER" /> + * </intent-filter> + * <meta-data + * android:name="com.android.settings.location.FOOTER_STRING" + * android:resource="@string/my_injected_footer_string" /> + * </receiver> + * </pre> + * + * <p>This broadcast receiver will never actually be invoked. See also + * {#METADATA_SETTINGS_FOOTER_STRING}. + * + * @hide + */ + public static final String SETTINGS_FOOTER_DISPLAYED_ACTION = + "com.android.settings.location.DISPLAYED_FOOTER"; + + /** + * Metadata name for {@link LocationManager#SETTINGS_FOOTER_DISPLAYED_ACTION} broadcast + * receivers to specify a string resource id as location settings footer text. This is for use + * only by apps that are included in the system image. + * + * <p>See {@link #SETTINGS_FOOTER_DISPLAYED_ACTION} for more detail on how to use. + * + * @hide + */ + public static final String METADATA_SETTINGS_FOOTER_STRING = + "com.android.settings.location.FOOTER_STRING"; + private static final long MAX_SINGLE_LOCATION_TIMEOUT_MS = 30 * 1000; private static final String CACHE_KEY_LOCATION_ENABLED_PROPERTY = |