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

Commit 8e81742d authored by Makoto Onuki's avatar Makoto Onuki
Browse files

Make Log.isLogagble @FastNative

This CL doens't change println_native() because:
- To avoid potential risks (jank?) because it's kind of late in the RVC
cycle.
- The JNI overhead is unlikely to be a major problem in logging. If apps
are making *that* many log calls, that itself would be a bigger
problem.

Test: treehugger / boot
Bug: 152217649
Change-Id: I86aeb62b217e5331e6bbd02a0ba592fd050a41b2
parent 123991d0
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -27,6 +27,8 @@ import com.android.internal.os.RuntimeInit;
import com.android.internal.util.FastPrintWriter;
import com.android.internal.util.FastPrintWriter;
import com.android.internal.util.LineBreakBufferedWriter;
import com.android.internal.util.LineBreakBufferedWriter;


import dalvik.annotation.optimization.FastNative;

import java.io.PrintWriter;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.io.StringWriter;
import java.io.Writer;
import java.io.Writer;
@@ -228,6 +230,7 @@ public final class Log {
     *         for Nougat (7.0) releases (API <= 23) and prior, there is no
     *         for Nougat (7.0) releases (API <= 23) and prior, there is no
     *         tag limit of concern after this API level.
     *         tag limit of concern after this API level.
     */
     */
    @FastNative
    public static native boolean isLoggable(@Nullable String tag, @Level int level);
    public static native boolean isLoggable(@Nullable String tag, @Level int level);


    /**
    /**