summaryrefslogtreecommitdiff
path: root/libs/androidfw/FileStream.cpp
diff options
context:
space:
mode:
author Kweku Adams <kwekua@google.com> 2023-05-26 21:46:39 +0000
committer Kweku Adams <kwekua@google.com> 2023-06-01 16:38:12 +0000
commita57583df65bce8789dcb580fa540c37257f5e737 (patch)
treebe26cecf5db9e6bedfc7dde6c0d5530770806194 /libs/androidfw/FileStream.cpp
parent09c9df3f4c038df5dcdc43b2eff977e99a91a866 (diff)
Add app-level timeout & ANR limits.
If an app's jobs keep timing out, then the app potentially has a bug. Timeouts resulted in backoff of the individual job that timed out, but didn't affect other jobs. This meant that apps could bypass backoff by scheduling one-off jobs instead of rescheduling using the return parameter to onStopJob. Now, JobScheduler will track the number of job timeouts across all of the app's jobs and reduce the app's max job time if it exceeds a threshold. If the total number of timeouts exceeds another limit, JobScheduler will consider the app buggy and attempt to put the app in the RESTRICTED bucket. Similarly, if an app keeps ANRing from JobScheduler's perspective, it will consider the app buggy and attempt to put it in the RESTRICTED bucket. When an unexempted app is considered buggy, don't treat any of its jobs as in the ACTIVE unless the app is current active. Also, reduce the delay for forcing an app in the RESTRICTED bucket (eg. when the app is buggy) to 1 hour. The normal bucket timeout continues to be 8 days. Bug: 284080732 Test: atest AppStandbyControllerTests Test: atest FrameworksMockingServicesTests:JobSchedulerServiceTest Test: atest FrameworksMockingServicesTests:JobStatusTest Test: atest frameworks/base/services/tests/mockingservicestests/src/com/android/server/job Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/job Change-Id: I8eb333a922658ba6137012dffd7a143cd990376d
Diffstat (limited to 'libs/androidfw/FileStream.cpp')
0 files changed, 0 insertions, 0 deletions