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
Loading
Please register or sign in to comment