Merge "Address API review comments"
diff --git a/api/current.txt b/api/current.txt
index 30218ae..d1b77f2 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -23005,7 +23005,7 @@
method protected abstract String onGetSummary();
method public final void onStart(android.content.Intent, int);
method public final int onStartCommand(android.content.Intent, int, int);
- method public static final void refreshSettings(android.content.Context);
+ method public static final void refreshSettings(@NonNull android.content.Context);
field public static final String ACTION_INJECTED_SETTING_CHANGED = "android.location.InjectedSettingChanged";
field public static final String ACTION_SERVICE_INTENT = "android.location.SettingInjectorService";
field public static final String ATTRIBUTES_NAME = "injected-location-setting";
diff --git a/location/java/android/location/SettingInjectorService.java b/location/java/android/location/SettingInjectorService.java
index c201770..d6f8a7c 100644
--- a/location/java/android/location/SettingInjectorService.java
+++ b/location/java/android/location/SettingInjectorService.java
@@ -16,6 +16,7 @@
package android.location;
+import android.annotation.NonNull;
import android.app.Service;
import android.content.Context;
import android.content.Intent;
@@ -58,17 +59,17 @@
* </pre>
* Here:
* <ul>
- * <li>title: The {@link android.preference.Preference#getTitle()} value. The title should make
- * it clear which apps are affected by the setting, typically by including the name of the
- * developer. For example, "Acme Corp. ads preferences." </li>
+ * <li>title: The {@link android.preference.Preference#getTitle()} value. The title should make
+ * it clear which apps are affected by the setting, typically by including the name of the
+ * developer. For example, "Acme Corp. ads preferences." </li>
*
- * <li>icon: The {@link android.preference.Preference#getIcon()} value. Typically this will be a
- * generic icon for the developer rather than the icon for an individual app.</li>
+ * <li>icon: The {@link android.preference.Preference#getIcon()} value. Typically this will be a
+ * generic icon for the developer rather than the icon for an individual app.</li>
*
- * <li>settingsActivity: the activity which is launched to allow the user to modify the setting
- * value. The activity must be in the same package as the subclass of
- * {@link SettingInjectorService}. The activity should use your own branding to help emphasize
- * to the user that it is not part of the system settings.</li>
+ * <li>settingsActivity: the activity which is launched to allow the user to modify the setting
+ * value. The activity must be in the same package as the subclass of
+ * {@link SettingInjectorService}. The activity should use your own branding to help emphasize
+ * to the user that it is not part of the system settings.</li>
* </ul>
*
* To ensure a good user experience, your {@link android.app.Application#onCreate()},
@@ -206,6 +207,8 @@
* Returns the {@link android.preference.Preference#getSummary()} value (allowed to be null or
* empty). Should not perform unpredictably-long operations such as network access--see the
* running-time comments in the class-level javadoc.
+ * <p/>
+ * This method is called on KitKat, and Q+ devices.
*
* @return the {@link android.preference.Preference#getSummary()} value
*/
@@ -234,7 +237,7 @@
/**
* Sends a broadcast to refresh the injected settings on location settings page.
*/
- public static final void refreshSettings(Context context) {
+ public static final void refreshSettings(@NonNull Context context) {
Intent intent = new Intent(ACTION_INJECTED_SETTING_CHANGED);
context.sendBroadcast(intent);
}