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

Commit 2fc13014 authored by Sudheer Shanka's avatar Sudheer Shanka Committed by Android (Google) Code Review
Browse files

Merge "Move getCategory() API into JobInfo from JobInfo.Builder." into main

parents 01a947c8 cb14a187
Loading
Loading
Loading
Loading
+15 −14
Original line number Diff line number Diff line
@@ -826,6 +826,21 @@ public class JobInfo implements Parcelable {
        return mTraceTag;
    }

    /**
     * Gets the category of this job, which was previously defined using
     * {@link JobInfo.Builder#setCategory(int)}. If no category has been set, then
     * {@link JobInfo#CATEGORY_UNKNOWN} will be returned.
     *
     * @return The category of this job, or {@link JobInfo#CATEGORY_UNKNOWN} if no category has
     *         been set using {@link JobInfo.Builder#setCategory(int)}.
     * @see JobInfo.Builder#setCategory(int)
     */
    @FlaggedApi(Flags.FLAG_JOB_CATEGORY_APIS)
    @Category
    public int getCategory() {
        return JobInfo.CATEGORY_UNKNOWN;
    }

    /**
     * @see JobInfo.Builder#setExpedited(boolean)
     */
@@ -2287,20 +2302,6 @@ public class JobInfo implements Parcelable {
            return this;
        }

        /**
         * Gets the category of this job, which was previously defined using
         * {@link #setCategory(int)}. If no category has been set, then
         * {@link JobInfo#CATEGORY_UNKNOWN} will be returned.
         *
         * @return The category of this job, or {@link JobInfo#CATEGORY_UNKNOWN} if no category
         *         has been set using {@link #setCategory(int)}.
         */
        @FlaggedApi(Flags.FLAG_JOB_CATEGORY_APIS)
        @Category
        public int getCategory() {
            return JobInfo.CATEGORY_UNKNOWN;
        }

        /**
         * @return The job object to hand to the JobScheduler. This object is immutable.
         */
+1 −1
Original line number Diff line number Diff line
@@ -9460,6 +9460,7 @@ package android.app.job {
  public class JobInfo implements android.os.Parcelable {
    method public int describeContents();
    method public int getBackoffPolicy();
    method @FlaggedApi("android.app.job.job_category_apis") public int getCategory();
    method @Nullable public android.content.ClipData getClipData();
    method public int getClipGrantFlags();
    method @FlaggedApi("android.app.job.job_debug_info_apis") @NonNull public java.util.Set<java.lang.String> getDebugTags();
@@ -9521,7 +9522,6 @@ package android.app.job {
    method @FlaggedApi("android.app.job.job_debug_info_apis") @NonNull public android.app.job.JobInfo.Builder addDebugTag(@NonNull String);
    method public android.app.job.JobInfo.Builder addTriggerContentUri(@NonNull android.app.job.JobInfo.TriggerContentUri);
    method public android.app.job.JobInfo build();
    method @FlaggedApi("android.app.job.job_category_apis") public int getCategory();
    method @FlaggedApi("android.app.job.job_debug_info_apis") @NonNull public android.app.job.JobInfo.Builder removeDebugTag(@NonNull String);
    method public android.app.job.JobInfo.Builder setBackoffCriteria(long, int);
    method @FlaggedApi("android.app.job.job_category_apis") @NonNull public android.app.job.JobInfo.Builder setCategory(int);