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

Commit 147134cd authored by Kweku Adams's avatar Kweku Adams
Browse files

Remove unnecessary flag.

The app compat framework now properly handles the device's version code,
so there's no need to have a separate flag to ensure the code only
operates on V+ builds.

Bug: 300477393
Test: atest CtsJobSchedulerTestCases:JobInfoTest
Change-Id: I30404a9e1110f4d5a9b8c5bd1483c81737727962
parent c80b0a81
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -27,10 +27,3 @@ flag {
    description: "Only relax a prefetch job's connectivity constraint when the device is charging and battery is not low"
    bug: "299329948"
}

flag {
    name: "throw_on_unsupported_bias_usage"
    namespace: "backstage_power"
    description: "Throw an exception if an unsupported app uses JobInfo.setBias"
    bug: "300477393"
}
+1 −5
Original line number Diff line number Diff line
@@ -4715,8 +4715,7 @@ public class JobSchedulerService extends com.android.server.SystemService
        private JobInfo enforceBuilderApiPermissions(int uid, int pid, JobInfo job) {
            if (job.getBias() != JobInfo.BIAS_DEFAULT
                        && !hasPermission(uid, pid, Manifest.permission.UPDATE_DEVICE_STATS)) {
                if (CompatChanges.isChangeEnabled(THROW_ON_UNSUPPORTED_BIAS_USAGE, uid)
                        && Flags.throwOnUnsupportedBiasUsage()) {
                if (CompatChanges.isChangeEnabled(THROW_ON_UNSUPPORTED_BIAS_USAGE, uid)) {
                    throw new SecurityException("Apps may not call setBias()");
                } else {
                    // We can't throw the exception. Log the issue and modify the job to remove
@@ -5761,9 +5760,6 @@ public class JobSchedulerService extends com.android.server.SystemService
            pw.print(Flags.FLAG_DO_NOT_FORCE_RUSH_EXECUTION_AT_BOOT,
                    Flags.doNotForceRushExecutionAtBoot());
            pw.println();
            pw.print(Flags.FLAG_THROW_ON_UNSUPPORTED_BIAS_USAGE,
                    Flags.throwOnUnsupportedBiasUsage());
            pw.println();
            pw.print(android.app.job.Flags.FLAG_BACKUP_JOBS_EXEMPTION,
                    android.app.job.Flags.backupJobsExemption());
            pw.println();
+0 −3
Original line number Diff line number Diff line
@@ -359,9 +359,6 @@ public final class JobSchedulerShellCommand extends BasicShellCommandHandler {
            case com.android.server.job.Flags.FLAG_DO_NOT_FORCE_RUSH_EXECUTION_AT_BOOT:
                pw.println(com.android.server.job.Flags.doNotForceRushExecutionAtBoot());
                break;
            case com.android.server.job.Flags.FLAG_THROW_ON_UNSUPPORTED_BIAS_USAGE:
                pw.println(com.android.server.job.Flags.throwOnUnsupportedBiasUsage());
                break;
            case android.app.job.Flags.FLAG_BACKUP_JOBS_EXEMPTION:
                pw.println(android.app.job.Flags.backupJobsExemption());
                break;