From 2d5d378598bd668677ae3a651002dea6a8590658 Mon Sep 17 00:00:00 2001 From: Kweku Adams Date: Thu, 4 Feb 2021 08:53:40 -0800 Subject: Remove setForeground API. We renamed them to expedited jobs and the deprecated API is not being used. Bug: 171305774 Test: atest CtsJobSchedulerTestCases Change-Id: I35dd6bf3c9188f621da49da7c9ed513d163afed8 --- .../framework/java/android/app/job/JobInfo.java | 23 ---------------------- core/api/current.txt | 2 -- 2 files changed, 25 deletions(-) diff --git a/apex/jobscheduler/framework/java/android/app/job/JobInfo.java b/apex/jobscheduler/framework/java/android/app/job/JobInfo.java index 6eb44a74a3f3..930415fcd8fd 100644 --- a/apex/jobscheduler/framework/java/android/app/job/JobInfo.java +++ b/apex/jobscheduler/framework/java/android/app/job/JobInfo.java @@ -592,15 +592,6 @@ public class JobInfo implements Parcelable { return (flags & FLAG_EXPEDITED) != 0; } - /** - * @see JobInfo.Builder#setExpedited(boolean) - * @deprecated Use {@link #isExpedited()} instead - */ - @Deprecated - public boolean isForegroundJob() { - return (flags & FLAG_EXPEDITED) != 0; - } - /** * @see JobInfo.Builder#setImportantWhileForeground(boolean) */ @@ -1502,20 +1493,6 @@ public class JobInfo implements Parcelable { return this; } - /** - * @deprecated Use {@link #setExpedited(boolean)} instead. - */ - @Deprecated - @NonNull - public Builder setForeground(boolean foreground) { - if (foreground) { - mFlags |= FLAG_EXPEDITED; - } else { - mFlags &= (~FLAG_EXPEDITED); - } - return this; - } - /** * Setting this to true indicates that this job is important while the scheduling app * is in the foreground or on the temporary whitelist for background restrictions. diff --git a/core/api/current.txt b/core/api/current.txt index dcb7ecef3b99..2afedd93759a 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -7743,7 +7743,6 @@ package android.app.job { method public long getTriggerContentUpdateDelay(); method @Nullable public android.app.job.JobInfo.TriggerContentUri[] getTriggerContentUris(); method public boolean isExpedited(); - method @Deprecated public boolean isForegroundJob(); method public boolean isImportantWhileForeground(); method public boolean isPeriodic(); method public boolean isPersisted(); @@ -7776,7 +7775,6 @@ package android.app.job { method public android.app.job.JobInfo.Builder setEstimatedNetworkBytes(long, long); method @NonNull public android.app.job.JobInfo.Builder setExpedited(boolean); method public android.app.job.JobInfo.Builder setExtras(@NonNull android.os.PersistableBundle); - method @Deprecated @NonNull public android.app.job.JobInfo.Builder setForeground(boolean); method @Deprecated public android.app.job.JobInfo.Builder setImportantWhileForeground(boolean); method public android.app.job.JobInfo.Builder setMinimumLatency(long); method public android.app.job.JobInfo.Builder setOverrideDeadline(long); -- cgit v1.2.3-59-g8ed1b