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

Skip to content
Commit 125c6eee authored by Philip P. Moltmann's avatar Philip P. Moltmann
Browse files

Only set MODE_FOREGROUND when fg app is granted

This changes the code path where we have a pre-Q app that declared a
location permissions. In this case the background permission is added as
an implicit permission.

We never want to automatically extend the grant to the background
permission. I.e. If the original permission is granted, we want to switch to
foreground mode.

If the original permission is revoked, the app-ops
state does not matter as everybody is supposed to check for both
permission and app-op. Still, setting the app-op to foreground is
confusing. Let's not do this.

Test: Looked at app-ops state that ...
      - targets pre-Q
      - requests location
      - does not get any permissions pregranted
      ... and verified that no app-op is set after fresh boot

Change-Id: Ic0a6feba98ca553a1ff66cdc348ceb2ca40217ee
parent 5acec68d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment