Suspend immersive mode autohide while pending transient taskbar timeout

Test: open Youtube fullscreen video, swipe up on taskbar; ensure taskbar autostashes before immersive mode autohides
Fixes: 260765455
Flag: none
Change-Id: Ic579a20c60949e12ffc7f9548eded52fbdb06e0c
This commit is contained in:
Jagrut Desai committed 2023-06-16 15:42:57 -07:00
1 parent 0171c356c6
commit 68ca974330
2 files changed
+28 -7

No files matched your search

@@ -41,8 +41,10 @@ public class TaskbarAutohideSuspendController implements
public static final int FLAG_AUTOHIDE_SUSPEND_TOUCHING = 1 << 2;
// Taskbar EDU overlay is open above the Taskbar. */
public static final int FLAG_AUTOHIDE_SUSPEND_EDU_OPEN = 1 << 3;
// Taskbar in immersive mode in overview
// Taskbar is in immersive mode in overview
public static final int FLAG_AUTOHIDE_SUSPEND_IN_LAUNCHER = 1 << 4;
// Transient Taskbar is temporarily unstashed (pending a timeout).
public static final int FLAG_AUTOHIDE_SUSPEND_TRANSIENT_TASKBAR = 1 << 5;
@IntDef(flag = true, value = {
FLAG_AUTOHIDE_SUSPEND_FULLSCREEN,
@@ -50,6 +52,7 @@ public class TaskbarAutohideSuspendController implements
FLAG_AUTOHIDE_SUSPEND_TOUCHING,
FLAG_AUTOHIDE_SUSPEND_EDU_OPEN,
FLAG_AUTOHIDE_SUSPEND_IN_LAUNCHER,
FLAG_AUTOHIDE_SUSPEND_TRANSIENT_TASKBAR,
})
@Retention(RetentionPolicy.SOURCE)
public @interface AutohideSuspendFlag {}
@@ -85,20 +88,30 @@ public class TaskbarAutohideSuspendController implements
boolean isSuspended = isSuspended();
mSystemUiProxy.notifyTaskbarAutohideSuspend(isSuspended);
mActivity.onTransientAutohideSuspendFlagChanged(isSuspended);
mActivity.onTransientAutohideSuspendFlagChanged(isTransientTaskbarStashingSuspended());
}
/**
* Returns true iff taskbar autohide is currently suspended.
*/
public boolean isSuspended() {
private boolean isSuspended() {
return mAutohideSuspendFlags != 0;
}
public boolean isSuspendedForTransientTaskbarInOverview() {
/**
* Returns whether Transient Taskbar should avoid auto-stashing in Launcher(Overview).
*/
public boolean isSuspendedForTransientTaskbarInLauncher() {
return (mAutohideSuspendFlags & FLAG_AUTOHIDE_SUSPEND_IN_LAUNCHER) != 0;
}
/**
* Returns whether Transient Taskbar should avoid auto-stashing.
*/
public boolean isTransientTaskbarStashingSuspended() {
return (mAutohideSuspendFlags & ~FLAG_AUTOHIDE_SUSPEND_TRANSIENT_TASKBAR) != 0;
}
@Override
public void dumpLogs(String prefix, PrintWriter pw) {
pw.println(prefix + "TaskbarAutohideSuspendController:");
@@ -115,6 +128,8 @@ public class TaskbarAutohideSuspendController implements
appendFlag(str, flags, FLAG_AUTOHIDE_SUSPEND_EDU_OPEN, "FLAG_AUTOHIDE_SUSPEND_EDU_OPEN");
appendFlag(str, flags, FLAG_AUTOHIDE_SUSPEND_IN_LAUNCHER,
"FLAG_AUTOHIDE_SUSPEND_IN_LAUNCHER");
appendFlag(str, flags, FLAG_AUTOHIDE_SUSPEND_TRANSIENT_TASKBAR,
"FLAG_AUTOHIDE_SUSPEND_TRANSIENT_TASKBAR");
return str.toString();
}
}