Introduce new enum values for BAL mode
Two new flag values that in the long term should replace MODE_BACKGROUND_ACTIVITY_START_ALLOWED.
MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS - allow activity starts at any time - either based on permission or based on visibility. This includes BAL permissions granted by the now deprecated setPendingIntentBackgroundActivityLaunchAllowed method.
MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS - allows activity starts only based on visibility. This is a much safer option for apps sending PendingIntents, since this typically means the user is interacting with that app to trigger the start.
Test: atest BackgroundActivityLaunchTest BackgroundActivityStartContriller*Test
Flag: com.android.window.flags.bal_additional_start_modes
Bug: 352182359
Change-Id: I84500ccf585bc50a29e96e7a0232474102382987
2 files changed