summaryrefslogtreecommitdiff
path: root/libs/androidfw
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2023-11-22 05:19:35 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2023-11-22 05:19:35 +0000
commitcf01f294ba8f0c4c025176022e27c1324ee14fb2 (patch)
treec74da707d7b29db26240c78109dda884c93109cc /libs/androidfw
parent03042818d0e8bf9853f3744a6d3fa0e700e39611 (diff)
parentf48a56f6c09a177066c428ac03689c3f6c3de51f (diff)
Merge "[res] Fix the cookie index in OpenNonAsset()" into main
Diffstat (limited to 'libs/androidfw')
-rw-r--r--libs/androidfw/AssetManager2.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/androidfw/AssetManager2.cpp b/libs/androidfw/AssetManager2.cpp
index d056248273b2..8748dab581bb 100644
--- a/libs/androidfw/AssetManager2.cpp
+++ b/libs/androidfw/AssetManager2.cpp
@@ -603,7 +603,7 @@ std::unique_ptr<Asset> AssetManager2::OpenNonAsset(const std::string& filename,
std::unique_ptr<Asset> asset = assets->GetAssetsProvider()->Open(filename, mode);
if (asset) {
if (out_cookie != nullptr) {
- *out_cookie = i;
+ *out_cookie = i - 1;
}
return asset;
}