OSDN Git Service

DO NOT MERGE. Persistable Uri grants still require permissions.
authorJeff Sharkey <jsharkey@android.com>
Tue, 7 Aug 2018 21:02:17 +0000 (15:02 -0600)
committerRyan Longair <rlongair@google.com>
Thu, 30 Aug 2018 20:35:48 +0000 (13:35 -0700)
commitb2f8ab8e21c12070d165a00adeb68cae5f38014b
tree3bdff4d61584fc25c4fd395a907a2705acc527f9
parent6d2b12ff0b71b302c2e011fa0ff98b61c835a728
DO NOT MERGE. Persistable Uri grants still require permissions.

When FLAG_GRANT_PERSISTABLE_URI_PERMISSION is requested, we still
need to check permissions between the source and target packages,
instead of shortcutting past them.

The spirit of the original change is remains intact: if the caller
requested FLAG_GRANT_PERSISTABLE_URI_PERMISSION, then we avoid
returning "-1", which would prevent the grant data structure from
being allocated.

Bug: 111934948
Test: atest android.appsecurity.cts.AppSecurityTests
Change-Id: Ief0fc922aa09fc3d9bb6a126c2ff5855347cd030
Merged-In: Ief0fc922aa09fc3d9bb6a126c2ff5855347cd030
(cherry picked from commit 05519b7e3d0f3d16ddfe6ee3892c8468a2c10c62)
services/core/java/com/android/server/am/ActivityManagerService.java