Merge "Hide the Taskbar when user leaves PiP mode" into tm-dev

This commit is contained in:
Hongwei Wang
2022-03-23 22:38:48 +00:00
committed by Android (Google) Code Review
2 changed files with 24 additions and 0 deletions
@@ -5104,6 +5104,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. */