Create multiple temp allowlist types.
1. In BroadcastOptions, create multiple temp allowlist types,
TEMPORARY_WHITELIST_TYPE_FOREGROUND_SERVICE_ALLOWED is the default which
allows both DeviceIdleController temp allowlist behavior and FGS start
from background.
TEMPORARY_WHITELIST_TYPE_FOREGROUND_SERVICE_NOT_ALLOWED
only allows DeviceIdleController temp allowlist behavior.
2. Create FgsStartTempAllowList class to contain the UIDs that is
temporarily allowed to start FGS from background.
Bug: 171305836
Test: atest cts/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java#testTempAllowListType
Change-Id: I32a14d675550cd262976bb8e16a48a070387d318
6 files changed