From 4a7c49c81f021ebb01c1ac06737b4e705f212783 Mon Sep 17 00:00:00 2001 From: Tom O'Neill Date: Mon, 26 Aug 2013 10:08:12 -0700 Subject: Address API Review for SettingInjectorService - Escape < and > in javadoc - Constructor does not take log tag - Start intent rename - Comments for Status.summary and enabled - Bonus fixes: - Start renaming STATUS_KEY to SUMMARY_KEY - Send message back even if getting the status fails so we don't have to wait for the fetch to time out - Add comment about setting activity being invoked when disabled - Partial fix for b/10461474 Change-Id: I025e7e0782c2873a4eda20ab4793bc6145daf8db --- .../android/location/SettingInjectorService.java | 94 +++++++++++++++------- 1 file changed, 66 insertions(+), 28 deletions(-) (limited to 'location/java/android') diff --git a/location/java/android/location/SettingInjectorService.java b/location/java/android/location/SettingInjectorService.java index dbc3f276fb2f..7e8137c84bc3 100644 --- a/location/java/android/location/SettingInjectorService.java +++ b/location/java/android/location/SettingInjectorService.java @@ -27,7 +27,7 @@ import android.util.Log; /** * Dynamically specifies the summary (subtile) and enabled status of a preference injected into - * the "Settings > Location > Location services" list. + * the "Settings > Location > Location services" list. * * The location services list is intended for use only by preferences that affect multiple apps from * the same developer. Location settings that apply only to one app should be shown within that app, @@ -35,24 +35,25 @@ import android.util.Log; * * To add a preference to the list, a subclass of {@link SettingInjectorService} must be declared in * the manifest as so: + * *
- *     
- *         
- *             
- *         
+ *     <service android:name="com.example.android.injector.MyInjectorService" >
+ *         <intent-filter>
+ *             <action android:name="com.android.settings.InjectedLocationSetting" />
+ *         </intent-filter>
  *
- *         
- *     
+ *             android:resource="@xml/my_injected_location_setting" />
+ *     </service>
  * 
* The resource file specifies the static data for the setting: *
- *     
+ *     />
  * 
* Here: *