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

Commit 17cf3c82 authored by Sudheer Shanka's avatar Sudheer Shanka
Browse files

Query standby bucket and reason in a single call.

Introduces a new method to query the app standby bucket and its
corresponding reason in a single call.

Previously, the bucket and reason were fetched in two separate calls.
This created a race condition where the bucket could change between the
calls, leading to an inconsistent state for a job.

This change adds getAppStandbyBucketAndReason() to AppStandbyInternal
and UsageStatsManagerInternal to ensure this operation is atomic.
JobSchedulerService and related classes are updated to use this new
method.

Bug: 409606405
Test: atest ./services/tests/mockingservicestests/src/com/android/server/job/controllers/*Test.java
Test: atest ./services/tests/mockingservicestests/src/com/android/server/job/*Test.java
Flag: com.android.server.job.allow_cmp_exemption_for_restricted_bucket
Change-Id: If1acc273de06d91ce81356334567176d3f6a064a
parent ffe8d252
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment