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

Commit 0229f7d0 authored by Xin Guan's avatar Xin Guan Committed by Android (Google) Code Review
Browse files

Merge "JobScheduler: Remove FLAG_ENFORCE_QUOTA_POLICY_TO_TOP_STARTED_JOBS" into main

parents 061f570a 46976be2
Loading
Loading
Loading
Loading
+6 −12
Original line number Diff line number Diff line
@@ -669,10 +669,8 @@ public final class QuotaController extends StateController {
        }

        final int uid = jobStatus.getSourceUid();
        if ((!Flags.enforceQuotaPolicyToTopStartedJobs()
                || mPlatformCompat.isChangeEnabledByUid(
                        OVERRIDE_QUOTA_ENFORCEMENT_TO_TOP_STARTED_JOBS, uid))
                && mTopAppCache.get(uid)) {
        if ((mPlatformCompat.isChangeEnabledByUid(
                OVERRIDE_QUOTA_ENFORCEMENT_TO_TOP_STARTED_JOBS, uid)) && mTopAppCache.get(uid)) {
            if (DEBUG) {
                Slog.d(TAG, jobStatus.toShortString() + " is top started job");
            }
@@ -709,8 +707,7 @@ public final class QuotaController extends StateController {
                timer.stopTrackingJob(jobStatus);
            }
        }
        if (!Flags.enforceQuotaPolicyToTopStartedJobs()
                || mPlatformCompat.isChangeEnabledByUid(
        if (mPlatformCompat.isChangeEnabledByUid(
                OVERRIDE_QUOTA_ENFORCEMENT_TO_TOP_STARTED_JOBS, jobStatus.getSourceUid())) {
            mTopStartedJobs.remove(jobStatus);
        }
@@ -824,8 +821,7 @@ public final class QuotaController extends StateController {

    /** @return true if the job was started while the app was in the TOP state. */
    private boolean isTopStartedJobLocked(@NonNull final JobStatus jobStatus) {
        if (!Flags.enforceQuotaPolicyToTopStartedJobs()
                || mPlatformCompat.isChangeEnabledByUid(
        if (mPlatformCompat.isChangeEnabledByUid(
                OVERRIDE_QUOTA_ENFORCEMENT_TO_TOP_STARTED_JOBS, jobStatus.getSourceUid())) {
            return mTopStartedJobs.contains(jobStatus);
        }
@@ -4595,8 +4591,6 @@ public final class QuotaController extends StateController {
                + ": " + Flags.adjustQuotaDefaultConstants());
        pw.println("    " + Flags.FLAG_ENFORCE_QUOTA_POLICY_TO_FGS_JOBS
                + ": " + Flags.enforceQuotaPolicyToFgsJobs());
        pw.println("    " + Flags.FLAG_ENFORCE_QUOTA_POLICY_TO_TOP_STARTED_JOBS
                + ": " + Flags.enforceQuotaPolicyToTopStartedJobs());
        pw.println("    " + Flags.FLAG_ADDITIONAL_QUOTA_FOR_SYSTEM_INSTALLER
                + ": " + Flags.additionalQuotaForSystemInstaller());
        pw.println();
+3 −515

File changed.

Preview size limit exceeded, changes collapsed.