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

Commit cb25d275 authored by Jared Duke's avatar Jared Duke
Browse files

Upgrade new DEBUG lint rules to error

DEBUG log fields should be final and disabled under most circumstances.
Upgrade the recently added Lint check to an error.

For existing violations that have a justifying comment or rationale,
suppress the error. For violations with no such rationale, make them
compliant.

Bug: 436095548
Test: presubmit + m lint-checks
Flag: EXEMPT trivial lint compliance fixes
Change-Id: I699009f96ee2e3a8a35c4e5ef9d484eea64329c4
parent c58ffb98
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -639,6 +639,7 @@ final class FragmentManagerState implements Parcelable {
 * Container for fragments associated with an activity.
 */
final class FragmentManagerImpl extends FragmentManager implements LayoutInflater.Factory2 {
    @SuppressWarnings("DebugNonFinal")
    static boolean DEBUG = false;
    static final String TAG = "FragmentManager";
    
+2 −0
Original line number Diff line number Diff line
@@ -210,6 +210,8 @@ public abstract class LoaderManager {

class LoaderManagerImpl extends LoaderManager {
    static final String TAG = "LoaderManager";
    // As this field is toggled by a public API, it cannot be made final.
    @SuppressWarnings("DebugNonFinal")
    static boolean DEBUG = false;

    // These are the currently active loaders.  A loader is here
+1 −1
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ import java.util.function.Supplier;
@Deprecated
public class ComponentAliasResolver {
    private static final String TAG = "ComponentAliasResolver";
    private static final boolean DEBUG = true;
    private static final boolean DEBUG = false;

    /**
     * This flag has to be enabled for the "android" package to use component aliases.
+1 −0
Original line number Diff line number Diff line
@@ -67,6 +67,7 @@ class UserSwitchingDialog extends Dialog {
    private static final long TRACE_TAG = Trace.TRACE_TAG_ACTIVITY_MANAGER;

    // User switching doesn't happen that frequently, so it doesn't hurt to have it always on
    @SuppressWarnings("DebugTrue")
    protected static final boolean DEBUG = true;

    private static final long DIALOG_SHOW_HIDE_ANIMATION_DURATION_MS = 300;
+1 −1
Original line number Diff line number Diff line
@@ -69,7 +69,7 @@ import java.util.UUID;
public class SpatializerHelper {

    private static final String TAG = "AS.SpatializerHelper";
    private static final boolean DEBUG = true;
    private static final boolean DEBUG = false;
    private static final boolean DEBUG_MORE = false;

    private static void logd(String s) {
Loading