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

Commit 487d87ca authored by Xin Li's avatar Xin Li Committed by Gerrit Code Review
Browse files

Merge "Merge Android 13 QPR2"

parents 49c2bd7f 24e88de3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -27,4 +27,4 @@ hidden_api_txt_exclude_hook = ${REPO_ROOT}/frameworks/base/tools/hiddenapi/exclu

ktfmt_hook = ${REPO_ROOT}/external/ktfmt/ktfmt.py --check -i ${REPO_ROOT}/frameworks/base/packages/SystemUI/ktfmt_includes.txt ${PREUPLOAD_FILES}

ktlint_hook = ${REPO_ROOT}/prebuilts/ktlint/ktlint.py -f ${PREUPLOAD_FILES}
ktlint_hook = ${REPO_ROOT}/prebuilts/ktlint/ktlint.py --no-verify-format -f ${PREUPLOAD_FILES}
+30 −0
Original line number Diff line number Diff line
@@ -15,6 +15,22 @@
      ]
    }
  ],
  "presubmit-pm": [
    {
      "name": "PackageManagerServiceServerTests",
      "options": [
        {
          "include-annotation": "android.platform.test.annotations.Presubmit"
        },
        {
          "exclude-annotation": "androidx.test.filters.FlakyTest"
        },
        {
          "exclude-annotation": "org.junit.Ignore"
        }
      ]
    }
  ],
  "presubmit": [
    {
      "name": "ManagedProvisioningTests",
@@ -167,6 +183,20 @@
         "exclude-annotation": "org.junit.Ignore"
       }
     ]
   },
   {
     "name": "PackageManagerServiceServerTests",
     "options": [
       {
         "include-annotation": "android.platform.test.annotations.Presubmit"
       },
       {
         "exclude-annotation": "androidx.test.filters.FlakyTest"
       },
       {
         "exclude-annotation": "org.junit.Ignore"
       }
     ]
   }
 ]
}
+27 −0
Original line number Diff line number Diff line
@@ -16,7 +16,10 @@

package android.app;

import android.annotation.NonNull;
import android.annotation.RequiresPermission;
import android.app.job.IJobScheduler;
import android.app.job.IUserVisibleJobObserver;
import android.app.job.JobInfo;
import android.app.job.JobScheduler;
import android.app.job.JobSnapshot;
@@ -119,4 +122,28 @@ public class JobSchedulerImpl extends JobScheduler {
            return null;
        }
    }

    @RequiresPermission(allOf = {
            android.Manifest.permission.MANAGE_ACTIVITY_TASKS,
            android.Manifest.permission.INTERACT_ACROSS_USERS_FULL})
    @Override
    public void registerUserVisibleJobObserver(@NonNull IUserVisibleJobObserver observer) {
        // TODO(255767350): implement
    }

    @RequiresPermission(allOf = {
            android.Manifest.permission.MANAGE_ACTIVITY_TASKS,
            android.Manifest.permission.INTERACT_ACROSS_USERS_FULL})
    @Override
    public void unregisterUserVisibleJobObserver(@NonNull IUserVisibleJobObserver observer) {
        // TODO(255767350): implement
    }

    @RequiresPermission(allOf = {
            android.Manifest.permission.MANAGE_ACTIVITY_TASKS,
            android.Manifest.permission.INTERACT_ACROSS_USERS_FULL})
    @Override
    public void stopUserVisibleJobsForUser(@NonNull String packageName, int userId) {
        // TODO(255767350): implement
    }
}
+33 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2022 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.app.job;

import android.app.job.UserVisibleJobSummary;

/**
 * IPC protocol to know about user-visible job activity.
 *
 * @hide
 */
oneway interface IUserVisibleJobObserver {
    /**
     * Notify the client of all changes to a user-visible jobs' state.
     * @param summary A token/summary that uniquely identifies and details a single running job
     * @param isRunning whether the job is currently running or not
     */
    void onUserVisibleJobStateChanged(in UserVisibleJobSummary summary, boolean isRunning);
}
+29 −1
Original line number Diff line number Diff line
@@ -237,4 +237,32 @@ public abstract class JobScheduler {
     */
    @SuppressWarnings("HiddenAbstractMethod")
    public abstract List<JobSnapshot> getAllJobSnapshots();

    /**
     * @hide
     */
    @RequiresPermission(allOf = {
            android.Manifest.permission.MANAGE_ACTIVITY_TASKS,
            android.Manifest.permission.INTERACT_ACROSS_USERS_FULL})
    @SuppressWarnings("HiddenAbstractMethod")
    public abstract void registerUserVisibleJobObserver(@NonNull IUserVisibleJobObserver observer);

    /**
     * @hide
     */
    @RequiresPermission(allOf = {
            android.Manifest.permission.MANAGE_ACTIVITY_TASKS,
            android.Manifest.permission.INTERACT_ACROSS_USERS_FULL})
    @SuppressWarnings("HiddenAbstractMethod")
    public abstract void unregisterUserVisibleJobObserver(
            @NonNull IUserVisibleJobObserver observer);

    /**
     * @hide
     */
    @RequiresPermission(allOf = {
            android.Manifest.permission.MANAGE_ACTIVITY_TASKS,
            android.Manifest.permission.INTERACT_ACROSS_USERS_FULL})
    @SuppressWarnings("HiddenAbstractMethod")
    public abstract void stopUserVisibleJobsForUser(@NonNull String packageName, int userId);
}
Loading