Merge "Fix AMotionEvent_getHistorical* to take const AInputEvent* motion_event"
diff --git a/cmds/dumpstate/dumpstate.c b/cmds/dumpstate/dumpstate.c
index 55a36c2..dbe9832 100644
--- a/cmds/dumpstate/dumpstate.c
+++ b/cmds/dumpstate/dumpstate.c
@@ -314,7 +314,13 @@
);
}
+static void sigpipe_handler(int n) {
+ (void)n;
+ exit(EXIT_FAILURE);
+}
+
int main(int argc, char *argv[]) {
+ struct sigaction sigact;
int do_add_date = 0;
int do_compress = 0;
int do_vibrate = 1;
@@ -334,7 +340,9 @@
}
ALOGI("begin\n");
- signal(SIGPIPE, SIG_IGN);
+ memset(&sigact, 0, sizeof(sigact));
+ sigact.sa_handler = sigpipe_handler;
+ sigaction(SIGPIPE, &sigact, NULL);
/* set as high priority, and protect from OOM killer */
setpriority(PRIO_PROCESS, 0, -20);
diff --git a/include/utils/Log.h b/include/utils/Log.h
index 98c441c..4259c86 100644
--- a/include/utils/Log.h
+++ b/include/utils/Log.h
@@ -62,7 +62,7 @@
* }
*/
#define ALOGD_IF_SLOW(timeoutMillis, message) \
- LogIfSlow _logIfSlow(LOG_TAG, ANDROID_LOG_DEBUG, timeoutMillis, message);
+ android::LogIfSlow _logIfSlow(LOG_TAG, ANDROID_LOG_DEBUG, timeoutMillis, message);
} // namespace android