| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b6e8943 commit 184e751
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -11813,6 +11813,7 @@ package android.location { | |||
| 11813 | 11813 | ctor public SettingInjectorService(java.lang.String); | |
| 11814 | 11814 | method protected abstract android.location.SettingInjectorService.Status getStatus(); | |
| 11815 | 11815 | method protected final void onHandleIntent(android.content.Intent); | |
| 11816 | + field public static final java.lang.String UPDATE_INTENT = "com.android.location.InjectedSettingChanged"; | ||
| 11816 | 11817 | } | |
| 11817 | 11818 | ||
| 11818 | 11819 | public static final class SettingInjectorService.Status { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -69,6 +69,11 @@ | |||
| 69 | 69 | * to the user that it is not part of the system settings.</li> | |
| 70 | 70 | * </ul> | |
| 71 | 71 | * | |
| 72 | + * To ensure a good user experience, your {@link #onHandleIntent(Intent)} must complete within | ||
| 73 | + * 200 msec even if your app is not already running. This means that both | ||
| 74 | + * {@link android.app.Application#onCreate()} and {@link #getStatus()} must be fast. If you exceed | ||
| 75 | + * this time, then this can delay the retrieval of settings status for other apps as well. | ||
| 76 | + * | ||
| 72 | 77 | * For consistency, the label and {@link #getStatus()} values should be provided in all of the | |
| 73 | 78 | * locales supported by the system settings app. The text should not contain offensive language. | |
| 74 | 79 | * | |
@@ -82,6 +87,7 @@ | |||
| 82 | 87 | */ | |
| 83 | 88 | // TODO: is there a public list of supported locales? | |
| 84 | 89 | // TODO: is there a public list of guidelines for settings text? | |
| 90 | + // TODO: would a bound service be better? E.g., we could just disconnect if a service took too long | ||
| 85 | 91 | public abstract class SettingInjectorService extends IntentService { | |
| 86 | 92 | ||
| 87 | 93 | /** | |
@@ -106,6 +112,12 @@ public abstract class SettingInjectorService extends IntentService { | |||
| 106 | 112 | */ | |
| 107 | 113 | public static final String MESSENGER_KEY = "messenger"; | |
| 108 | 114 | ||
| 115 | + /** | ||
| 116 | + * Intent action a client should broadcast when the value of one of its injected settings has | ||
| 117 | + * changed, so that the setting can be updated in the UI. | ||
| 118 | + */ | ||
| 119 | + public static final String UPDATE_INTENT = "com.android.location.InjectedSettingChanged"; | ||
| 120 | + | ||
| 109 | 121 | private final String mLogTag; | |
| 110 | 122 | ||
| 111 | 123 | /** | |
| Back | FazBrowse Home | New Git URL |
0 commit comments