- Nov 17, 2023
-
-
Kweku Adams authored
A job's NetworkRequest should have the source app's UID as the UID. The previous code attempted to set the UID, but didn't modify the stored job, leading to potentially unexpected behavior of proxied jobs. Rearranging code to ensure we properly set the NetworkRequest UID. Bug: 311727153 Test: N/A Change-Id: I8fb49b74ff861ea82d89ab8d2791e4b917fd6ef2
-
- Nov 13, 2023
-
-
Kweku Adams authored
Switch to using static_libs in one location to avoid loading the same class into the boot path multiple times. Remove redundant links. Bug: 309674488 Test: atest android.compat.sjp.cts.StrictJavaPackagesTest Test: atest frameworks/base/services/tests/mockingservicestests/src/com/android/server/job Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/job Test: atest CtsAppTestCases Test: atest CtsJobSchedulerTestCases:JobSchedulingTest Test: atest CtsNotificationTestCases:NotificationManagerZenTest Test: atest CtsNotificationTestCases:AutomaticZenRuleTest Test: atest CtsOsTestCases:PowerManagerTest Test: atest FrameworksUiServicesTests:ZenModeConfigTest Test: atest PowerServiceTests:PowerManagerServiceTest Change-Id: I917cc4ae662c55a030fbf266133fba04fec496f2
-
- Nov 10, 2023
-
-
Ikjoon Jang authored
This reverts commit efba4176. Reason for revert: DroidMonitor: Potential culprit for Bug b/310080905 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted. Bug: 310080905 Change-Id: Id7d6c1fbc6e58b08c14ad52b74a10adbff8abc4e
-
- Nov 09, 2023
-
-
Kweku Adams authored
Switch to using libs to avoid loading the same class into the boot path multiple times. Bug: 309674488 Test: atest android.compat.sjp.cts.StrictJavaPackagesTest Test: atest frameworks/base/services/tests/mockingservicestests/src/com/android/server/job Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/job Test: atest CtsJobSchedulerTestCases:JobSchedulingTest Test: atest CtsOsTestCases:PowerManagerTest Test: atest PowerServiceTests:PowerManagerServiceTest Change-Id: I4a00922aec9ae295da4480784088d18d0c6bf806
-
Karishma Vakil authored
Revert submission 24499968-appops-deviceid Reason for revert: Causing perf regression b/308786093 Reverted changes: /q/submissionid:24499968-appops-deviceid Change-Id: I211edc6b9bb9f59eb6259be54938000f9ad65c45
-
- Nov 08, 2023
-
-
Roshan Pius authored
Bug: 244264995 Test: Compiles (cherry picked from https://android-review.googlesource.com/q/commit:ad387f90be5f17181f9b7b03b54bac570bafe2b1) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:7c67bf850f1a1d59a070663248a52a416591a096) Merged-In: Ifabc201418c54c2f910ff4b95b5240a58a683001 Change-Id: Ifabc201418c54c2f910ff4b95b5240a58a683001
-
Roshan Pius authored
Bug: 244264995 Test: Compiles Merged-In: Ifabc201418c54c2f910ff4b95b5240a58a683001 Change-Id: Ifabc201418c54c2f910ff4b95b5240a58a683001
-
Sudheer Shanka authored
Bug: 230386578 Test: manual Change-Id: Id1aaa54ccd314108aff02e836ea08ce1fbe80539
-
- Nov 07, 2023
-
-
Roshan Pius authored
Bug: 244264995 Test: Compiles (cherry picked from https://android-review.googlesource.com/q/commit:ad387f90be5f17181f9b7b03b54bac570bafe2b1) Merged-In: Ifabc201418c54c2f910ff4b95b5240a58a683001 Change-Id: Ifabc201418c54c2f910ff4b95b5240a58a683001
-
- Nov 06, 2023
-
-
Kweku Adams authored
Switch the flex network behavior from unmetered vs metered to looking at network transports. Transport affinities indicate which transports are preferred for running jobs, and which ones the system should try to avoid, if possible. By default, when flex scheduling is enabled, the system will avoid running jobs on the cellular network and prefer running jobs on wifi and/or ethernet networks. Watches tend to send most traffic over the bluetooth network. However, there are plans to modify job network traffic in other ways for watches. For now, watches will be excluded from network flex scheduling until those plans are resolved. Bug: 236261941 Bug: 299329948 Bug: 299346198 Test: atest CtsJobSchedulerTestCases:ConnectivityConstraintTest Test: atest CtsJobSchedulerTestCases:FlexibilityConstraintTest 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: I675d72b18ae6ddc43fb1503d481ff9bb56c2dcb6
-
Kweku Adams authored
Make it possible to disable wakelocks for background apps while the device is in light device idle mode. Bug: 299329948 Test: atest PowerServiceTests:PowerManagerServiceTest Change-Id: Ice07f936f6a2ac329825564cb4d8950a92e65fc3
-
Kweku Adams authored
1. Avoid scheduling the idle alarm if the device is already considered idle. 2. Avoid scheduling the idle alarm again if the currently scheduled alarm is for the same time. Bug: 309292340 Test: atest FrameworksMockingServicesTests:DeviceIdlenessTrackerTest Change-Id: I0cb49041d15e5b2bd880ddc06cb2f1aa95e8c174
-
- Nov 03, 2023
-
-
Kweku Adams authored
If a job doesn't say that it needs network, then there's no reason to ensure that the app has access to network while the job is running. Currently, the network restriction bypass flags are only given to expedited or user-initiated jobs. Don't include the flags when the job doesn't require connectivity to avoid accidental network usage/leakage. Bug: 297106511 Bug: 299329948 Bug: 299346198 Test: atest CtsJobSchedulerTestCases:ConnectivityConstraintTest Test: atest CtsJobSchedulerTestCases:ExpeditedJobTest Change-Id: I9c632595f27655a977d6b084760839ce02c8c07b
-
Kweku Adams authored
Developers are informed that expedited jobs can be stopped earlier than regular jobs and so shouldn't use them for long pieces of work. The standard timeout is 3 minutes for EJs. There's little reason to let them run longer than the normal 10 minutes, and letting them run up to 30 minutes may give developers the wrong impression and increases the potential for accidental power issues. Lower the maximum execution limit of EJs to 10 minutes (the base execution limit of regular jobs) to be more in line with what EJs should be used for and prevent additional issues. Bug: 284512488 Bug: 297106511 Bug: 299329948 Bug: 299346198 Test: atest FrameworksMockingServicesTests:JobSchedulerServiceTest Change-Id: Ia4950f0801f2881a34976987f735e5ab7f493ee1
-
- Nov 02, 2023
-
-
Kweku Adams authored
Create a separate JobScheduler idle value by charging + battery-not-low state so that we can have different values when the device is charging compared to when it's on battery. Bug: 236261941 Bug: 297106511 Bug: 299329948 Test: atest CtsJobSchedulerTestCases:IdleConstraintTest 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: I16f41f05f7ffe5ab7fd1f660e0e08ea7544ff921
-
- Oct 31, 2023
-
-
Karishma Vakil authored
startOp, finishOp methods This allows us to reduce the number of parameters being passed around and also enables easy addition of new parameters such as device id. Note that this change is unflagged and is meant to be a pure refactor. This is preparatory CL and no new methods are being added to AppOpsManager yet, but will be needed to allow clients to pass in device id. Bug: 299160174 Test: atest CtsAppOpsTestCases CtsAppOps2TestCases Change-Id: I591b1dc7d7e4af0371c2d1d80b06d858e7213a94
-
- Oct 30, 2023
-
-
Kweku Adams authored
This reverts commit eb72459a. Reason for revert: The plan is to apply it to jobs by default. Bug: 236261941 Bug: 299346198 Test: atest FrameworksMockingServicesTests:ConnectivityControllerTest Test: atest FrameworksMockingServicesTests:FlexibilityControllerTest Test: atest FrameworksMockingServicesTests:JobStatusTest Change-Id: Ie9a5643caf6e6b68642580b92b10c05a70bd2998
-
Kweku Adams authored
The job bias is meant to be an indication of the job type and the state the app was in when the job was scheduled. This can only be determined by the system and certain privileged apps. The job bias can affect some things such as which system health factors are taken into consideration when deciding when to run a job. Given all this, the bias should only be set by the system or certain privileged apps. Note the required permission on the hidden API and enforce that the calling app has the permission when the job is scheduled. Bug: 300477393 Test: atest CtsJobSchedulerTestCases:JobInfoTest Test: atest CtsSyncManagerTestCases Test: atest DownloadManagerApi28Test Test: atest FrameworksServicesTests:BiasSchedulingTest Change-Id: I1cb37eafc42f961dee9d2e7bc7d496a31dff31f4
-
- Oct 27, 2023
-
-
Kunal authored
during Job execution Test: manual testing on device done by building Bug: 255393346 Change-Id: If876aed542e8edf282ac36ff53979919bf41ce90
-
- Oct 24, 2023
-
-
Kweku Adams authored
Don't relax the prefetch connectivity constraint requirement unless the battery is also not low. Bug: 299329948 Test: atest FrameworksMockingServicesTests:PrefetchControllerTest Test: atest FrameworksMockingServicesTests:ConnectivityControllerTest Change-Id: I4b2c0905fb15277c63ae57284a2139858998d68b
-
Kweku Adams authored
1. Remove the job ID from the wakelock tag. 2. Lazily load the tag when needed to reduce memory usage of jobs waiting for constraints to be satisfied. 3. Remove redundant log line. Bug: 273758274 Bug: 302348192 Bug: 307556230 Test: atest CtsJobSchedulerTestCases Test: Manually remove output of `adb shell dumpsys jobscheduler` Change-Id: If8547d23ced90b17225ab8efd758ac735655687e
-
Kweku Adams authored
Use UserHandle.parseUserArg() when parsing adb command flags to enable parsing "cur" and other special user strings. Bug: 282063891 Test: atest CtsJobSchedulerTestCases Test: `adb shell cmd jobscheduler run --user cur com.android.settings 2131427352` Change-Id: Ibe06f536f1de760a5604d067b6c1894f756a17c6
-
Martijn Coenen authored
Having the callbacks on RevocableFileDescriptor coming in on the main thread of system_server can create problems: - system_server's main thread is heavily contended - it can cause deadlocks: callbacks come in from vold with vold's global lock held; this callback needs the system_server main thread to make progress. But if the main thread is busy with another call into vold (unrelated to RevocableFd), this will result in deadlock. Bug: 300351508 Test: atest BlobStoreManagerTest Change-Id: Ie4c3c65bdb9303f4aaab8f76b95d3f9f133b4c3e
-
- Oct 20, 2023
-
-
Kweku Adams authored
The uid parameter to scheduleAsPackage is the calling UID. It was incorrectly being used as the source UID in the statsd logging, causing the end metrics to have the wrong information. This fixes the UID logging and renames the input parameter to avoid further confusion. Bug: 138239687 Test: N/A Change-Id: Ifdfe2ffbc7b5f8b8fe74291a1ec54068541f740b
-
Kweku Adams authored
When loading from disk, skip files such as backup & temp files created during the AtomicFile writing process to avoid incorrectly reading duplicate jobs from them. Bug: 289062813 Bug: 305169670 Test: atest FrameworksServicesTests:JobStoreTest Change-Id: I28a180e2b24357219d34be6a22c785311be6e72e
-
- Oct 13, 2023
-
-
Anton Hansson authored
Various issues here, but the most recurring one is referencing SystemApi from public javadoc. Remove or rewrite such references. Also common is trying to @link IntDefs. Usually this is not necessary, as the presence of IntDef in the @param/@return auto-generates relevant documentation. Bug: 303184203 Test: m docs Change-Id: Ie59e61881c45c73fbbe08250493bd35eca268ef6
-
Suprabh Shukla authored
Now that exact alarms are denied to newer app installs for apps targeting T, the deny list is obsolete and the overhead of maintaining it is not worthwhile. Test: atest CtsAlarmManagerTestCases Test: atest FrameworksMockingServicesTests:com.android.server.alarm Bug: 304846238 Change-Id: I4376e5ddbb2e470f3e3d690dd0866f4b470f455b
-
Kweku Adams authored
Bug: 299329948 Change-Id: If1f6ef1a950ee93c2cb4413205c87a9454734573 Test: N/A
-
- Oct 12, 2023
-
-
Kweku Adams authored
If the persisted files have somehow accumulated duplicate versions of the same job (identified by uid-namespace-jobId), then drop the duplicates and only keep one. Bug: 289062813 Bug: 296890885 Test: atest JobStoreTest Change-Id: I3179261309031801f0506cf905206376e59af1fe (cherry picked from commit c8fbd937) Merged-In: I3179261309031801f0506cf905206376e59af1fe
-
Kweku Adams authored
The system may be busy when trying to bind to the app, so don't penalize it for slow binding. Now, we'll retain the job that was slow to bind and stop triggering an ANR. Bug: 292090044 Bug: 303533836 Test: atest CtsJobSchedulerTestCases:JobSchedulingTest Change-Id: Ida52d63c5e9710d9d590388d20fceb4fa8f2e0d5 (cherry picked from commit 71fdfd48) Merged-In: Ida52d63c5e9710d9d590388d20fceb4fa8f2e0d5
-
- Oct 11, 2023
-
-
Kweku Adams authored
Reduce the prefetch job launch time threshold to one hour so we will only consider running a prefetch job at most one hour before the app is estimated to be launched. Bug: 295046507 Test: atest FrameworksMockingServicesTests:PrefetchControllerTest Change-Id: Ia3d4d049fb44b8f12418c987425949b60b37bd65
-
- Oct 09, 2023
-
-
Kweku Adams authored
The system may be busy when trying to bind to the app, so don't penalize it for slow binding. Now, we'll retain the job that was slow to bind and stop triggering an ANR. Bug: 292090044 Bug: 303533836 Test: atest CtsJobSchedulerTestCases:JobSchedulingTest Change-Id: Ida52d63c5e9710d9d590388d20fceb4fa8f2e0d5
-
- Oct 04, 2023
-
-
Kweku Adams authored
Make it possible to increase the light idle time linearly instead of exponentially. Bug: 299329948 Test: atest DeviceIdleTest Test: atest FrameworksMockingServicesTests:DeviceIdleControllerTest Change-Id: I4e7c07fa1d2653446ae5617f11fbd26ec39438ab
-
Kweku Adams authored
Only let prefetch jobs use the opportunistic quota when the device is on charger to reduce excess battery drain. The opportunistic quota usage behavior is optional and not required for prefetch jobs, so we can disable it without impacting app or developer expectations. Bug: 295046507 Bug: 299329948 Test: atest FrameworksMockingServicesTests:ConnectivityControllerTest Test: atest FrameworksMockingServicesTests:PrefetchControllerTest Change-Id: Idc137279fea1100f53ecf20279153fe92fdb5617
-
- Sep 28, 2023
-
-
Anna Zhuravleva authored
Platform_testing large test annotation is for host side tests and restricted, device tests should use androidx annotation. Bug: 293837621 Test: presubmit Change-Id: I835c4c837fa2074c937d7068f17c75467fb213dc
-
- Sep 22, 2023
-
-
Kweku Adams authored
The statsd logging was incorrectly logging for only the source app. Including the calling app will enable better metrics and debugging. Bug: 138239687 Test: statsd_testdrive 8 while running CtsSyncManagerTestsCases Test: statsd_testdrive 150 while running CtsSyncManagerTestsCases Change-Id: I9ba3097135b1f11368df800b043d730d780f3a33
-
- Sep 20, 2023
-
-
Prem Edhara authored
Bug: 294435720 Test: build Change-Id: I3a788a7202827623b50d25b0a71bd6237a04d47c
-
- Sep 19, 2023
-
-
Prem Edhara authored
Bug: 294435720 Test: atest FrameworksMockingServicesTests: com.android.server.DeviceIdleControllerTest Change-Id: I908b0a8db05ef0feb19c5ecab47c1065295d17a4
-
- Sep 14, 2023
-
-
Tej Singh authored
The background thread is prone to severe delays in processing time near boot, which causes pull timeouts and event queue overflow in statsd. The vast majority of pullers use the DIRECT_EXECUTOR to execute pulls in the incoming binder thread, so move these pulled atoms to do the same thing. More context is in the bug and linked docs. Bug: 298133385 Test: verified via boot traces that the pull durations are shorter and that the pulls no longer happen in the background thread Change-Id: I67a3d583cc13d9547dfe7108897e95f4a5238d26 Merged-In: I67a3d583cc13d9547dfe7108897e95f4a5238d26 (cherry picked from commit 5c85f29b)
-
- Sep 11, 2023
-
-
Jakob Schneider authored
Bug: 298968496 Test: PackageInstallerArchiveTest.java Change-Id: Ic9669cc76e7a37455d773d00268130426b2a5165
-