Add compile-time checks for libandroid_runtime
Before this CL, libandroid_runtime didn't process thread-safety
annotations and didn't enforce the -Wextra checks.
Add those here, along with the required fixes.
Bug: 271455682
Test: m libandroid_runtime
Change-Id: Ibff26167ea142150a461c54ec631b70b6d0d15e5
diff --git a/media/jni/android_media_MediaMetricsJNI.cpp b/media/jni/android_media_MediaMetricsJNI.cpp
index 08a8d89..2769dbc 100644
--- a/media/jni/android_media_MediaMetricsJNI.cpp
+++ b/media/jni/android_media_MediaMetricsJNI.cpp
@@ -127,7 +127,7 @@
if (item->getTimestamp() > 0) {
bh.put(mediametrics::BUNDLE_TIMESTAMP, (int64_t)item->getTimestamp());
}
- if (item->getUid() != -1) {
+ if (static_cast<int32_t>(item->getUid()) != -1) {
bh.put(mediametrics::BUNDLE_UID, (int32_t)item->getUid());
}
for (const auto &prop : *item) {