mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 10:48:19 +00:00
Add log dumps for taskbar state
Test: created bugreport and checked logs Bug: - Change-Id: Ic0c2330b18c8daf181ae5b236e0c4b212d630fa3
This commit is contained in:
@@ -19,17 +19,21 @@ import androidx.annotation.IntDef;
|
||||
|
||||
import com.android.quickstep.SystemUiProxy;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.util.StringJoiner;
|
||||
|
||||
/**
|
||||
* Normally Taskbar will auto-hide when entering immersive (fullscreen) apps. This controller allows
|
||||
* us to suspend that behavior in certain cases (e.g. opening a Folder or dragging an icon).
|
||||
*/
|
||||
public class TaskbarAutohideSuspendController {
|
||||
public class TaskbarAutohideSuspendController implements
|
||||
TaskbarControllers.LoggableTaskbarController {
|
||||
|
||||
public static final int FLAG_AUTOHIDE_SUSPEND_FULLSCREEN = 1 << 0;
|
||||
public static final int FLAG_AUTOHIDE_SUSPEND_DRAGGING = 1 << 1;
|
||||
|
||||
@IntDef(flag = true, value = {
|
||||
FLAG_AUTOHIDE_SUSPEND_FULLSCREEN,
|
||||
FLAG_AUTOHIDE_SUSPEND_DRAGGING,
|
||||
@@ -60,4 +64,21 @@ public class TaskbarAutohideSuspendController {
|
||||
}
|
||||
mSystemUiProxy.notifyTaskbarAutohideSuspend(mAutohideSuspendFlags != 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dumpLogs(String prefix, PrintWriter pw) {
|
||||
pw.println(prefix + "TaskbarAutohideSuspendController:");
|
||||
|
||||
pw.println(String.format(
|
||||
"%s\tmAutohideSuspendFlags=%s", prefix, getStateString(mAutohideSuspendFlags)));
|
||||
}
|
||||
|
||||
private static String getStateString(int flags) {
|
||||
StringJoiner str = new StringJoiner("|");
|
||||
str.add((flags & FLAG_AUTOHIDE_SUSPEND_FULLSCREEN) != 0
|
||||
? "FLAG_AUTOHIDE_SUSPEND_FULLSCREEN" : "");
|
||||
str.add((flags & FLAG_AUTOHIDE_SUSPEND_DRAGGING) != 0
|
||||
? "FLAG_AUTOHIDE_SUSPEND_DRAGGING" : "");
|
||||
return str.toString();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user