/frameworks/base/cmds/idmap2/tests/ |
D | IdmapTests.cpp | 142 const auto idmap = std::move(*result); in TEST() local 144 ASSERT_THAT(idmap->GetHeader(), NotNull()); in TEST() 145 ASSERT_EQ(idmap->GetHeader()->GetMagic(), 0x504d4449U); in TEST() 146 ASSERT_EQ(idmap->GetHeader()->GetVersion(), 0x09U); in TEST() 147 ASSERT_EQ(idmap->GetHeader()->GetTargetCrc(), 0x1234U); in TEST() 148 ASSERT_EQ(idmap->GetHeader()->GetOverlayCrc(), 0x5678U); in TEST() 149 ASSERT_EQ(idmap->GetHeader()->GetFulfilledPolicies(), kIdmapRawDataPolicies); in TEST() 150 ASSERT_EQ(idmap->GetHeader()->GetEnforceOverlayable(), true); in TEST() 151 ASSERT_EQ(idmap->GetHeader()->GetTargetPath(), kIdmapRawTargetPath); in TEST() 152 ASSERT_EQ(idmap->GetHeader()->GetOverlayPath(), kIdmapRawOverlayPath); in TEST() [all …]
|
D | PrettyPrintVisitorTests.cpp | 45 const auto idmap = Idmap::FromContainers(**target, **overlay, TestConstants::OVERLAY_NAME_DEFAULT, in TEST() local 47 ASSERT_TRUE(idmap); in TEST() 51 (*idmap)->accept(&visitor); in TEST() 66 const auto idmap = Idmap::FromBinaryStream(raw_stream); in TEST() local 67 ASSERT_TRUE(idmap); in TEST() 71 (*idmap)->accept(&visitor); in TEST()
|
D | Idmap2BinaryTests.cpp | 56 void AssertIdmap(const Idmap& idmap, const std::string& target_apk_path, in AssertIdmap() argument 60 ASSERT_EQ(idmap.GetHeader()->GetMagic(), kIdmapMagic); in AssertIdmap() 61 ASSERT_EQ(idmap.GetHeader()->GetVersion(), kIdmapCurrentVersion); in AssertIdmap() 62 ASSERT_EQ(idmap.GetHeader()->GetTargetPath(), target_apk_path); in AssertIdmap() 63 ASSERT_EQ(idmap.GetHeader()->GetOverlayPath(), overlay_apk_path); in AssertIdmap() 64 ASSERT_EQ(idmap.GetData().size(), 1U); in AssertIdmap() 104 const auto idmap = Idmap::FromBinaryStream(fin); in TEST_F() local 107 ASSERT_TRUE(idmap); in TEST_F() 108 ASSERT_IDMAP(**idmap, GetTargetApkPath(), GetOverlayApkPath()); in TEST_F()
|
D | RawPrintVisitorTests.cpp | 58 const auto idmap = Idmap::FromContainers(**target, **overlay, TestConstants::OVERLAY_NAME_DEFAULT, in TEST() local 60 ASSERT_TRUE(idmap); in TEST() 64 (*idmap)->accept(&visitor); in TEST() 108 const auto idmap = Idmap::FromBinaryStream(raw_stream); in TEST() local 109 ASSERT_TRUE(idmap); in TEST() 113 (*idmap)->accept(&visitor); in TEST()
|
/frameworks/base/cmds/idmap2/idmap2/ |
D | Dump.cpp | 53 const auto idmap = Idmap::FromBinaryStream(fin); in Dump() local 55 if (!idmap) { in Dump() 56 return Error(idmap.GetError(), "failed to load idmap"); in Dump() 61 (*idmap)->accept(&visitor); in Dump() 64 (*idmap)->accept(&visitor); in Dump()
|
D | Create.cpp | 107 const auto idmap = Idmap::FromContainers(**target, **overlay, overlay_name, fulfilled_policies, in Create() local 109 if (!idmap) { in Create() 110 return Error(idmap.GetError(), "failed to create idmap"); in Create() 120 (*idmap)->accept(&visitor); in Create()
|
D | CreateMultiple.cpp | 118 const auto idmap = in CreateMultiple() local 120 if (!idmap) { in CreateMultiple() 133 (*idmap)->accept(&visitor); in CreateMultiple()
|
/frameworks/base/libs/androidfw/tests/data/overlay/ |
D | build | 31 --overlay-apk-path overlay/overlay.apk --idmap-path overlay/overlay.idmap
|
/frameworks/base/cmds/idmap2/libidmap2/ |
D | Idmap.cpp | 294 std::unique_ptr<Idmap> idmap(new Idmap()); in FromBinaryStream() local 296 idmap->header_ = IdmapHeader::FromBinaryStream(stream); in FromBinaryStream() 297 if (!idmap->header_) { in FromBinaryStream() 308 idmap->data_.push_back(std::move(data)); in FromBinaryStream() 311 return {std::move(idmap)}; in FromBinaryStream() 403 std::unique_ptr<Idmap> idmap(new Idmap()); in FromContainers() local 405 idmap->header_ = std::move(header); in FromContainers() 406 idmap->data_.push_back(std::move(*idmap_data)); in FromContainers() 408 return {std::move(idmap)}; in FromContainers()
|
D | PrettyPrintVisitor.cpp | 33 void PrettyPrintVisitor::visit(const Idmap& idmap ATTRIBUTE_UNUSED) { in visit()
|
D | BinaryStreamVisitor.cpp | 49 void BinaryStreamVisitor::visit(const Idmap& idmap ATTRIBUTE_UNUSED) { in visit()
|
D | RawPrintVisitor.cpp | 34 void RawPrintVisitor::visit(const Idmap& idmap ATTRIBUTE_UNUSED) { in visit()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/om/ |
D | OverlayManagerServiceImplTests.java | 250 final FakeIdmapDaemon.IdmapHeader idmap = idmapd.getIdmap(overlayPath); in testConfigSignaturePolicyOk() local 251 assertEquals(CONFIG_SIGNATURE, CONFIG_SIGNATURE & idmap.policies); in testConfigSignaturePolicyOk() 270 final FakeIdmapDaemon.IdmapHeader idmap = idmapd.getIdmap(overlayPath); in testConfigSignaturePolicyCertNok() local 271 assertEquals(0, CONFIG_SIGNATURE & idmap.policies); in testConfigSignaturePolicyCertNok() 287 final FakeIdmapDaemon.IdmapHeader idmap = idmapd.getIdmap(overlayPath); in testConfigSignaturePolicyNoConfig() local 288 assertEquals(0, CONFIG_SIGNATURE & idmap.policies); in testConfigSignaturePolicyNoConfig() 303 final FakeIdmapDaemon.IdmapHeader idmap = idmapd.getIdmap(overlayPath); in testConfigSignaturePolicyNoRefPkg() local 304 assertEquals(0, CONFIG_SIGNATURE & idmap.policies); in testConfigSignaturePolicyNoRefPkg() 323 FakeIdmapDaemon.IdmapHeader idmap = idmapd.getIdmap(overlayPath); in testConfigSignaturePolicyRefPkgNotSystem() local 324 assertEquals(0, CONFIG_SIGNATURE & idmap.policies); in testConfigSignaturePolicyRefPkgNotSystem()
|
D | OverlayManagerServiceImplTestsBase.java | 497 final IdmapHeader idmap = mIdmapFiles.get(overlayPath); in verifyIdmap() local 498 if (idmap == null) { in verifyIdmap() 501 return idmap.isUpToDate(getCrc(targetPath), getCrc(overlayPath), targetPath, policies, in verifyIdmap()
|
/frameworks/base/cmds/idmap2/self_targeting/ |
D | SelfTargeting.cpp | 159 const auto idmap = Idmap::FromContainers(**target, **overlay, overlayName, in CreateIdmapFile() local 161 if (!idmap) { in CreateIdmapFile() 163 idmap.GetErrorMessage().c_str()); in CreateIdmapFile() 175 (*idmap)->accept(&visitor); in CreateIdmapFile()
|
/frameworks/base/cmds/idmap2/idmap2d/ |
D | Idmap2Service.cpp | 184 const auto idmap = Idmap::FromContainers(*GetPointer(*target), **overlay, overlay_name, in createIdmap() local 186 if (!idmap) { in createIdmap() 187 return error(idmap.GetErrorMessage()); in createIdmap() 197 (*idmap)->accept(&visitor); in createIdmap() 440 const auto idmap = Idmap::FromBinaryStream(fin); in dumpIdmap() local 442 if (!idmap) { in dumpIdmap() 443 return error(idmap.GetErrorMessage()); in dumpIdmap() 448 (*idmap)->accept(&visitor); in dumpIdmap()
|
/frameworks/base/libs/androidfw/ |
D | AssetManager.cpp | 244 if (mAssetPaths[i].idmap == idmapPath) { in addOverlayPath() 250 Asset* idmap = NULL; in addOverlayPath() local 251 if ((idmap = openAssetFromFileLocked(idmapPath, Asset::ACCESS_BUFFER)) == NULL) { in addOverlayPath() 258 if (!ResTable::getIdmapInfo(idmap->getBuffer(false), idmap->getLength(), in addOverlayPath() 261 delete idmap; in addOverlayPath() 264 delete idmap; in addOverlayPath() 287 oap.idmap = idmapPath; in addOverlayPath() 551 Asset* idmap = openIdmapLocked(ap); in appendPathToResTable() local 586 sharedRes->add(ass, idmap, nextEntryIdx + 1, false); in appendPathToResTable() 615 mResources->add(ass, idmap, nextEntryIdx + 1, !shared, appAsLib, ap.isSystemAsset); in appendPathToResTable() [all …]
|
D | Android.bp | 260 "tests/data/**/*.idmap",
|
D | ResourceTypes.cpp | 274 static bool assertIdmapHeader(const void* idmap, size_t size) { in assertIdmapHeader() argument 275 if (reinterpret_cast<uintptr_t>(idmap) & 0x03) { in assertIdmapHeader() 285 const uint32_t magic = htodl(*reinterpret_cast<const uint32_t*>(idmap)); in assertIdmapHeader() 292 const uint32_t version = htodl(*(reinterpret_cast<const uint32_t*>(idmap) + 1)); in assertIdmapHeader() 398 status_t parseIdmap(const void* idmap, size_t size, uint8_t* outPackageId, KeyedVector<uint8_t, Idm… in parseIdmap() argument 399 if (!assertIdmapHeader(idmap, size)) { in parseIdmap() 410 reinterpret_cast<const uint8_t*>(idmap) + ResTable::IDMAP_HEADER_SIZE_BYTES); in parseIdmap() 7538 bool ResTable::getIdmapInfo(const void* idmap, size_t sizeBytes, in getIdmapInfo() argument 7543 const uint32_t* map = (const uint32_t*)idmap; in getIdmapInfo()
|
/frameworks/base/cmds/idmap2/include/idmap2/ |
D | PrettyPrintVisitor.h | 37 void visit(const Idmap& idmap) override;
|
D | BinaryStreamVisitor.h | 33 void visit(const Idmap& idmap) override;
|
D | RawPrintVisitor.h | 38 void visit(const Idmap& idmap) override;
|
D | Idmap.h | 312 virtual void visit(const Idmap& idmap) = 0;
|
/frameworks/base/libs/androidfw/include/androidfw/ |
D | AssetManager.h | 220 asset_path() : path(""), rawFd(-1), type(kFileTypeRegular), idmap(""), in asset_path() 225 String8 idmap; member
|
D | ResourceTypes.h | 2276 static bool getIdmapInfo(const void* idmap, size_t size,
|