summaryrefslogtreecommitdiff
path: root/cmds
diff options
context:
space:
mode:
Diffstat (limited to 'cmds')
-rw-r--r--cmds/hid/jni/com_android_commands_hid_Device.cpp6
-rw-r--r--cmds/idmap/create.cpp8
-rw-r--r--cmds/idmap/inspect.cpp4
3 files changed, 12 insertions, 6 deletions
diff --git a/cmds/hid/jni/com_android_commands_hid_Device.cpp b/cmds/hid/jni/com_android_commands_hid_Device.cpp
index bf2e45c60a81..f04b08587fd9 100644
--- a/cmds/hid/jni/com_android_commands_hid_Device.cpp
+++ b/cmds/hid/jni/com_android_commands_hid_Device.cpp
@@ -27,9 +27,9 @@
#include <unistd.h>
#include <jni.h>
-#include <JNIHelp.h>
-#include <ScopedPrimitiveArray.h>
-#include <ScopedUtfChars.h>
+#include <nativehelper/JNIHelp.h>
+#include <nativehelper/ScopedPrimitiveArray.h>
+#include <nativehelper/ScopedUtfChars.h>
#include <android/looper.h>
#include <android/log.h>
diff --git a/cmds/idmap/create.cpp b/cmds/idmap/create.cpp
index 524db14f7aab..f415f8f5dd75 100644
--- a/cmds/idmap/create.cpp
+++ b/cmds/idmap/create.cpp
@@ -104,13 +104,17 @@ fail:
}
}
- uint32_t cached_target_crc, cached_overlay_crc;
+ uint32_t version, cached_target_crc, cached_overlay_crc;
String8 cached_target_path, cached_overlay_path;
- if (!ResTable::getIdmapInfo(buf, N, NULL, &cached_target_crc, &cached_overlay_crc,
+ if (!ResTable::getIdmapInfo(buf, N, &version, &cached_target_crc, &cached_overlay_crc,
&cached_target_path, &cached_overlay_path)) {
return true;
}
+ if (version != ResTable::IDMAP_CURRENT_VERSION) {
+ return true;
+ }
+
if (cached_target_path != target_apk_path) {
return true;
}
diff --git a/cmds/idmap/inspect.cpp b/cmds/idmap/inspect.cpp
index 154cb25a02a1..20005e2766d8 100644
--- a/cmds/idmap/inspect.cpp
+++ b/cmds/idmap/inspect.cpp
@@ -284,7 +284,9 @@ namespace {
if (err != NO_ERROR) {
return err;
}
- print("", "entry", data32, "%s/%s", type.string(), name.string());
+ if (data32 != ResTable_type::NO_ENTRY) {
+ print("", "entry", data32, "%s/%s", type.string(), name.string());
+ }
}
}