Add mechanism for customization of rounded corner insets
TaskBar and divider bar now draw fake rounded corners. We need a way to
report these fake rounded corners instead of the real ones.
1. A new field providedInternalTaskBarInsets is added in
WindowManager.Params for task bar(Launcher) to set.
- Set this field to the task bar height(not including rounded
corner height) when task bar is expanded.
- Set to 0 when task bar is stashed
2. A ned field mRoundedCornerFrame is added in InsetsState.
- The frame that rounded corners are relative to.
- It's used to re-calculate the fake rounded corners.
3. In WindowState.getInsetsState(), check below condition:
- It's a task
- The task bar insets is not empty
- In split screen
If all conditions are met, we use task bounds as new frame to
calculate rounded corners instead of display frame.
4. A new method RoundedCorners.insetsWithFrame() is added to handle such
case.
Bug: 196387239
Test: atest RoundedCornersTest
Change-Id: Icd6d39bd8cf6534531f7bbb209296785b76891db
5 files changed