diff options
author | 2023-09-06 19:46:54 +0000 | |
---|---|---|
committer | 2023-09-06 19:46:54 +0000 | |
commit | aa95ff271a31f903727c5ebc2e4990846c2073d2 (patch) | |
tree | 247609dc143ce6d8fc0c588fb8b8ef15bbd1d172 /tools/aapt/CrunchCache.cpp | |
parent | b61b138892b337b9abf7082dde5c7c17eb82ab49 (diff) | |
parent | 4fb86ec92a08a65e2ab52f8e361edb15b380cfc4 (diff) |
Merge "Move String8 path functions to androidfw and aapt" into main am: 713e3930c4 am: 0cfc1c6ddd am: 9a80e1b70c am: 13ab173d41 am: 4fb86ec92a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2723454
Change-Id: I91016723c47501051b8768c0ee29f8821cab0331
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'tools/aapt/CrunchCache.cpp')
-rw-r--r-- | tools/aapt/CrunchCache.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/aapt/CrunchCache.cpp b/tools/aapt/CrunchCache.cpp index 1f2febec2230..e731ce0d5ccf 100644 --- a/tools/aapt/CrunchCache.cpp +++ b/tools/aapt/CrunchCache.cpp @@ -5,6 +5,7 @@ // This file defines functions laid out and documented in // CrunchCache.h +#include <androidfw/PathUtils.h> #include <utils/Compat.h> #include <utils/Vector.h> #include <utils/String8.h> @@ -52,15 +53,15 @@ size_t CrunchCache::crunch(CacheUpdater* cu, bool forceOverwrite) relativePath = String8(rPathPtr + offset); if (forceOverwrite || needsUpdating(relativePath)) { - cu->processImage(mSourcePath.appendPathCopy(relativePath), - mDestPath.appendPathCopy(relativePath)); + cu->processImage(appendPathCopy(mSourcePath, relativePath), + appendPathCopy(mDestPath, relativePath)); numFilesUpdated++; // crunchFile(relativePath); } // Delete this file from the source files and (if it exists) from the // dest files. mSourceFiles.removeItemsAt(0); - mDestFiles.removeItem(mDestPath.appendPathCopy(relativePath)); + mDestFiles.removeItem(appendPathCopy(mDestPath, relativePath)); } // Iterate through what's left of destFiles and delete leftovers @@ -99,7 +100,7 @@ bool CrunchCache::needsUpdating(const String8& relativePath) const // Retrieve modification dates for this file entry under the source and // cache directory trees. The vectors will return a modification date of 0 // if the file doesn't exist. - time_t sourceDate = mSourceFiles.valueFor(mSourcePath.appendPathCopy(relativePath)); - time_t destDate = mDestFiles.valueFor(mDestPath.appendPathCopy(relativePath)); + time_t sourceDate = mSourceFiles.valueFor(appendPathCopy(mSourcePath, relativePath)); + time_t destDate = mDestFiles.valueFor(appendPathCopy(mDestPath, relativePath)); return sourceDate > destDate; } |