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

Commit 018bb2af authored by Jared Duke's avatar Jared Duke
Browse files

Add final modifier to private static DEBUG constants

Marking final allows the gated debug code (generally logging) to be
stripped from production builds. This saves ~20KB from system server.

Follow-up work will explore presubmit guards for similar DEBUG cases
(including guarding against DEBUG = true).

Bug: 203143243
Test: m
Change-Id: Ic87a8d8bf183ac0b36c790a2f4a4661ae5e1a87f
parent bbd05d76
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ import java.util.List;
 */
abstract class BaseMediaParceledListSlice<T> implements Parcelable {
    private static String TAG = "BaseMediaParceledListSlice";
    private static boolean DEBUG = false;
    private static final boolean DEBUG = false;

    /*
     * TODO get this number from somewhere else. For now set it to a quarter of
+1 −1
Original line number Diff line number Diff line
@@ -108,7 +108,7 @@ import java.util.concurrent.TimeUnit;
@SystemService(Context.WALLPAPER_SERVICE)
public class WallpaperManager {
    private static String TAG = "WallpaperManager";
    private static boolean DEBUG = false;
    private static final boolean DEBUG = false;
    private float mWallpaperXStep = -1;
    private float mWallpaperYStep = -1;
    private static final @NonNull RectF LOCAL_COLOR_BOUNDS =
+1 −1
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ import dagger.Lazy;

public class KeyguardDisplayManager {
    protected static final String TAG = "KeyguardDisplayManager";
    private static boolean DEBUG = KeyguardConstants.DEBUG;
    private static final boolean DEBUG = KeyguardConstants.DEBUG;

    private MediaRouter mMediaRouter = null;
    private final DisplayManager mDisplayService;
+1 −1
Original line number Diff line number Diff line
@@ -147,7 +147,7 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
        OnCrossProfileWidgetProvidersChangeListener {
    private static final String TAG = "AppWidgetServiceImpl";

    private static boolean DEBUG = false;
    private static final boolean DEBUG = false;

    private static final String OLD_KEYGUARD_HOST_PACKAGE = "android";
    private static final String NEW_KEYGUARD_HOST_PACKAGE = "com.android.keyguard";
+1 −1
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ import java.io.PrintWriter;
final class DisplayPowerState {
    private static final String TAG = "DisplayPowerState";

    private static boolean DEBUG = false;
    private static final boolean DEBUG = false;
    private static String COUNTER_COLOR_FADE = "ColorFadeLevel";

    private final Handler mHandler;
Loading