Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0f69b150 authored by Lifu Tang's avatar Lifu Tang
Browse files

Address API review comments

- Add comment to clarify that onGetSummary() is only called on K and Q
- Annotate context parameter as @NonNull

Bug: 123222995
Test: Build and flash
Change-Id: I18ea3c80031a344be03307ca7fc26beb76288698
parent 8a46b8c7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -23001,7 +23001,7 @@ package android.location {
    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";
+13 −10
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package android.location;

import android.annotation.NonNull;
import android.app.Service;
import android.content.Context;
import android.content.Intent;
@@ -206,6 +207,8 @@ public abstract class SettingInjectorService extends Service {
     * 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 @@ public abstract class SettingInjectorService extends Service {
    /**
     * 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);
    }