Skip to content
Snippets Groups Projects
  1. May 29, 2024
    • lijilou's avatar
      JobSchedulerService:fix arrayIndexOutOfBoundsException to aviod · a8e15e02
      lijilou authored
      systemServer crash.
      
      As can be seen from the AOSP code, the set collection mTrackedTasks is accessed under mLock, but there is no mLock lock in the reportNewIdleState function. Therefore, we should put onControllerStateChanged into the mLock lock for execution, just like all other Controllers calling this method with mLock, there is no risk of deadlock.
      
      Test: OEM monkey test
      Bug: 342554438
      Change-Id: I596defa8ca018a7161cd149a54a029f6adb96937
      a8e15e02
  2. May 23, 2024
  3. May 17, 2024
  4. May 15, 2024
  5. May 14, 2024
    • Xin Guan's avatar
      Avoid app idle check on boot. · d4dae380
      Xin Guan authored
      - Avoid app idle check during the boot up
      - Avoid duplicate STANDBY_BUCKET_CHANGE usage event
        reporting during the boot up.
      - Logging fix.
      
      Bug: 337864590
      Test: atest CtsUsageStatsTestCases:UsageStatsTest
      Test: atest FrameworksServicesTests:AppIdleHistoryTests
      Test: atest FrameworksServicesTests:AppStandbyControllerTests
      Change-Id: Iee31b50be48dc38c25dd6c885535ab9426edff4a
      d4dae380
  6. May 10, 2024
  7. May 09, 2024
    • Sanath Kumar's avatar
      Restrict foreground jobs on thermal events · 11c11ec8
      Sanath Kumar authored
      Foreground jobs are now restricted for THERMAL_STATUS_MODERATE and
      higher. Only user-initiated foreground jobs are not restricted on
      THERMAL_STATUS_MODERATE status. Partial restrictions are applied for
      expedited, high priority and important-while-foreground jobs. These jobs
      are allowed to run only if
      
      1. They haven't previously run
      2. They're already running and aren't yet in overtime
      
      Test: Unit test ThermalStatusRestrictionTest and JobSchedulerServiceTest
      passes
      Bug: 315157163
      Flag: com.android.server.job.thermal_restrictions_to_fgs_jobs
      
      Change-Id: Id63c0f14ca43fd7c8c73ea670a96c435c46c7354
      11c11ec8
    • Sudheer Shanka's avatar
      Update help text for the query-blob-existence command. · 64b99148
      Sudheer Shanka authored
      Test: n/a
      Change-Id: If80589c06c9366c042aba22c5af471b217a21e03
      64b99148
  8. May 08, 2024
    • Sanath Kumar's avatar
      Refactor ThermalStatusRestriction · ebb62de7
      Sanath Kumar authored
      Encapsulate checking of Job Bias(Procstate) in ThermalStatusRestriction.
      This improves extensibility of the code.
      
      Test: Unit test ThermalStatusRestrictionTest and JobSchedulerServiceTest
      passes
      Bug: 315157163
      
      Change-Id: Ide560967e8a0448f02de53502d414f703a34618a
      ebb62de7
  9. May 07, 2024
  10. May 06, 2024
    • Nan Wu's avatar
      RESTRICT AUTOMERGE Backport preventing BAL bypass via bound service · 95b71ad8
      Nan Wu authored
      Apply similar fix for WallpaperService to TextToSpeech Service,
      Job Service, Print Service, Sync Service and MediaRoute2Provider Service
      
      Bug: 232798473, 232798676, 336490997
      Test: Manual test. BackgroundActivityLaunchTest
      Change-Id: Ib113e45aa18296b4475b90d6dcec5dd5664f4c80
      95b71ad8
  11. May 03, 2024
    • Nan Wu's avatar
      Allow tile services to start foreground service when tile is clicked · c5ea08c6
      Nan Wu authored
      Add the tile service app to temp allow list for 15 seconds to allow
      it to start a foreground service during that short period.
      
      Flag: NA
      Bug: 329242921
      Test: Manual test. CtsTileServiceTestCases, TileLifecycleManagerTest, CtsSystemUiHostTestCases
      Change-Id: I26d4fb94162c88e3320d8b308c3cdec48b7e73b2
      c5ea08c6
    • Oriol Prieto Gasco's avatar
      RESTRICT AUTOMERGE · 7b816129
      Oriol Prieto Gasco authored
      Set the container field of aconfig flags
      
      Test: printflags --format='{package}:{container}:' | grep "::"
      Bug: 312769710
      Flag: NONE
      Change-Id: I84fda0d5e9813940609436d825738ff786908ff0
      7b816129
  12. Apr 26, 2024
    • Suprabh Shukla's avatar
      Allow jobs to bypass blocked reason APP_BACKGROUND · 0e1e8240
      Suprabh Shukla authored
      All jobs should be allowed to bypass the blocked reason app_background.
      Once the job starts running, NPMS will unblock this app.
      
      Test: atest CtsJobSchedulerTestCases:\
      JobThrottlingTest#testJobsInRestrictedBucket_WithRequiredNetwork
      
      Bug: 330742301
      Change-Id: Iab652a45a713392a81fe351a4a63cb95c452728d
      0e1e8240
  13. Apr 25, 2024
    • Tetiana Meronyk's avatar
      Only rewrite file when there has been a change to a list of users · 0625939a
      Tetiana Meronyk authored
      Due to I/O operations being performed on BG thread, every call, especially during user boot, adds to the overall performance impact. This change adds extra checks to ensure writing only happens when the change occured.
      
      Bug: 331980379
      Bug: 335667295
      Test: perfetto trace && manual
      Change-Id: I86c04ef7307b10e6336b80699c1091f107d8d1bc
      0625939a
  14. Apr 22, 2024
    • Shai Barack's avatar
      Use PriorityQueue for tracked Jobs · 806f7768
      Shai Barack authored
      Previously this code kept an ordered list in a LinkedList.
      Using PriorityQueue, with the element ordering as the priority, reduces code
      complexity and also reduces runtime complexity (PQ ops are logN).
      
      Randomly noticed this while looking at profiles of l3d cache refills in
      system_server. This method was responsible for 0.815% of l3d cache refills.
      
      Change-Id: I0c0bf358e68fef09c8ebcdbe8e5e53ef82cab387
      806f7768
  15. Apr 19, 2024
  16. Apr 17, 2024
    • Xin Guan's avatar
      Revert^2 Fix job count out of quota. · 28321bb7
      Xin Guan authored
      Bug: 300862949
      Test: atest FrameworksMockingServicesTests:QuotaControllerTest
            atest CtsJobSchedulerTestCases
      Change-Id: Ib19343900096aa6afa3bdb610ac2d722ce23feb0
      28321bb7
  17. Apr 16, 2024
    • Varun Shah's avatar
      Remove the RUN_BACKUP_JOBS permission. · 5b7664fd
      Varun Shah authored
      Also remove the associated intent and update the app op definition.
      
      Bug: 333624438
      Test: atest CtsAppOpsTestCases
      Test: atest JobStatusTest
      Change-Id: I39482c8888a51cf24e4964e4aa32175a16da3f2d
      5b7664fd
  18. Apr 15, 2024
    • Pavel Grafov's avatar
      Ensure user can't block bg usage for protected pkg · 47c1efbd
      Pavel Grafov authored
      Also ensure that standby buckets are refreshed after changing protected
      packages, so that the apps are put into exempt bucket promptly.
      
      Bug: 326031059
      Test: manual
      Test: atest CtsDevicePolicyTestCases:android.devicepolicy.cts.UserControlDisabledPackagesTest
      Change-Id: I5951b7c3e8fbc9ec81e8df1cd6e0d017bb4b452f
      47c1efbd
  19. Apr 11, 2024
  20. Apr 09, 2024
    • Xin Guan's avatar
      Revert "Fix job count out of quota." · d05e6f92
      Xin Guan authored
      This reverts commit 4953686b.
      
      Bug:300862949
      Test: atest FrameworksMockingServicesTests:QuotaControllerTest
      Test: atest CtsJobSchedulerTestCases
      Change-Id: Ie05d2ae6e4d9b97c4b3be171c9ae7d76329fb850
      d05e6f92
  21. Apr 08, 2024
  22. Apr 05, 2024
    • Jeongik Cha's avatar
      Add //visibility:any_system_partition · 0431bac2
      Jeongik Cha authored
      system image which is declared in Android.bp should include the module.
      
      Bug: 321000103
      Test: m nothing
      Change-Id: I238c6459a6ff521796ef142c8e9d4e88d3293f44
      0431bac2
  23. Apr 04, 2024
  24. Apr 03, 2024
    • Dennis Shen's avatar
      assign aconfig package owning container · 443b3c6f
      Dennis Shen authored
      Bug: 330354107
      Test: CI
      
      Flag: NONE
      
      Ignore-AOSP-First: It is easier to detect all the mismatch in internal
      master.
      
      Change-Id: I91a49bdebd4a8fd0def393b0f43bf283ce86721a
      443b3c6f
  25. Apr 02, 2024
    • Xin Guan's avatar
      Fix job count out of quota. · 4953686b
      Xin Guan authored
      Bug: 300862949
      Test: atest FrameworksMockingServicesTests:QuotaControllerTest
      
      Change-Id: I65305ffb0d4884c8ef13885d09d92a46a3fd1bfc
      4953686b
  26. Mar 30, 2024
  27. Mar 29, 2024
    • Tim Murray's avatar
      JobScheduler: remove TARE · 4a98dd23
      Tim Murray authored
      Test: atest CtsJobSchedulerTestCases
      Test: atest CtsAlarmManagerTestCases
      Test: atest FrameworksMockingServicesTests:com.android.server.job
      Test: atest FrameworksMockingServicesTests:com.android.server.alarm
      Bug: 331617295
      
      Change-Id: Ie86dec1d669a5a39800499eaa270776343cc0d3e
      4a98dd23
    • Jared Duke's avatar
      Clean up reflection-related services keep rules · 5123eb38
      Jared Duke authored
      Prefer using annotations (@UsesReflection + @UsedByReflection) for
      various classes that are instantiated via reflection in system server.
      The auto-generated keep rules are comparable to the existing ones, but
      are easier to maintain and more targeted.
      
      Test: m + diff services.jar for equivalent output
      Bug: 210510433
      Change-Id: I306b4533f723ee7fafba1de12d7fe446544f8ce7
      5123eb38
    • Varun Shah's avatar
      Update SAW exemption for user-initiated jobs. · 39e4711d
      Varun Shah authored
      Since apps with the SYSTEM_ALERT_WINDOW permission are no longer
      allowed to start fgs from the background, update the exemption for
      user-initiated jobs as well to keep the background start conditions
      in sync. Apps will now need to also be showing a visible overlay
      window in order to use this exemption.
      
      Bug: 328795341
      Test: atest UserInitiatedJobTest
      Change-Id: I2cfb0229ab023b4389968a8135202db0cafca937
      39e4711d
  28. Mar 27, 2024
    • Kweku Adams's avatar
      Add shell commands to set flex policy. · e6b9f110
      Kweku Adams authored
      Add shell commands to allow tests and developers to enable, disable, and
      reset flex policy for testing and local development.
      
      Bug: 244734471
      Test: atest CtsJobSchedulerTestCases:FlexibilityConstraintTest
      Change-Id: Id79d9b9ce93e4699d68ee76c1d1d7eba0b2c8815
      e6b9f110
  29. Mar 26, 2024
    • Tetiana Meronyk's avatar
      Implement user start before alarms go off · 8ca5a040
      Tetiana Meronyk authored
      Before this change alarms in multiuser environment were not consistent. If the user was stopped, their alarm did not go off. Since user stops happen without user's explicit interaction and their status is not available to regular users, if the alarm was set on background user, there was no certainty that the alarm would ring.
      
      After the change a list of users with alarms scheduled is stored to start them in background shortly before their alarm. This ensures consistency in alarms going off even if the user gets stopped. Persistence of this list was added to save this list even after device reboots.
      
      Bug: 314907186
      Test: atest AlarmManagerServiceTest && atest UserWakeupStoreTest
      Change-Id: I5a75813d76f505383909ac6a281902c54784a1ed
      8ca5a040
    • Varun Shah's avatar
      Hide the new RUN_BACKUP_JOBS permission. · 12007ca9
      Varun Shah authored
      This permission will be re-introduced in a future release. Hide the
      permission and the associated intent.
      
      Bug: 331272951
      Test: builds/flashes
      Test: atest CtsAppOpsTest
      Test: atest JobStatusTest
      Test: visual (Settings pages)
      Change-Id: I4b9bb6ccb9075c07c84b7c8197bdf4d0aabd6306
      12007ca9
  30. Mar 21, 2024
    • Oriol Prieto Gasco's avatar
      Export flags used in FlaggedApi annotations · 8f557865
      Oriol Prieto Gasco authored
      Before calling a flagged API, client code must check the value of the flag
      which gates it. Those flags must be exported in order to be accessible from
      containers other than the container where the flag and the API are hosted.
      
      Bug: 320984775
      Bug: 322839671
      
      Test: m all_aconfig_declarations
      Test: printflags --format='{fully_qualified_name}:{is_exported}' | grep true
      
      Ignore-AOSP-First: LSC
      Change-Id: I8c2d111fd4ffb23f3f52c9d00bf6bbd2456d7f05
      8f557865
Loading