summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/jni/jni_internal.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/runtime/jni/jni_internal.cc b/runtime/jni/jni_internal.cc
index 13c65107ee..1055057fc7 100644
--- a/runtime/jni/jni_internal.cc
+++ b/runtime/jni/jni_internal.cc
@@ -17,6 +17,7 @@
#include "jni_internal.h"
#include <cstdarg>
+#include <log/log.h>
#include <memory>
#include <mutex>
#include <utility>
@@ -2078,6 +2079,7 @@ class JNI {
/*bad=*/ []() { return true; }); // Abort processing and return 0 for bad characters.
if (UNLIKELY(utf8_length != 0u && utf16_length == 0u)) {
// VisitModifiedUtf8Chars() aborted for a bad character.
+ android_errorWriteLog(0x534e4554, "172655291"); // Report to SafetyNet.
// Report the error to logcat but avoid too much spam.
static const uint64_t kMinDelay = UINT64_C(10000000000); // 10s
static std::atomic<uint64_t> prev_bad_input_time(UINT64_C(0));