Loading PREUPLOAD.cfg +1 −1 Original line number Original line Diff line number Diff line Loading @@ -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} 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} TEST_MAPPING +30 −0 Original line number Original line Diff line number Diff line Loading @@ -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": [ "presubmit": [ { { "name": "ManagedProvisioningTests", "name": "ManagedProvisioningTests", Loading Loading @@ -167,6 +183,20 @@ "exclude-annotation": "org.junit.Ignore" "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" } ] } } ] ] } } apex/jobscheduler/framework/java/android/app/JobSchedulerImpl.java +27 −0 Original line number Original line Diff line number Diff line Loading @@ -16,7 +16,10 @@ package android.app; package android.app; import android.annotation.NonNull; import android.annotation.RequiresPermission; import android.app.job.IJobScheduler; import android.app.job.IJobScheduler; import android.app.job.IUserVisibleJobObserver; import android.app.job.JobInfo; import android.app.job.JobInfo; import android.app.job.JobScheduler; import android.app.job.JobScheduler; import android.app.job.JobSnapshot; import android.app.job.JobSnapshot; Loading Loading @@ -119,4 +122,28 @@ public class JobSchedulerImpl extends JobScheduler { return null; 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 } } } apex/jobscheduler/framework/java/android/app/job/IUserVisibleJobObserver.aidl 0 → 100644 +33 −0 Original line number Original line 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); } apex/jobscheduler/framework/java/android/app/job/JobScheduler.java +29 −1 Original line number Original line Diff line number Diff line Loading @@ -237,4 +237,32 @@ public abstract class JobScheduler { */ */ @SuppressWarnings("HiddenAbstractMethod") @SuppressWarnings("HiddenAbstractMethod") public abstract List<JobSnapshot> getAllJobSnapshots(); 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
PREUPLOAD.cfg +1 −1 Original line number Original line Diff line number Diff line Loading @@ -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} 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}
TEST_MAPPING +30 −0 Original line number Original line Diff line number Diff line Loading @@ -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": [ "presubmit": [ { { "name": "ManagedProvisioningTests", "name": "ManagedProvisioningTests", Loading Loading @@ -167,6 +183,20 @@ "exclude-annotation": "org.junit.Ignore" "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" } ] } } ] ] } }
apex/jobscheduler/framework/java/android/app/JobSchedulerImpl.java +27 −0 Original line number Original line Diff line number Diff line Loading @@ -16,7 +16,10 @@ package android.app; package android.app; import android.annotation.NonNull; import android.annotation.RequiresPermission; import android.app.job.IJobScheduler; import android.app.job.IJobScheduler; import android.app.job.IUserVisibleJobObserver; import android.app.job.JobInfo; import android.app.job.JobInfo; import android.app.job.JobScheduler; import android.app.job.JobScheduler; import android.app.job.JobSnapshot; import android.app.job.JobSnapshot; Loading Loading @@ -119,4 +122,28 @@ public class JobSchedulerImpl extends JobScheduler { return null; 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 } } }
apex/jobscheduler/framework/java/android/app/job/IUserVisibleJobObserver.aidl 0 → 100644 +33 −0 Original line number Original line 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); }
apex/jobscheduler/framework/java/android/app/job/JobScheduler.java +29 −1 Original line number Original line Diff line number Diff line Loading @@ -237,4 +237,32 @@ public abstract class JobScheduler { */ */ @SuppressWarnings("HiddenAbstractMethod") @SuppressWarnings("HiddenAbstractMethod") public abstract List<JobSnapshot> getAllJobSnapshots(); 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); } }