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

Skip to content
Commit eaca4c50 authored by Svetoslav Ganov's avatar Svetoslav Ganov
Browse files

Properly map runtime permissions to app ops

The code assumed mapping from a permission to an app op
is one to one but this is not always the case. For example,
READ_SMS is mapped to OP_READ_SMS and OP_READ_ICC_SMS which
resulted mapping the READ_SMS permission to the OP_READ_ICC_SMS
instead of OP_READ_SMS resulting in a failure to find the op
name given the permission.

This breaks the AppOpsManager.permissionToOp() API for READ_SMS
returning null instead of OPST_READ_SMS. The consequence of this
is that the apps that proxy permission protected operations may
let the operations for READ_SMS go through as they would get a
null app op, i.e. no app op while there is one and it can be
disabled for the caller.

bug:28620132

Change-Id: I92f8ef375ae2122b7266c50653ce73f3d90f4b28
parent c1ff12ec
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