summaryrefslogtreecommitdiff
path: root/libs/androidfw/misc.cpp
diff options
context:
space:
mode:
author Yurii Zubrytskyi <zyy@google.com> 2025-04-17 16:31:27 -0700
committer Android Build Coastguard Worker <android-build-coastguard-worker@google.com> 2025-04-22 18:30:50 -0700
commit1144bcaee5c28ce4261865af197990b7b77f8e28 (patch)
treee4cd65da39c8b0e29f001d752bcd8af007eba96e /libs/androidfw/misc.cpp
parentc2992ce6c7904e7d65c264d1fcee6e0fc2902ae3 (diff)
[res] Fix a crash for the apps doing a bad thing
Some apps started crashing after the CL that changed one of the parameters of ZipAssetsProvider constructor from time_t to timespec. Apparently they dlsym() and call that constructor, even when it's not a public or somehow supported API. This CL puts one back for them so they at least don't stop working all at once, and instead it just logs an error so the developers could at least know they're doing a BAD THING. + fix the timespec operator== to actually compare nanoseconds. Bug: 406670650 Test: run the app and ensure it launches Flag: EXEMPT bugfix - a dummy symbol that's unflaggable (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:481f13eaff6a88cbe9b8b9da65f52bc26ba440bd) Merged-In: I85e03985d7303f4e0f943441da57cf0f50230db6 Change-Id: I85e03985d7303f4e0f943441da57cf0f50230db6
Diffstat (limited to 'libs/androidfw/misc.cpp')
-rw-r--r--libs/androidfw/misc.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/libs/androidfw/misc.cpp b/libs/androidfw/misc.cpp
index 26eb320805c9..052d9e8dbe68 100644
--- a/libs/androidfw/misc.cpp
+++ b/libs/androidfw/misc.cpp
@@ -31,7 +31,6 @@
#include <array>
#include <cstdio>
#include <cstring>
-#include <tuple>
namespace android {
@@ -143,7 +142,3 @@ bool isKnownWritablePath(const char* path) {
#endif // __linux__
} // namespace android
-
-bool operator==(const timespec& l, const timespec& r) {
- return std::tie(l.tv_sec, l.tv_nsec) == std::tie(r.tv_sec, l.tv_nsec);
-}