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

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

Do not add permission while cleaning permissions state

A app might reuqest a permission it might never get such as e.g. a
platform signature permission. In this case the permission is in
ps.pkg.requestedPermissions but not in ps.getPermissionsState.

Before this change the code decided that the flags changed hence it
called permissionsState.updatePermissionFlags for this never grantable
permission which then added the permission via ensurePermissionData.

If this was a pre-M app this lead to the permission appearing granted as
all permissions a pre-M app has are granted. If the permission does not
have a appOp, the permission becomes actually granted.

Fixes: 112044785
Test: Repreated repro case as in the bug
      atest PermissionsHostTest

Change-Id: I0c0ea1bb06893f9b3edc37238ea57175da7dd86f
parent bd493762
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