summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Charles Munger <clm@google.com> 2019-12-05 00:32:14 -0800
committer android-build-merger <android-build-merger@google.com> 2019-12-05 00:32:14 -0800
commit9d5c54ddbba8c46cc335cf092f34cdcde4938f70 (patch)
tree1fce59d8c35082fbd0474ed4c61065d48ba56be8
parent530e5f3d5aa56fadea97f1fbe26948273d8554ca (diff)
parent26bfde20d5b6952eef06f66618c832cc46649f86 (diff)
Merge "Deprecate IntentService" am: 17d1d950ec am: bcdb5c84d3
am: 26bfde20d5 Change-Id: Idaa32d47a1825597f014bd4f46e7e46b94475283
-rw-r--r--api/current.txt12
-rw-r--r--core/java/android/app/IntentService.java15
-rw-r--r--core/java/android/app/Service.java2
3 files changed, 14 insertions, 15 deletions
diff --git a/api/current.txt b/api/current.txt
index f8b3bac8589e..0143db09dae5 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -5181,12 +5181,12 @@ package android.app {
method public android.content.Intent getResultData();
}
- public abstract class IntentService extends android.app.Service {
- ctor public IntentService(String);
- method @Nullable public android.os.IBinder onBind(android.content.Intent);
- method @WorkerThread protected abstract void onHandleIntent(@Nullable android.content.Intent);
- method public void onStart(@Nullable android.content.Intent, int);
- method public void setIntentRedelivery(boolean);
+ @Deprecated public abstract class IntentService extends android.app.Service {
+ ctor @Deprecated public IntentService(String);
+ method @Deprecated @Nullable public android.os.IBinder onBind(android.content.Intent);
+ method @Deprecated @WorkerThread protected abstract void onHandleIntent(@Nullable android.content.Intent);
+ method @Deprecated public void onStart(@Nullable android.content.Intent, int);
+ method @Deprecated public void setIntentRedelivery(boolean);
}
public class KeyguardManager {
diff --git a/core/java/android/app/IntentService.java b/core/java/android/app/IntentService.java
index 11c747f5db17..74fb99a0909f 100644
--- a/core/java/android/app/IntentService.java
+++ b/core/java/android/app/IntentService.java
@@ -44,13 +44,6 @@ import android.os.Message;
* long as necessary (and will not block the application's main loop), but
* only one request will be processed at a time.
*
- * <p class="note"><b>Note:</b> IntentService is subject to all the
- * <a href="/preview/features/background.html">background execution limits</a>
- * imposed with Android 8.0 (API level 26). In most cases, you are better off
- * using {@link android.support.v4.app.JobIntentService}, which uses jobs
- * instead of services when running on Android 8.0 or higher.
- * </p>
- *
* <div class="special reference">
* <h3>Developer Guides</h3>
* <p>For a detailed discussion about how to create services, read the
@@ -59,8 +52,14 @@ import android.os.Message;
* </div>
*
* @see android.support.v4.app.JobIntentService
- * @see android.os.AsyncTask
+ *
+ * @deprecated IntentService is subject to all the
+ * <a href="/preview/features/background.html">background execution limits</a>
+ * imposed with Android 8.0 (API level 26). Consider using {@link androidx.work.WorkManager}
+ * or {@link androidx.core.app.JobIntentService}, which uses jobs
+ * instead of services when running on Android 8.0 or higher.
*/
+@Deprecated
public abstract class IntentService extends Service {
private volatile Looper mServiceLooper;
@UnsupportedAppUsage
diff --git a/core/java/android/app/Service.java b/core/java/android/app/Service.java
index 1f91b3f431a1..9b62e3b3af98 100644
--- a/core/java/android/app/Service.java
+++ b/core/java/android/app/Service.java
@@ -57,7 +57,7 @@ import java.lang.annotation.RetentionPolicy;
* networking) operations, it should spawn its own thread in which to do that
* work. More information on this can be found in
* <a href="{@docRoot}guide/topics/fundamentals/processes-and-threads.html">Processes and
- * Threads</a>. The {@link IntentService} class is available
+ * Threads</a>. The {@link androidx.core.app.JobIntentService} class is available
* as a standard implementation of Service that has its own thread where it
* schedules its work to be done.</p>
*