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

Commit 950fa06a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "More small fixes/adjustments to job scheduler." into oc-dev

parents ab16ea90 fd8807ac
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -6890,7 +6890,7 @@ package android.app.job {
  }
  }
  public abstract class JobServiceEngine {
  public abstract class JobServiceEngine {
    ctor public JobServiceEngine(android.content.Context);
    ctor public JobServiceEngine(android.app.Service);
    method public final android.os.IBinder getBinder();
    method public final android.os.IBinder getBinder();
    method public final void jobFinished(android.app.job.JobParameters, boolean);
    method public final void jobFinished(android.app.job.JobParameters, boolean);
    method public abstract boolean onStartJob(android.app.job.JobParameters);
    method public abstract boolean onStartJob(android.app.job.JobParameters);
+1 −1
Original line number Original line Diff line number Diff line
@@ -7326,7 +7326,7 @@ package android.app.job {
  }
  }
  public abstract class JobServiceEngine {
  public abstract class JobServiceEngine {
    ctor public JobServiceEngine(android.content.Context);
    ctor public JobServiceEngine(android.app.Service);
    method public final android.os.IBinder getBinder();
    method public final android.os.IBinder getBinder();
    method public final void jobFinished(android.app.job.JobParameters, boolean);
    method public final void jobFinished(android.app.job.JobParameters, boolean);
    method public abstract boolean onStartJob(android.app.job.JobParameters);
    method public abstract boolean onStartJob(android.app.job.JobParameters);
+1 −1
Original line number Original line Diff line number Diff line
@@ -6920,7 +6920,7 @@ package android.app.job {
  }
  }
  public abstract class JobServiceEngine {
  public abstract class JobServiceEngine {
    ctor public JobServiceEngine(android.content.Context);
    ctor public JobServiceEngine(android.app.Service);
    method public final android.os.IBinder getBinder();
    method public final android.os.IBinder getBinder();
    method public final void jobFinished(android.app.job.JobParameters, boolean);
    method public final void jobFinished(android.app.job.JobParameters, boolean);
    method public abstract boolean onStartJob(android.app.job.JobParameters);
    method public abstract boolean onStartJob(android.app.job.JobParameters);
+14 −0
Original line number Original line Diff line number Diff line
@@ -164,6 +164,20 @@ public class JobParameters implements Parcelable {
     * you should not call {@link JobService#jobFinished(JobParameters, boolean)} yourself
     * you should not call {@link JobService#jobFinished(JobParameters, boolean)} yourself
     * (otherwise you risk losing an upcoming JobWorkItem that is being enqueued at the same time).
     * (otherwise you risk losing an upcoming JobWorkItem that is being enqueued at the same time).
     *
     *
     * <p>Once you are done with the {@link JobWorkItem} returned by this method, you must call
     * {@link #completeWork(JobWorkItem)} with it to inform the system that you are done
     * executing the work.  The job will not be finished until all dequeued work has been
     * completed.  You do not, however, have to complete each returned work item before deqeueing
     * the next one -- you can use {@link #dequeueWork()} multiple times before completing
     * previous work if you want to process work in parallel, and you can complete the work
     * in whatever order you want.</p>
     *
     * <p>If the job runs to the end of its available time period before all work has been
     * completed, it will stop as normal.  You should return true from
     * {@link JobService#onStopJob(JobParameters)} in order to have the job rescheduled, and by
     * doing so any pending as well as remaining uncompleted work will be re-queued
     * for the next time the job runs.</p>
     *
     * @return Returns a new {@link JobWorkItem} if there is one pending, otherwise null.
     * @return Returns a new {@link JobWorkItem} if there is one pending, otherwise null.
     * If null is returned, the system will also stop the job if all work has also been completed.
     * If null is returned, the system will also stop the job if all work has also been completed.
     * (This means that for correct operation, you must always call dequeueWork() after you have
     * (This means that for correct operation, you must always call dequeueWork() after you have
+5 −5
Original line number Original line Diff line number Diff line
@@ -54,7 +54,7 @@ public abstract class JobServiceEngine {
    /**
    /**
     * Context we are running in.
     * Context we are running in.
     */
     */
    private final Context mContext;
    private final Service mService;


    private final IJobService mBinder;
    private final IJobService mBinder;


@@ -182,12 +182,12 @@ public abstract class JobServiceEngine {
    /**
    /**
     * Create a new engine, ready for use.
     * Create a new engine, ready for use.
     *
     *
     * @param context The {@link Service} that is creating this engine.
     * @param service The {@link Service} that is creating this engine and in which it will run.
     */
     */
    public JobServiceEngine(Context context) {
    public JobServiceEngine(Service service) {
        mContext = context;
        mService = service;
        mBinder = new JobInterface(this);
        mBinder = new JobInterface(this);
        mHandler = new JobHandler(mContext.getMainLooper());
        mHandler = new JobHandler(mService.getMainLooper());
    }
    }


    /**
    /**
Loading