Hide the Taskbar when user leaves PiP mode

This is to prevent the Taskbar from flickering when the app settles in
full-screen mode.

Video: http://recall/-/aaaaaabFQoRHlzixHdtY/dIgvinb9yEB8MYfYDx0Ijy
Bug: 218450853
Test: see video
Change-Id: I9cfb0ca151dea6951561f78798bb16bafa48eba0
This commit is contained in:
Hongwei Wang
2022-03-22 17:37:03 -07:00
parent 6c7b0f7db8
commit 808d568367
2 changed files with 24 additions and 0 deletions
@@ -5102,6 +5102,19 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
mRecentsView.mPipCornerRadius = cornerRadius;
}
}
@Override
public void onExpandPip() {
MAIN_EXECUTOR.execute(() -> {
if (mRecentsView == null
|| mRecentsView.mSizeStrategy.getTaskbarController() == null) {
return;
}
// Hide the task bar when leaving PiP to prevent it from flickering once
// the app settles in full-screen mode.
mRecentsView.mSizeStrategy.getTaskbarController().onExpandPip();
});
}
}
/** Get the color used for foreground scrimming the RecentsView for sharing. */