Merge "Frameworks: Move Log holder to be preloaded"

This commit is contained in:
Treehugger Robot
2017-09-28 20:57:35 +00:00
committed by Gerrit Code Review
2 changed files with 4 additions and 3 deletions

View File

@@ -391,7 +391,7 @@ public final class Log {
// and the length of the tag.
// Note: we implicitly accept possible truncation for Modified-UTF8 differences. It
// is too expensive to compute that ahead of time.
int bufferSize = NoPreloadHolder.LOGGER_ENTRY_MAX_PAYLOAD // Base.
int bufferSize = PreloadHolder.LOGGER_ENTRY_MAX_PAYLOAD // Base.
- 2 // Two terminators.
- (tag != null ? tag.length() : 0) // Tag length.
- 32; // Some slack.
@@ -428,10 +428,10 @@ public final class Log {
}
/**
* NoPreloadHelper class. Caches the LOGGER_ENTRY_MAX_PAYLOAD value to avoid
* PreloadHelper class. Caches the LOGGER_ENTRY_MAX_PAYLOAD value to avoid
* a JNI call during logging.
*/
static class NoPreloadHolder {
static class PreloadHolder {
public final static int LOGGER_ENTRY_MAX_PAYLOAD =
logger_entry_max_payload_native();
}

View File

@@ -2286,6 +2286,7 @@ android.util.IntProperty
android.util.Log
android.util.Log$1
android.util.Log$ImmediateLogWriter
android.util.Log$PreloadHolder
android.util.Log$TerribleFailure
android.util.Log$TerribleFailureHandler
android.util.LogPrinter