File tree Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Original file line number Diff line number Diff line change 1212#include " abort_message.h"
1313
1414#ifdef __BIONIC__
15- # include < android/api-level.h>
16- # if __ANDROID_API__ >= 21
17- # include < syslog.h>
18- extern " C" void android_set_abort_message (const char * msg);
19- # else
20- # include < assert.h>
21- # endif // __ANDROID_API__ >= 21
15+ # include < syslog.h>
16+ extern " C" void android_set_abort_message (const char * msg);
2217#endif // __BIONIC__
2318
2419#if defined(__APPLE__) && __has_include(<CrashReporterClient.h>)
@@ -59,20 +54,13 @@ void __abort_message(const char* format, ...)
5954 vasprintf (&buffer, format, list);
6055 va_end (list);
6156
62- # if __ANDROID_API__ >= 21
6357 // Show error in tombstone.
6458 android_set_abort_message (buffer);
6559
6660 // Show error in logcat.
6761 openlog (" libc++abi" , 0 , 0 );
6862 syslog (LOG_CRIT, " %s" , buffer);
6963 closelog ();
70- # else
71- // The good error reporting wasn't available in Android until L. Since we're
72- // about to abort anyway, just call __assert2, which will log _somewhere_
73- // (tombstone and/or logcat) in older releases.
74- __assert2 (__FILE__, __LINE__, __func__, buffer);
75- # endif // __ANDROID_API__ >= 21
7664#endif // __BIONIC__
7765
7866 abort ();
You can’t perform that action at this time.
0 commit comments