summaryrefslogtreecommitdiff
path: root/cmds/idmap2/libidmap2/ResourceMapping.cpp
diff options
context:
space:
mode:
authorAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-02-27 18:32:31 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-02-27 18:32:31 +0000
commit832fe4a42415a9e2930a58ebcaf30375b32c9f5d (patch)
treec76b46ebb7c3e06cb45fae1d871a1fc4eb4b28b1 /cmds/idmap2/libidmap2/ResourceMapping.cpp
parentd7b7b5defee4ca2616c0afb2ad9a49a902d5eb5f (diff)
parentb0c5105b2da2fd4228a1344c8ef2dab6f1ec17a6 (diff)
Merge changes from topic "actor-signature-policy-rvc-dev" into rvc-dev am: b0c5105b2d
Change-Id: I55a362a896901a09fc1bf49f9129455d53b2d440
Diffstat (limited to 'cmds/idmap2/libidmap2/ResourceMapping.cpp')
-rw-r--r--cmds/idmap2/libidmap2/ResourceMapping.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/cmds/idmap2/libidmap2/ResourceMapping.cpp b/cmds/idmap2/libidmap2/ResourceMapping.cpp
index 43cfec3f9cf9..f82c8f1af713 100644
--- a/cmds/idmap2/libidmap2/ResourceMapping.cpp
+++ b/cmds/idmap2/libidmap2/ResourceMapping.cpp
@@ -24,11 +24,16 @@
#include <vector>
#include "android-base/stringprintf.h"
+#include "androidfw/ResourceTypes.h"
+#include "idmap2/PolicyUtils.h"
#include "idmap2/ResourceUtils.h"
using android::base::StringPrintf;
+using android::idmap2::utils::BitmaskToPolicies;
using android::idmap2::utils::IsReference;
using android::idmap2::utils::ResToTypeEntryName;
+using PolicyBitmask = android::ResTable_overlayable_policy_header::PolicyBitmask;
+using PolicyFlags = android::ResTable_overlayable_policy_header::PolicyFlags;
namespace android::idmap2 {
@@ -55,9 +60,8 @@ Result<Unit> CheckOverlayable(const LoadedPackage& target_package,
const PolicyBitmask& fulfilled_policies,
const ResourceId& target_resource) {
static constexpr const PolicyBitmask sDefaultPolicies =
- PolicyFlags::POLICY_ODM_PARTITION | PolicyFlags::POLICY_OEM_PARTITION |
- PolicyFlags::POLICY_SYSTEM_PARTITION | PolicyFlags::POLICY_VENDOR_PARTITION |
- PolicyFlags::POLICY_PRODUCT_PARTITION | PolicyFlags::POLICY_SIGNATURE;
+ PolicyFlags::ODM_PARTITION | PolicyFlags::OEM_PARTITION | PolicyFlags::SYSTEM_PARTITION |
+ PolicyFlags::VENDOR_PARTITION | PolicyFlags::PRODUCT_PARTITION | PolicyFlags::SIGNATURE;
// If the resource does not have an overlayable definition, allow the resource to be overlaid if
// the overlay is preinstalled or signed with the same signature as the target.