Loading cmds/idmap/inspect.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -223,7 +223,8 @@ namespace { } status_t parse_data(IdmapBuffer& buf, const AssetManager& am) { const uint32_t packageId = am.getResources().getBasePackageId(0); const ResTable& rt = am.getResources(); const uint32_t packageId = rt.getBasePackageId(rt.getBasePackageCount() - 1); uint16_t data16; status_t err = buf.nextUint16(&data16); Loading libs/androidfw/ResourceTypes.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -6019,8 +6019,10 @@ status_t ResTable::createIdmap(const ResTable& overlay, KeyedVector<uint8_t, IdmapTypeMap> map; // overlaid packages are assumed to contain only one package group const PackageGroup* pg = mPackageGroups[0]; // Overlaid packages are assumed to contain only one package group or two package group // as one is "system package(android)", and another is "application package". So we need // to use the last package group to create idmap. const PackageGroup* pg = mPackageGroups[mPackageGroups.size() - 1]; // starting size is header *outSize = ResTable::IDMAP_HEADER_SIZE_BYTES; Loading Loading
cmds/idmap/inspect.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -223,7 +223,8 @@ namespace { } status_t parse_data(IdmapBuffer& buf, const AssetManager& am) { const uint32_t packageId = am.getResources().getBasePackageId(0); const ResTable& rt = am.getResources(); const uint32_t packageId = rt.getBasePackageId(rt.getBasePackageCount() - 1); uint16_t data16; status_t err = buf.nextUint16(&data16); Loading
libs/androidfw/ResourceTypes.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -6019,8 +6019,10 @@ status_t ResTable::createIdmap(const ResTable& overlay, KeyedVector<uint8_t, IdmapTypeMap> map; // overlaid packages are assumed to contain only one package group const PackageGroup* pg = mPackageGroups[0]; // Overlaid packages are assumed to contain only one package group or two package group // as one is "system package(android)", and another is "application package". So we need // to use the last package group to create idmap. const PackageGroup* pg = mPackageGroups[mPackageGroups.size() - 1]; // starting size is header *outSize = ResTable::IDMAP_HEADER_SIZE_BYTES; Loading