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

Commit 86dc45f1 authored by Kweku Adams's avatar Kweku Adams
Browse files

Expose LRJ related JobServiceEngine APIs.

JobServiceEngine is a layer that sits under JobService that anyone can
override. Any APIs that support new JobService APIs need to be exposed
in conjunction with the JobService APIs.

Bug: 255371817
Test: atest CtsJobSchedulerTestCases
API-Coverage-Bug: 262911363
Change-Id: I7317354c4010f4c2ba12a6bbb8f930f8ce649b66
parent 404b7181
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -418,11 +418,12 @@ public abstract class JobServiceEngine {
    /**
     * Call in to engine to report data transfer progress.
     *
     * @hide
     * @see JobService#updateTransferredNetworkBytes(JobParameters, long, long)
     * @see JobService#updateTransferredNetworkBytes(JobParameters, JobWorkItem, long, long)
     */
    public void updateTransferredNetworkBytes(@NonNull JobParameters params,
            @Nullable JobWorkItem item, long downloadBytes, long uploadBytes) {
            @Nullable JobWorkItem item,
            @BytesLong long downloadBytes, @BytesLong long uploadBytes) {
        if (params == null) {
            throw new NullPointerException("params");
        }
@@ -437,11 +438,11 @@ public abstract class JobServiceEngine {
    /**
     * Call in to engine to report data transfer progress.
     *
     * @hide
     * @see JobService#updateEstimatedNetworkBytes(JobParameters, long, long)
     * @see JobService#updateEstimatedNetworkBytes(JobParameters, JobWorkItem, long, long)
     */
    public void updateEstimatedNetworkBytes(@NonNull JobParameters params,
            @NonNull JobWorkItem item,
            @Nullable JobWorkItem item,
            @BytesLong long downloadBytes, @BytesLong long uploadBytes) {
        if (params == null) {
            throw new NullPointerException("params");
@@ -457,7 +458,6 @@ public abstract class JobServiceEngine {
    /**
     * Give JobScheduler a notification to tie to this job's lifecycle.
     *
     * @hide
     * @see JobService#setNotification(JobParameters, int, Notification, int)
     */
    public void setNotification(@NonNull JobParameters params, int notificationId,
+3 −0
Original line number Diff line number Diff line
@@ -8615,6 +8615,9 @@ package android.app.job {
    method public void jobFinished(android.app.job.JobParameters, boolean);
    method public abstract boolean onStartJob(android.app.job.JobParameters);
    method public abstract boolean onStopJob(android.app.job.JobParameters);
    method public void setNotification(@NonNull android.app.job.JobParameters, int, @NonNull android.app.Notification, int);
    method public void updateEstimatedNetworkBytes(@NonNull android.app.job.JobParameters, @Nullable android.app.job.JobWorkItem, long, long);
    method public void updateTransferredNetworkBytes(@NonNull android.app.job.JobParameters, @Nullable android.app.job.JobWorkItem, long, long);
  }
  public final class JobWorkItem implements android.os.Parcelable {