Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5f9ba1a2 authored by Andreas Gampe's avatar Andreas Gampe Committed by android-build-merger
Browse files

Merge "Frameworks: Move Log holder to be preloaded"

am: 7dd3a7d5

Change-Id: Ief51fd7b8cdf14c22ded48fde7121d6cca8f243e
parents 2a99cbb9 7dd3a7d5
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -392,7 +392,7 @@ public final class Log {
        // and the length of the tag.
        // and the length of the tag.
        // Note: we implicitly accept possible truncation for Modified-UTF8 differences. It
        // Note: we implicitly accept possible truncation for Modified-UTF8 differences. It
        //       is too expensive to compute that ahead of time.
        //       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.
                - 2                                                // Two terminators.
                - (tag != null ? tag.length() : 0)                 // Tag length.
                - (tag != null ? tag.length() : 0)                 // Tag length.
                - 32;                                              // Some slack.
                - 32;                                              // Some slack.
@@ -429,10 +429,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.
     * a JNI call during logging.
     */
     */
    static class NoPreloadHolder {
    static class PreloadHolder {
        public final static int LOGGER_ENTRY_MAX_PAYLOAD =
        public final static int LOGGER_ENTRY_MAX_PAYLOAD =
                logger_entry_max_payload_native();
                logger_entry_max_payload_native();
    }
    }
+1 −0
Original line number Original line Diff line number Diff line
@@ -2286,6 +2286,7 @@ android.util.IntProperty
android.util.Log
android.util.Log
android.util.Log$1
android.util.Log$1
android.util.Log$ImmediateLogWriter
android.util.Log$ImmediateLogWriter
android.util.Log$PreloadHolder
android.util.Log$TerribleFailure
android.util.Log$TerribleFailure
android.util.Log$TerribleFailureHandler
android.util.Log$TerribleFailureHandler
android.util.LogPrinter
android.util.LogPrinter