Merge "libvulkan: Don\'t try to load compressed/unaligned libraries from APK" into nyc-dev
am: b59de7fa32
* commit 'b59de7fa32b0bcaf52d00290d075d8e9c8f2dd2b':
libvulkan: Don't try to load compressed/unaligned libraries from APK
Change-Id: I046e14ca7462635672f12f9388123c2ec6dea826
diff --git a/cmds/dumpstate/dumpstate.cpp b/cmds/dumpstate/dumpstate.cpp
index 5f698a9..90f81ff 100644
--- a/cmds/dumpstate/dumpstate.cpp
+++ b/cmds/dumpstate/dumpstate.cpp
@@ -54,7 +54,7 @@
static char cmdline_buf[16384] = "(unknown)";
static const char *dump_traces_path = NULL;
-// TODO: should be part of dumpstate object
+// TODO: variables below should be part of dumpstate object
static unsigned long id;
static char build_type[PROPERTY_VALUE_MAX];
static time_t now;
@@ -64,10 +64,15 @@
static bool add_zip_entry(const std::string& entry_name, const std::string& entry_path);
static bool add_zip_entry_from_fd(const std::string& entry_name, int fd);
static int control_socket_fd;
+/* full path of the directory where the bugreport files will be written */
+static std::string bugreport_dir;
+/* suffix of the bugreport files - it's typically the date (when invoked with -d),
+ * although it could be changed by the user using a system property */
+static std::string suffix;
#define PSTORE_LAST_KMSG "/sys/fs/pstore/console-ramoops"
-#define RAFT_DIR "/data/misc/raft/"
+#define RAFT_DIR "/data/misc/raft"
#define RECOVERY_DIR "/cache/recovery"
#define RECOVERY_DATA_DIR "/data/misc/recovery"
#define LOGPERSIST_DATA_DIR "/data/misc/logd"
@@ -175,11 +180,12 @@
closedir(d);
}
-static void dump_systrace(const std::string& systrace_path) {
+static void dump_systrace() {
if (!zip_writer) {
MYLOGD("Not dumping systrace because zip_writer is not set\n");
return;
}
+ std::string systrace_path = bugreport_dir + "/systrace-" + suffix + ".txt";
if (systrace_path.empty()) {
MYLOGE("Not dumping systrace because path is empty\n");
return;
@@ -215,6 +221,32 @@
}
}
+static void dump_raft() {
+ if (is_user_build()) {
+ return;
+ }
+
+ std::string raft_log_path = bugreport_dir + "/raft_log.txt";
+ if (raft_log_path.empty()) {
+ MYLOGD("raft_log_path is empty\n");
+ return;
+ }
+ if (!zip_writer) {
+ MYLOGD("Not dumping raft because zip_writer is not set\n");
+ return;
+ }
+
+ run_command("RAFT LOGS", 600, "logcompressor", "-n", "-r", RAFT_DIR,
+ "-o", raft_log_path.c_str(), NULL);
+ if (!add_zip_entry("raft_log.txt", raft_log_path)) {
+ MYLOGE("Unable to add raft log %s to zip file\n", raft_log_path.c_str());
+ } else {
+ if (remove(raft_log_path.c_str())) {
+ MYLOGE("Error removing raft file %s: %s\n", raft_log_path.c_str(), strerror(errno));
+ }
+ }
+}
+
static bool skip_not_stat(const char *path) {
static const char stat[] = "/stat";
size_t len = strlen(path);
@@ -700,8 +732,6 @@
run_command("LOG STATISTICS", 10, "logcat", "-b", "all", "-S", NULL);
- run_command("RAFT LOGS", 600, SU_PATH, "root", "logcompressor", "-r", RAFT_DIR, NULL);
-
/* show the traces we collected in main(), if that was done */
if (dump_traces_path != NULL) {
dump_file("VM TRACES JUST NOW", dump_traces_path);
@@ -1131,9 +1161,6 @@
control_socket_fd = open_socket("dumpstate");
}
- /* full path of the directory where the bugreport files will be written */
- std::string bugreport_dir;
-
/* full path of the temporary file containing the bugreport */
std::string tmp_path;
@@ -1149,10 +1176,6 @@
/* base name (without suffix or extensions) of the bugreport files */
std::string base_name;
- /* suffix of the bugreport files - it's typically the date (when invoked with -d),
- * although it could be changed by the user using a system property */
- std::string suffix;
-
/* pointer to the actual path, be it zip or text */
std::string path;
@@ -1184,7 +1207,6 @@
tmp_path = bugreport_dir + "/" + base_name + "-" + suffix + ".tmp";
log_path = bugreport_dir + "/dumpstate_log-" + suffix + "-"
+ std::to_string(getpid()) + ".txt";
- systrace_path = bugreport_dir + "/systrace-" + suffix + ".txt";
MYLOGD("Bugreport dir: %s\n"
"Base name: %s\n"
@@ -1279,7 +1301,10 @@
print_header(version);
// Dumps systrace right away, otherwise it will be filled with unnecessary events.
- dump_systrace(systrace_path);
+ dump_systrace();
+
+ // TODO: Drop root user and move into dumpstate() once b/28633932 is fixed.
+ dump_raft();
// Invoking the following dumpsys calls before dump_traces() to try and
// keep the system stats as close to its initial state as possible.
diff --git a/data/etc/wearable_core_hardware.xml b/data/etc/wearable_core_hardware.xml
index 4b7a706..4ff00b5 100644
--- a/data/etc/wearable_core_hardware.xml
+++ b/data/etc/wearable_core_hardware.xml
@@ -34,7 +34,6 @@
<!-- device administration -->
<feature name="android.software.device_admin" />
- <feature name="android.software.managed_users" />
<!-- devices with GPS must include device/google/clockwork/gps.xml -->
<!-- devices with an autofocus camera and/or flash must include either
diff --git a/include/android/keycodes.h b/include/android/keycodes.h
index 67e28da..a17c57a 100644
--- a/include/android/keycodes.h
+++ b/include/android/keycodes.h
@@ -757,7 +757,15 @@
/** Copy key. */
AKEYCODE_COPY = 278,
/** Paste key. */
- AKEYCODE_PASTE = 279
+ AKEYCODE_PASTE = 279,
+ /** fingerprint navigation key, up. */
+ AKEYCODE_FP_NAV_UP = 280,
+ /** fingerprint navigation key, down. */
+ AKEYCODE_FP_NAV_DOWN = 281,
+ /** fingerprint navigation key, left. */
+ AKEYCODE_FP_NAV_LEFT = 282,
+ /** fingerprint navigation key, right. */
+ AKEYCODE_FP_NAV_RIGHT = 283
// NOTE: If you add a new keycode here you must also add it to several other files.
// Refer to frameworks/base/core/java/android/view/KeyEvent.java for the full list.
diff --git a/include/input/InputEventLabels.h b/include/input/InputEventLabels.h
index b7012eb..542f647 100644
--- a/include/input/InputEventLabels.h
+++ b/include/input/InputEventLabels.h
@@ -319,6 +319,10 @@
DEFINE_KEYCODE(CUT),
DEFINE_KEYCODE(COPY),
DEFINE_KEYCODE(PASTE),
+ DEFINE_KEYCODE(FP_NAV_UP),
+ DEFINE_KEYCODE(FP_NAV_DOWN),
+ DEFINE_KEYCODE(FP_NAV_LEFT),
+ DEFINE_KEYCODE(FP_NAV_RIGHT),
{ NULL, 0 }
};
diff --git a/services/inputflinger/InputReader.cpp b/services/inputflinger/InputReader.cpp
index 374a5de..a2d689b 100644
--- a/services/inputflinger/InputReader.cpp
+++ b/services/inputflinger/InputReader.cpp
@@ -134,6 +134,10 @@
{ AKEYCODE_DPAD_RIGHT, AKEYCODE_DPAD_UP, AKEYCODE_DPAD_LEFT, AKEYCODE_DPAD_DOWN },
{ AKEYCODE_DPAD_UP, AKEYCODE_DPAD_LEFT, AKEYCODE_DPAD_DOWN, AKEYCODE_DPAD_RIGHT },
{ AKEYCODE_DPAD_LEFT, AKEYCODE_DPAD_DOWN, AKEYCODE_DPAD_RIGHT, AKEYCODE_DPAD_UP },
+ { AKEYCODE_FP_NAV_DOWN, AKEYCODE_FP_NAV_RIGHT, AKEYCODE_FP_NAV_UP, AKEYCODE_FP_NAV_LEFT },
+ { AKEYCODE_FP_NAV_RIGHT, AKEYCODE_FP_NAV_UP, AKEYCODE_FP_NAV_LEFT, AKEYCODE_FP_NAV_DOWN },
+ { AKEYCODE_FP_NAV_UP, AKEYCODE_FP_NAV_LEFT, AKEYCODE_FP_NAV_DOWN, AKEYCODE_FP_NAV_RIGHT },
+ { AKEYCODE_FP_NAV_LEFT, AKEYCODE_FP_NAV_DOWN, AKEYCODE_FP_NAV_RIGHT, AKEYCODE_FP_NAV_UP },
};
static const size_t keyCodeRotationMapSize =
sizeof(keyCodeRotationMap) / sizeof(keyCodeRotationMap[0]);
diff --git a/services/surfaceflinger/surfaceflinger.rc b/services/surfaceflinger/surfaceflinger.rc
index 2b4ea2a..435aa0c 100644
--- a/services/surfaceflinger/surfaceflinger.rc
+++ b/services/surfaceflinger/surfaceflinger.rc
@@ -3,4 +3,4 @@
user system
group graphics drmrpc readproc
onrestart restart zygote
- writepid /sys/fs/cgroup/stune/foreground/tasks
+ writepid /dev/stune/foreground/tasks