Force set storage state to ensure immediate intent delivery

The TimingConstraintsTest:testJobParameters_expiredDeadline test
occasionally fails because the job runs before its deadline expires.
This occurs when a job has both a deadline and a "storage not low"
constraint. The test simulates the "storage not low" state using
setStorageStateLow(boolean low). However, the tearDown() method restores
the storage state to its original value. This restoration doesn't force
an immediate intent to report the storage status, allowing the job to
run prematurely.

This fix addresses the issue by forcing the storage state to ensure the
corresponding intent is sent immediately, preventing the job from
running before its deadline.

Bug: 399921245
Flag: TEST_ONLY
Test: atest --rerun-until-failure 500 CtsJobSchedulerTestCases:android.jobscheduler.cts.TimingConstraintsTest

Change-Id: Ib48b56588479c1d2402de2adfd859c4d88019bff
1 file changed