Merge "Frameworks/base: Use Log.printlns in RuntimeInit" into nyc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
a2cc0c2ca2
@@ -377,8 +377,9 @@ public final class Log {
|
|||||||
* Helper function for long messages. Uses the LineBreakBufferedWriter to break
|
* Helper function for long messages. Uses the LineBreakBufferedWriter to break
|
||||||
* up long messages and stacktraces along newlines, but tries to write in large
|
* up long messages and stacktraces along newlines, but tries to write in large
|
||||||
* chunks. This is to avoid truncation.
|
* chunks. This is to avoid truncation.
|
||||||
|
* @hide
|
||||||
*/
|
*/
|
||||||
private static int printlns(int bufID, int priority, String tag, String msg,
|
public static int printlns(int bufID, int priority, String tag, String msg,
|
||||||
Throwable tr) {
|
Throwable tr) {
|
||||||
ImmediateLogWriter logWriter = new ImmediateLogWriter(bufID, priority, tag);
|
ImmediateLogWriter logWriter = new ImmediateLogWriter(bufID, priority, tag);
|
||||||
// Acceptable buffer size. Get the native buffer size, subtract two zero terminators,
|
// Acceptable buffer size. Get the native buffer size, subtract two zero terminators,
|
||||||
|
|||||||
@@ -57,8 +57,7 @@ public class RuntimeInit {
|
|||||||
private static final native void nativeSetExitWithoutCleanup(boolean exitWithoutCleanup);
|
private static final native void nativeSetExitWithoutCleanup(boolean exitWithoutCleanup);
|
||||||
|
|
||||||
private static int Clog_e(String tag, String msg, Throwable tr) {
|
private static int Clog_e(String tag, String msg, Throwable tr) {
|
||||||
return Log.println_native(Log.LOG_ID_CRASH, Log.ERROR, tag,
|
return Log.printlns(Log.LOG_ID_CRASH, Log.ERROR, tag, msg, tr);
|
||||||
msg + '\n' + Log.getStackTraceString(tr));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user