From d1f835731bde19d44842e0fbc34a4c6afe71f968 Mon Sep 17 00:00:00 2001 From: Kweku Adams Date: Fri, 13 Jan 2023 19:58:44 +0000 Subject: [PATCH] Expose job notification policy constants. JobService.setNotification is now public API and expects a notification end policy. The associated constants should be public as well. Bug: 255371817 Test: atest CtsJobSchedulerTestCases Change-Id: I3ac5374f9739b4b8627a9f6f06e6988a8e547e70 --- .../framework/java/android/app/job/JobService.java | 4 ---- core/api/current.txt | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/apex/jobscheduler/framework/java/android/app/job/JobService.java b/apex/jobscheduler/framework/java/android/app/job/JobService.java index 31d2266feab48..1a205d0008358 100644 --- a/apex/jobscheduler/framework/java/android/app/job/JobService.java +++ b/apex/jobscheduler/framework/java/android/app/job/JobService.java @@ -73,16 +73,12 @@ public abstract class JobService extends Service { * Detach the notification supplied to * {@link #setNotification(JobParameters, int, Notification, int)} when the job ends. * The notification will remain shown even after JobScheduler stops the job. - * - * @hide */ public static final int JOB_END_NOTIFICATION_POLICY_DETACH = 0; /** * Cancel and remove the notification supplied to * {@link #setNotification(JobParameters, int, Notification, int)} when the job ends. * The notification will be removed from the notification shade. - * - * @hide */ public static final int JOB_END_NOTIFICATION_POLICY_REMOVE = 1; diff --git a/core/api/current.txt b/core/api/current.txt index eb2ba0e247b78..a5d1e6fdd5804 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -8643,6 +8643,8 @@ package android.app.job { method public final void updateEstimatedNetworkBytes(@NonNull android.app.job.JobParameters, @NonNull android.app.job.JobWorkItem, long, long); method public final void updateTransferredNetworkBytes(@NonNull android.app.job.JobParameters, long, long); method public final void updateTransferredNetworkBytes(@NonNull android.app.job.JobParameters, @NonNull android.app.job.JobWorkItem, long, long); + field public static final int JOB_END_NOTIFICATION_POLICY_DETACH = 0; // 0x0 + field public static final int JOB_END_NOTIFICATION_POLICY_REMOVE = 1; // 0x1 field public static final String PERMISSION_BIND = "android.permission.BIND_JOB_SERVICE"; }