Commit 54f75614 authored by John Chen's avatar John Chen Committed by Commit Bot

Revert "ProGuard: Move -checkdiscard for Log.* into @RemovableInRelease annotation"

This reverts commit 38b443b6.

Reason for revert: Build failures on https://ci.chromium.org/p/chrome/builders/ci/android-builder-perf, etc.

Original change's description:
> ProGuard: Move -checkdiscard for Log.* into @RemovableInRelease annotation
> 
> Strictly a refecator to cut down on number of explicit rules.
> 
> Change-Id: I3afad5ccd63d2347c69343df15014118780f512e
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1711978
> Commit-Queue: Andrew Grieve <agrieve@chromium.org>
> Reviewed-by: Sam Maier <smaier@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#679849}

TBR=agrieve@chromium.org,smaier@chromium.org,crouleau@chromium.org
Bug: 986693

Change-Id: I8a9849ff22206f4d4b320a25c47426980ee8a15c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1714217Reviewed-by: default avatarJohn Chen <johnchen@chromium.org>
Commit-Queue: John Chen <johnchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#679885}
parent 2d10b73f
...@@ -87,7 +87,6 @@ public class Log { ...@@ -87,7 +87,6 @@ public class Log {
* Note: Has no effect on whether logs are sent or not. Use a method with * Note: Has no effect on whether logs are sent or not. Use a method with
* {@link RemovableInRelease} to log something in Debug builds only. * {@link RemovableInRelease} to log something in Debug builds only.
*/ */
@RemovableInRelease
public static boolean isLoggable(String tag, int level) { public static boolean isLoggable(String tag, int level) {
return android.util.Log.isLoggable(tag, level); return android.util.Log.isLoggable(tag, level);
} }
...@@ -106,7 +105,6 @@ public class Log { ...@@ -106,7 +105,6 @@ public class Log {
* @param args Arguments referenced by the format specifiers in the format string. If the last * @param args Arguments referenced by the format specifiers in the format string. If the last
* one is a {@link Throwable}, its trace will be printed. * one is a {@link Throwable}, its trace will be printed.
*/ */
@RemovableInRelease
private static void verbose(String tag, String messageTemplate, Object... args) { private static void verbose(String tag, String messageTemplate, Object... args) {
String message = formatLogWithStack(messageTemplate, args); String message = formatLogWithStack(messageTemplate, args);
Throwable tr = getThrowableToLog(args); Throwable tr = getThrowableToLog(args);
...@@ -192,7 +190,6 @@ public class Log { ...@@ -192,7 +190,6 @@ public class Log {
* @param args Arguments referenced by the format specifiers in the format string. If the last * @param args Arguments referenced by the format specifiers in the format string. If the last
* one is a {@link Throwable}, its trace will be printed. * one is a {@link Throwable}, its trace will be printed.
*/ */
@RemovableInRelease
private static void debug(String tag, String messageTemplate, Object... args) { private static void debug(String tag, String messageTemplate, Object... args) {
String message = formatLogWithStack(messageTemplate, args); String message = formatLogWithStack(messageTemplate, args);
Throwable tr = getThrowableToLog(args); Throwable tr = getThrowableToLog(args);
...@@ -365,7 +362,6 @@ public class Log { ...@@ -365,7 +362,6 @@ public class Log {
} }
/** Returns a string form of the origin of the log call, to be used as secondary tag.*/ /** Returns a string form of the origin of the log call, to be used as secondary tag.*/
@RemovableInRelease
private static String getCallOrigin() { private static String getCallOrigin() {
StackTraceElement[] st = Thread.currentThread().getStackTrace(); StackTraceElement[] st = Thread.currentThread().getStackTrace();
......
...@@ -48,6 +48,13 @@ ...@@ -48,6 +48,13 @@
static *** v(...); static *** v(...);
static *** isLoggable(...); static *** isLoggable(...);
} }
-checkdiscard class org.chromium.base.Log {
public static void d(...);
public static void v(...);
private static void debug(...);
private static void verbose(...);
private static String getCallOrigin(...);
}
# The following chart was created on July 20, 2016, to decide on 3 optimization # The following chart was created on July 20, 2016, to decide on 3 optimization
# passes for Chrome. # passes for Chrome.
......
...@@ -42,15 +42,10 @@ ...@@ -42,15 +42,10 @@
native <methods>; native <methods>;
} }
# Remove methods with this annotation. Methods generally need to be void, or # Remove methods annotated with this if their return value is unused.
# have unused return values in order to be removed. Compiles will fail if any
# such method was not able to be safely removed.
-assumenosideeffects class ** { -assumenosideeffects class ** {
@org.chromium.base.annotations.RemovableInRelease <methods>; @org.chromium.base.annotations.RemovableInRelease <methods>;
} }
-checkdiscard class ** {
@org.chromium.base.annotations.RemovableInRelease <methods>;
}
# Never inline classes or methods with this annotation, but allow shrinking and # Never inline classes or methods with this annotation, but allow shrinking and
# obfuscation. # obfuscation.
......
...@@ -137,6 +137,13 @@ ...@@ -137,6 +137,13 @@
static *** v(...); static *** v(...);
static *** isLoggable(...); static *** isLoggable(...);
} }
-checkdiscard class org.chromium.base.Log {
public static void d(...);
public static void v(...);
private static void debug(...);
private static void verbose(...);
private static String getCallOrigin(...);
}
# The following chart was created on July 20, 2016, to decide on 3 optimization # The following chart was created on July 20, 2016, to decide on 3 optimization
# passes for Chrome. # passes for Chrome.
...@@ -208,15 +215,10 @@ ...@@ -208,15 +215,10 @@
native <methods>; native <methods>;
} }
# Remove methods with this annotation. Methods generally need to be void, or # Remove methods annotated with this if their return value is unused.
# have unused return values in order to be removed. Compiles will fail if any
# such method was not able to be safely removed.
-assumenosideeffects class ** { -assumenosideeffects class ** {
@org.chromium.base.annotations.RemovableInRelease <methods>; @org.chromium.base.annotations.RemovableInRelease <methods>;
} }
-checkdiscard class ** {
@org.chromium.base.annotations.RemovableInRelease <methods>;
}
# Never inline classes or methods with this annotation, but allow shrinking and # Never inline classes or methods with this annotation, but allow shrinking and
# obfuscation. # obfuscation.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment