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

Commit 29e9382b authored by Pablo Gamito's avatar Pablo Gamito
Browse files

Rename ProtoLogGroup parameters for clarity

Bug: 409972099
Test: atest TracingTests
Flag: EXEMPT readability fixes
Change-Id: I6fe1f7eaf5f16b902084f1f755ae7482919a7ebd
parent 371eed71
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -30,17 +30,17 @@ import com.android.internal.protolog.ProtoLogGroup;
 */
public final class ViewProtoLogGroups {
    static final ProtoLogGroup IME_INSETS_CONTROLLER = new ProtoLogGroup(
            "IME_INSETS_CONTROLLER", "InsetsController", true /* enabled */);
            "IME_INSETS_CONTROLLER", "InsetsController", true /* logToLogcat */);
    static final ProtoLogGroup INSETS_CONTROLLER_DEBUG = new ProtoLogGroup(
            "INSETS_CONTROLLER_DEBUG", "InsetsController", false /* enabled */);
            "INSETS_CONTROLLER_DEBUG", "InsetsController", false /* logToLogcat */);
    static final ProtoLogGroup INSETS_ANIMATION_CONTROLLER = new ProtoLogGroup(
            "INSETS_ANIMATION_CONTROLLER", "InsetsAnimationCtrlImpl", false /* enabled */);
            "INSETS_ANIMATION_CONTROLLER", "InsetsAnimationCtrlImpl", false /* logToLogcat */);
    public static final ProtoLogGroup IME_TRACKER = new ProtoLogGroup(
            "IME_TRACKER", ImeTracker.TAG, true /* enabled */);
            "IME_TRACKER", ImeTracker.TAG, true /* logToLogcat */);
    public static final ProtoLogGroup INPUT_METHOD_MANAGER_DEBUG = new ProtoLogGroup(
            "INPUT_METHOD_MANAGER", "InputMethodManager", false /* enabled */);
            "INPUT_METHOD_MANAGER", "InputMethodManager", false /* logToLogcat */);
    public static final ProtoLogGroup INPUT_METHOD_MANAGER_WITH_LOGCAT = new ProtoLogGroup(
            "INPUT_METHOD_MANAGER_LOGCAT", "InputMethodManager", true /* enabled */);
            "INPUT_METHOD_MANAGER_LOGCAT", "InputMethodManager", true /* logToLogcat */);

    static final ProtoLogGroup[] ALL_GROUPS = {
            IME_INSETS_CONTROLLER,
+5 −5
Original line number Diff line number Diff line
@@ -27,7 +27,6 @@ public class ProtoLogGroup implements IProtoLogGroup {
    private final String mName;
    @NonNull
    private final String mTag;
    private final boolean mEnabled;
    private boolean mLogToLogcat;

    public ProtoLogGroup(@NonNull String name) {
@@ -38,16 +37,17 @@ public class ProtoLogGroup implements IProtoLogGroup {
        this(name, tag, true);
    }

    public ProtoLogGroup(@NonNull String name, @NonNull String tag, boolean enabled) {
    public ProtoLogGroup(@NonNull String name, @NonNull String tag, boolean logToLogcat) {
        mName = name;
        mTag = tag;
        mEnabled = enabled;
        mLogToLogcat = enabled;
        mLogToLogcat = logToLogcat;
    }

    @Override
    public boolean isEnabled() {
        return mEnabled;
        // Should only be called by the source code pre-processor and this type of ProtoLogGroup is
        // not yet supported by the ProtoLogTool so this should never be called.
        throw new UnsupportedOperationException("ProtoLogGroup.isEnabled() should not be called");
    }

    @Override