Remove demotion flags when a JobWorkItem is enqueued.
Remove the demotion flags from a user-initiated job if the app successfully enqueues a new JobWorkItem. If an app successfully enqueues a JobWorkItem to a UI job, then the app is in a state to successfully schedule a UI job. Presumably, the user has asked for this additional bit of work, so it makes sense to remove the demotion flags. For now, we only do this for UI jobs since they have strict scheduling requirements. It's harder to assume other jobs were scheduled due to user interaction/request. This mimics the behavior when a UI job is rescheduled (without adding a JobWorkItem). Internal flags aren't copied over when a job is rescheduled. Bug: 281838527 Test: atest FrameworksMockingServicesTests:JobStatusTest Change-Id: I591afc7c0ac23fa0bda646fd12053be58ff5d4ee
Loading
Please register or sign in to comment