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

Commit b5b49c6c authored by Varun Shah's avatar Varun Shah Committed by Android (Google) Code Review
Browse files

Merge "Hide the new RUN_BACKUP_JOBS permission." into main

parents 6f3e962d 12007ca9
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -4783,6 +4783,10 @@ public class JobSchedulerService extends com.android.server.SystemService
     * Returns whether the app holds the {@link Manifest.permission.RUN_BACKUP_JOBS} permission.
     */
    private boolean hasRunBackupJobsPermission(@NonNull String packageName, int packageUid) {
        // This permission is currently hidden so always return false for now (see b/331272951)
        return false;

        /**
        if (packageName == null) {
            Slog.wtfStack(TAG,
                    "Expected a non-null package name when calling hasRunBackupJobsPermission");
@@ -4793,6 +4797,7 @@ public class JobSchedulerService extends com.android.server.SystemService
                android.Manifest.permission.RUN_BACKUP_JOBS,
                PermissionChecker.PID_UNKNOWN, packageUid, packageName)
                    == PermissionChecker.PERMISSION_GRANTED;
        */
    }

    /**
+2 −1
Original line number Diff line number Diff line
@@ -1213,7 +1213,8 @@ public final class JobStatus {
            return ACTIVE_INDEX;
        }

        final boolean isEligibleAsBackupJob = job.getTriggerContentUris() != null
        final boolean isEligibleAsBackupJob = false // this exemption is being disabled for now.
                && job.getTriggerContentUris() != null
                && job.getRequiredNetwork() != null
                && !job.hasLateConstraint()
                && mJobSchedulerInternal.hasRunBackupJobsPermission(sourcePackageName, sourceUid);
+0 −2
Original line number Diff line number Diff line
@@ -285,7 +285,6 @@ package android {
    field @FlaggedApi("android.companion.flags.device_presence") public static final String REQUEST_OBSERVE_DEVICE_UUID_PRESENCE = "android.permission.REQUEST_OBSERVE_DEVICE_UUID_PRESENCE";
    field public static final String REQUEST_PASSWORD_COMPLEXITY = "android.permission.REQUEST_PASSWORD_COMPLEXITY";
    field @Deprecated public static final String RESTART_PACKAGES = "android.permission.RESTART_PACKAGES";
    field @FlaggedApi("android.app.job.backup_jobs_exemption") public static final String RUN_BACKUP_JOBS = "android.permission.RUN_BACKUP_JOBS";
    field public static final String RUN_USER_INITIATED_JOBS = "android.permission.RUN_USER_INITIATED_JOBS";
    field public static final String SCHEDULE_EXACT_ALARM = "android.permission.SCHEDULE_EXACT_ALARM";
    field public static final String SEND_RESPOND_VIA_MESSAGE = "android.permission.SEND_RESPOND_VIA_MESSAGE";
@@ -37338,7 +37337,6 @@ package android.provider {
    field public static final String ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS = "android.settings.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS";
    field public static final String ACTION_REQUEST_MANAGE_MEDIA = "android.settings.REQUEST_MANAGE_MEDIA";
    field @FlaggedApi("com.android.media.flags.enable_privileged_routing_for_media_routing_control") public static final String ACTION_REQUEST_MEDIA_ROUTING_CONTROL = "android.settings.REQUEST_MEDIA_ROUTING_CONTROL";
    field @FlaggedApi("android.provider.backup_tasks_settings_screen") public static final String ACTION_REQUEST_RUN_BACKUP_JOBS = "android.settings.REQUEST_RUN_BACKUP_JOBS";
    field public static final String ACTION_REQUEST_SCHEDULE_EXACT_ALARM = "android.settings.REQUEST_SCHEDULE_EXACT_ALARM";
    field public static final String ACTION_REQUEST_SET_AUTOFILL_SERVICE = "android.settings.REQUEST_SET_AUTOFILL_SERVICE";
    field @FlaggedApi("com.android.internal.telephony.flags.carrier_enabled_satellite_flag") public static final String ACTION_SATELLITE_SETTING = "android.settings.SATELLITE_SETTING";
+2 −0
Original line number Diff line number Diff line
@@ -696,6 +696,8 @@ public final class Settings {
     * Output: When a package data uri is passed as input, the activity result is set to
     * {@link android.app.Activity#RESULT_OK} if the permission was granted to the app. Otherwise,
     * the result is set to {@link android.app.Activity#RESULT_CANCELED}.
     *
     * @hide
     */
    @FlaggedApi(Flags.FLAG_BACKUP_TASKS_SETTINGS_SCREEN)
    @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
+1 −0
Original line number Diff line number Diff line
@@ -7986,6 +7986,7 @@
         content URI trigger and network constraint set.
         <p>This is a special access permission that can be revoked by the system or the user.
         <p>Protection level: signature|privileged|appop
         @hide
     -->
    <permission android:name="android.permission.RUN_BACKUP_JOBS"
                android:protectionLevel="signature|privileged|appop"/>