Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e7aa7f8a authored by yingying's avatar yingying
Browse files

androidfw: Use the last package to create idmap.

 - If the resource only contains one namespace, then need to use the first
   index 0 to create idmap.
 - If the resource contains two namespaces. Then the first package is the
   system package, the second package is the application package. So need
   to use the last index 1 to create the idmap.

Change-Id: I34b72684f82dfc740a5f44762eec55b5e5b3f902
parent 383b26b7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -5346,7 +5346,7 @@ status_t ResTable::createIdmap(const ResTable& overlay, uint32_t originalCrc, ui
    }

    Vector<Vector<uint32_t> > map;
    const PackageGroup* pg = mPackageGroups[0];
    const PackageGroup* pg = mPackageGroups[mPackageGroups.size() - 1];
    const Package* pkg = pg->packages[0];
    size_t typeCount = pkg->types.size();
    // starting size is header + first item (number of types in map)