Loading core/java/android/app/JobSchedulerImpl.java +2 −2 Original line number Diff line number Diff line Loading @@ -46,9 +46,9 @@ public class JobSchedulerImpl extends JobScheduler { } @Override public int scheduleAsPackage(JobInfo job, String packageName, int userId) { public int scheduleAsPackage(JobInfo job, String packageName, int userId, String tag) { try { return mBinder.scheduleAsPackage(job, packageName, userId); return mBinder.scheduleAsPackage(job, packageName, userId, tag); } catch (RemoteException e) { return JobScheduler.RESULT_FAILURE; } Loading core/java/android/app/job/IJobScheduler.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ import android.app.job.JobInfo; */ interface IJobScheduler { int schedule(in JobInfo job); int scheduleAsPackage(in JobInfo job, String packageName, int userId); int scheduleAsPackage(in JobInfo job, String packageName, int userId, String tag); void cancel(int jobId); void cancelAll(); List<JobInfo> getAllPendingJobs(); Loading core/java/android/app/job/JobInfo.java +26 −1 Original line number Diff line number Diff line Loading @@ -83,6 +83,31 @@ public class JobInfo implements Parcelable { */ public static final int DEFAULT_BACKOFF_POLICY = BACKOFF_POLICY_EXPONENTIAL; /** * Default of {@link #getPriority}. * @hide */ public static final int PRIORITY_DEFAULT = 0; /** * Value of {@link #getPriority} for expedited syncs. * @hide */ public static final int PRIORITY_SYNC_EXPEDITED = 10; /** * Value of {@link #getPriority} for first time initialization syncs. * @hide */ public static final int PRIORITY_SYNC_INITIALIZATION = 20; /** * Value of {@link #getPriority} for the current foreground app (overrides the supplied * JobInfo priority if it is smaller). * @hide */ public static final int PRIORITY_FOREGROUND_APP = 30; private final int jobId; private final PersistableBundle extras; private final ComponentName service; Loading Loading @@ -406,7 +431,7 @@ public class JobInfo implements Parcelable { private int mJobId; private PersistableBundle mExtras = PersistableBundle.EMPTY; private ComponentName mJobService; private int mPriority; private int mPriority = PRIORITY_DEFAULT; // Requirements. private boolean mRequiresCharging; private boolean mRequiresDeviceIdle; Loading core/java/android/app/job/JobScheduler.java +2 −1 Original line number Diff line number Diff line Loading @@ -68,10 +68,11 @@ public abstract class JobScheduler { * @param packageName The package on behalf of which the job is to be scheduled. This will be * used to track battery usage and appIdleState. * @param userId User on behalf of whom this job is to be scheduled. * @param tag Debugging tag for dumps associated with this job (instead of the service class) * @return {@link #RESULT_SUCCESS} or {@link #RESULT_FAILURE} * @hide */ public abstract int scheduleAsPackage(JobInfo job, String packageName, int userId); public abstract int scheduleAsPackage(JobInfo job, String packageName, int userId, String tag); /** * Cancel a job that is pending in the JobScheduler. Loading services/core/java/com/android/server/content/SyncManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -1319,7 +1319,7 @@ public class SyncManager { } getJobScheduler().scheduleAsPackage(b.build(), syncOperation.owningPackage, syncOperation.target.userId); syncOperation.target.userId, "sync"); } /** Loading Loading
core/java/android/app/JobSchedulerImpl.java +2 −2 Original line number Diff line number Diff line Loading @@ -46,9 +46,9 @@ public class JobSchedulerImpl extends JobScheduler { } @Override public int scheduleAsPackage(JobInfo job, String packageName, int userId) { public int scheduleAsPackage(JobInfo job, String packageName, int userId, String tag) { try { return mBinder.scheduleAsPackage(job, packageName, userId); return mBinder.scheduleAsPackage(job, packageName, userId, tag); } catch (RemoteException e) { return JobScheduler.RESULT_FAILURE; } Loading
core/java/android/app/job/IJobScheduler.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ import android.app.job.JobInfo; */ interface IJobScheduler { int schedule(in JobInfo job); int scheduleAsPackage(in JobInfo job, String packageName, int userId); int scheduleAsPackage(in JobInfo job, String packageName, int userId, String tag); void cancel(int jobId); void cancelAll(); List<JobInfo> getAllPendingJobs(); Loading
core/java/android/app/job/JobInfo.java +26 −1 Original line number Diff line number Diff line Loading @@ -83,6 +83,31 @@ public class JobInfo implements Parcelable { */ public static final int DEFAULT_BACKOFF_POLICY = BACKOFF_POLICY_EXPONENTIAL; /** * Default of {@link #getPriority}. * @hide */ public static final int PRIORITY_DEFAULT = 0; /** * Value of {@link #getPriority} for expedited syncs. * @hide */ public static final int PRIORITY_SYNC_EXPEDITED = 10; /** * Value of {@link #getPriority} for first time initialization syncs. * @hide */ public static final int PRIORITY_SYNC_INITIALIZATION = 20; /** * Value of {@link #getPriority} for the current foreground app (overrides the supplied * JobInfo priority if it is smaller). * @hide */ public static final int PRIORITY_FOREGROUND_APP = 30; private final int jobId; private final PersistableBundle extras; private final ComponentName service; Loading Loading @@ -406,7 +431,7 @@ public class JobInfo implements Parcelable { private int mJobId; private PersistableBundle mExtras = PersistableBundle.EMPTY; private ComponentName mJobService; private int mPriority; private int mPriority = PRIORITY_DEFAULT; // Requirements. private boolean mRequiresCharging; private boolean mRequiresDeviceIdle; Loading
core/java/android/app/job/JobScheduler.java +2 −1 Original line number Diff line number Diff line Loading @@ -68,10 +68,11 @@ public abstract class JobScheduler { * @param packageName The package on behalf of which the job is to be scheduled. This will be * used to track battery usage and appIdleState. * @param userId User on behalf of whom this job is to be scheduled. * @param tag Debugging tag for dumps associated with this job (instead of the service class) * @return {@link #RESULT_SUCCESS} or {@link #RESULT_FAILURE} * @hide */ public abstract int scheduleAsPackage(JobInfo job, String packageName, int userId); public abstract int scheduleAsPackage(JobInfo job, String packageName, int userId, String tag); /** * Cancel a job that is pending in the JobScheduler. Loading
services/core/java/com/android/server/content/SyncManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -1319,7 +1319,7 @@ public class SyncManager { } getJobScheduler().scheduleAsPackage(b.build(), syncOperation.owningPackage, syncOperation.target.userId); syncOperation.target.userId, "sync"); } /** Loading