From 0699f1de6a684644b2debf82d55dfbcbc9387679 Mon Sep 17 00:00:00 2001 From: Ryan Mitchell Date: Thu, 3 Dec 2020 15:41:42 -0800 Subject: Remove idmap path 256 length limit Overlay and target package paths can be longer than 256 characters. Currently, the idmap will fail to be generated if either path is longer than 256 characters. This change removes the 256 character limit and makes parsing variable length strings easier in libandroidfw. Bug: 174676094 Test: idmap2_tests && libandroidfw_tests Change-Id: Ic240cdb8700566b2ac2ade08da58bea852e4ae0c --- libs/androidfw/ApkAssets.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/androidfw/ApkAssets.cpp') diff --git a/libs/androidfw/ApkAssets.cpp b/libs/androidfw/ApkAssets.cpp index cb56a5172a45..011a0de8031f 100755 --- a/libs/androidfw/ApkAssets.cpp +++ b/libs/androidfw/ApkAssets.cpp @@ -385,7 +385,7 @@ std::unique_ptr ApkAssets::LoadOverlay(const std::string& idmap return {}; } - auto overlay_path = loaded_idmap->OverlayApkPath(); + auto overlay_path = std::string(loaded_idmap->OverlayApkPath()); auto assets = ZipAssetsProvider::Create(overlay_path); return (assets) ? LoadImpl(std::move(assets), overlay_path, flags | PROPERTY_OVERLAY, nullptr /* override_asset */, std::move(idmap_asset), -- cgit v1.2.3-59-g8ed1b