Home
last modified time | relevance | path

Searched refs:idmap (Results 1 – 25 of 25) sorted by relevance

/frameworks/base/cmds/idmap2/tests/
DIdmapTests.cpp142 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(), 0x08U); 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 …]
DPrettyPrintVisitorTests.cpp45 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()
DIdmap2BinaryTests.cpp57 void AssertIdmap(const Idmap& idmap, const std::string& target_apk_path, in AssertIdmap() argument
61 ASSERT_EQ(idmap.GetHeader()->GetMagic(), kIdmapMagic); in AssertIdmap()
62 ASSERT_EQ(idmap.GetHeader()->GetVersion(), kIdmapCurrentVersion); in AssertIdmap()
63 ASSERT_EQ(idmap.GetHeader()->GetTargetPath(), target_apk_path); in AssertIdmap()
64 ASSERT_EQ(idmap.GetHeader()->GetOverlayPath(), overlay_apk_path); in AssertIdmap()
65 ASSERT_EQ(idmap.GetData().size(), 1U); in AssertIdmap()
105 const auto idmap = Idmap::FromBinaryStream(fin); in TEST_F() local
108 ASSERT_TRUE(idmap); in TEST_F()
109 ASSERT_IDMAP(**idmap, GetTargetApkPath(), GetOverlayApkPath()); in TEST_F()
DRawPrintVisitorTests.cpp58 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()
106 const auto idmap = Idmap::FromBinaryStream(raw_stream); in TEST() local
107 ASSERT_TRUE(idmap); in TEST()
111 (*idmap)->accept(&visitor); in TEST()
/frameworks/base/cmds/idmap2/idmap2/
DDump.cpp53 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()
DCreate.cpp107 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()
DCreateMultiple.cpp118 const auto idmap = in CreateMultiple() local
120 if (!idmap) { in CreateMultiple()
133 (*idmap)->accept(&visitor); in CreateMultiple()
/frameworks/base/cmds/idmap2/libidmap2/
DIdmap.cpp252 std::unique_ptr<Idmap> idmap(new Idmap()); in FromBinaryStream() local
254 idmap->header_ = IdmapHeader::FromBinaryStream(stream); in FromBinaryStream()
255 if (!idmap->header_) { in FromBinaryStream()
266 idmap->data_.push_back(std::move(data)); in FromBinaryStream()
269 return {std::move(idmap)}; in FromBinaryStream()
350 std::unique_ptr<Idmap> idmap(new Idmap()); in FromContainers() local
352 idmap->header_ = std::move(header); in FromContainers()
353 idmap->data_.push_back(std::move(*idmap_data)); in FromContainers()
355 return {std::move(idmap)}; in FromContainers()
DBinaryStreamVisitor.cpp49 void BinaryStreamVisitor::visit(const Idmap& idmap ATTRIBUTE_UNUSED) { in visit()
DPrettyPrintVisitor.cpp33 void PrettyPrintVisitor::visit(const Idmap& idmap ATTRIBUTE_UNUSED) { in visit()
DRawPrintVisitor.cpp34 void RawPrintVisitor::visit(const Idmap& idmap ATTRIBUTE_UNUSED) { in visit()
/frameworks/base/libs/androidfw/tests/data/overlay/
Dbuild31 --overlay-apk-path overlay/overlay.apk --idmap-path overlay/overlay.idmap
/frameworks/base/cmds/idmap2/idmap2d/
DIdmap2Service.cpp184 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()
388 const auto idmap = Idmap::FromBinaryStream(fin); in dumpIdmap() local
390 if (!idmap) { in dumpIdmap()
391 return error(idmap.GetErrorMessage()); in dumpIdmap()
396 (*idmap)->accept(&visitor); in dumpIdmap()
/frameworks/base/services/tests/servicestests/src/com/android/server/om/
DOverlayManagerServiceImplTests.java251 final FakeIdmapDaemon.IdmapHeader idmap = idmapd.getIdmap(overlayPath); in testConfigSignaturePolicyOk() local
252 assertEquals(CONFIG_SIGNATURE, CONFIG_SIGNATURE & idmap.policies); in testConfigSignaturePolicyOk()
271 final FakeIdmapDaemon.IdmapHeader idmap = idmapd.getIdmap(overlayPath); in testConfigSignaturePolicyCertNok() local
272 assertEquals(0, CONFIG_SIGNATURE & idmap.policies); in testConfigSignaturePolicyCertNok()
288 final FakeIdmapDaemon.IdmapHeader idmap = idmapd.getIdmap(overlayPath); in testConfigSignaturePolicyNoConfig() local
289 assertEquals(0, CONFIG_SIGNATURE & idmap.policies); in testConfigSignaturePolicyNoConfig()
304 final FakeIdmapDaemon.IdmapHeader idmap = idmapd.getIdmap(overlayPath); in testConfigSignaturePolicyNoRefPkg() local
305 assertEquals(0, CONFIG_SIGNATURE & idmap.policies); in testConfigSignaturePolicyNoRefPkg()
324 FakeIdmapDaemon.IdmapHeader idmap = idmapd.getIdmap(overlayPath); in testConfigSignaturePolicyRefPkgNotSystem() local
325 assertEquals(0, CONFIG_SIGNATURE & idmap.policies); in testConfigSignaturePolicyRefPkgNotSystem()
DOverlayManagerServiceImplTestsBase.java461 final IdmapHeader idmap = mIdmapFiles.get(overlayPath); in verifyIdmap() local
462 if (idmap == null) { in verifyIdmap()
465 return idmap.isUpToDate(getCrc(targetPath), getCrc(overlayPath), targetPath, policies, in verifyIdmap()
/frameworks/base/libs/androidfw/
DAssetManager.cpp243 if (mAssetPaths[i].idmap == idmapPath) { in addOverlayPath()
249 Asset* idmap = NULL; in addOverlayPath() local
250 if ((idmap = openAssetFromFileLocked(idmapPath, Asset::ACCESS_BUFFER)) == NULL) { in addOverlayPath()
257 if (!ResTable::getIdmapInfo(idmap->getBuffer(false), idmap->getLength(), in addOverlayPath()
260 delete idmap; in addOverlayPath()
263 delete idmap; in addOverlayPath()
286 oap.idmap = idmapPath; in addOverlayPath()
550 Asset* idmap = openIdmapLocked(ap); in appendPathToResTable() local
585 sharedRes->add(ass, idmap, nextEntryIdx + 1, false); in appendPathToResTable()
614 mResources->add(ass, idmap, nextEntryIdx + 1, !shared, appAsLib, ap.isSystemAsset); in appendPathToResTable()
[all …]
DAndroid.bp206 "tests/data/**/*.idmap",
DResourceTypes.cpp247 static bool assertIdmapHeader(const void* idmap, size_t size) { in assertIdmapHeader() argument
248 if (reinterpret_cast<uintptr_t>(idmap) & 0x03) { in assertIdmapHeader()
258 const uint32_t magic = htodl(*reinterpret_cast<const uint32_t*>(idmap)); in assertIdmapHeader()
265 const uint32_t version = htodl(*(reinterpret_cast<const uint32_t*>(idmap) + 1)); in assertIdmapHeader()
371 status_t parseIdmap(const void* idmap, size_t size, uint8_t* outPackageId, KeyedVector<uint8_t, Idm… in parseIdmap() argument
372 if (!assertIdmapHeader(idmap, size)) { in parseIdmap()
383 reinterpret_cast<const uint8_t*>(idmap) + ResTable::IDMAP_HEADER_SIZE_BYTES); in parseIdmap()
7385 bool ResTable::getIdmapInfo(const void* idmap, size_t sizeBytes, in getIdmapInfo() argument
7390 const uint32_t* map = (const uint32_t*)idmap; in getIdmapInfo()
/frameworks/base/cmds/idmap2/include/idmap2/
DPrettyPrintVisitor.h37 void visit(const Idmap& idmap) override;
DBinaryStreamVisitor.h33 void visit(const Idmap& idmap) override;
DRawPrintVisitor.h38 void visit(const Idmap& idmap) override;
DIdmap.h291 virtual void visit(const Idmap& idmap) = 0;
/frameworks/base/libs/androidfw/include/androidfw/
DAssetManager.h220 asset_path() : path(""), rawFd(-1), type(kFileTypeRegular), idmap(""), in asset_path()
225 String8 idmap; member
DResourceTypes.h2134 static bool getIdmapInfo(const void* idmap, size_t size,
/frameworks/base/boot/hiddenapi/
Dhiddenapi-max-target-o.txt39722 Landroid/os/IInstalld$Stub$Proxy;->idmap(Ljava/lang/String;Ljava/lang/String;I)V
39804 Landroid/os/IInstalld;->idmap(Ljava/lang/String;Ljava/lang/String;I)V