Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 943475cc authored by Varun Shah's avatar Varun Shah
Browse files

Update Service#onTimeout implementation.

- Time limit information will now be stored on a per-fgs type for each
  uid instead of simply relying on fgs-launch-eligibility status.

- If the app has not started an fgs for the specific type in the past
  24 hours, reset the time limit for that type.

- If the app has been in the TOP state since the last time the timeout
  callback was triggered, reset the time limit for that type. Otherwise,
  throw a ForegroundServiceStartNotAllowedException.

- If the app starts a FGS with multiple time-restricted types, apply the
  most lenient time limit instead of the most restricted one.

- Also ensure the book-keeping is updated correctly when switching
  between time-restricted types.

Bug: 330399444
Test: atest CtsFgsTimeoutTestCases
Test: atest CtsAppTestCases
Change-Id: Ie5dfc1719bc8124e8f3807c2e9095cd141d42819
parent b4f70d30
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment