Add optional debug logging to on flag changes

FlagDebugUtils.formatFlagChange() utility to always write the set of
updated flags, with a list of actual changes applied. Examples:

[allow_gesture|device_dozing] +[device_dozing]
[] -[state_started]

Additionally, moved the appendFlag utility to the new FlagDebugUtils

Test: manually verifed the output in logcat
Bug: 261418621
Change-Id: Ie4f2cfcd4b34f0a816db7845e1df4331babed07a
This commit is contained in:
Mike Schneider
2023-03-03 15:58:06 +01:00
parent 51a864893b
commit a79d460736
7 changed files with 108 additions and 23 deletions
@@ -16,8 +16,6 @@
package com.android.launcher3.taskbar;
import java.util.StringJoiner;
/**
* Various utilities shared amongst the Taskbar's classes.
*/
@@ -25,12 +23,6 @@ public final class Utilities {
private Utilities() {}
static void appendFlag(StringJoiner str, int flags, int flag, String flagName) {
if ((flags & flag) != 0) {
str.add(flagName);
}
}
/**
* Sets drag, long-click, and split selection behavior on 1P and 3P launchers with Taskbar
*/