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

Skip to content
Commit 0d1ba2e8 authored by Achim Thesmann's avatar Achim Thesmann
Browse files

Prepare to restrict PI sender BAL privileges.

This prepares for a behavior change for an app that
- sends a PendingIntent created by another app
- does not explicitly set a value for `isPendingIntentBackgroundActivityLaunchAllowed`

Details about this change:

- We had to separate the state for BGFGS and BAL in the boolean used to
  represent both, while doing that we incorporated the token too,
  creating a new object BSP.
- The BackgroundStartPrivileges class now wraps the originatingToken and
  explicitly states the granted permissions.
- This BackgroundStartPrivileges object is passed through and is used to
  determine the correct permissions. This can probably be extended to
  handle while-in-use permissions as a separate case later too.
- The ComponentOptions API adds a new getter for apps to check on the
  validity of the `isPendingIntentBackgroundActivityLaunchAllowed`
  property.

Test: atest ActivityStarterTests BackgroundActivityLaunchTest
Change-Id: I467812f316de36edd5b36483a67db04fbd620735
Bug: 244637991
parent 622f76b7
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