Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit eb33c9cb authored by shawnlin's avatar shawnlin
Browse files

Support hwc screen decoration layer

When the hwc supports screen decoration layer, we should:
  - create a fullscreen window and put the rounded corners and cutout in
    it.
  - set ViewRootImpl.setDisplayDecoration(true) for this window.
  - set COLOR_MODE_A8 for this window.
  - privacy dot should be put in windows with RGB color mode and only
    the window that the dot shows in will be shown. So there will be at
    most 2 windows(the fullscreen hwc window and the normal window that
    the visible dot is in) shown at the same time.

When the hwc not supports screen decoration layer, fallback to the
orignal 2 windows design.

Added a new class DisplayCutoutBaseView and move the common actions of a
cutout view from DisplayCutoutView to it:
  - Draw cutouts.
  - Handle camera protection.
  - Intercepts touches on cutout areas.

Handle the case when the support of hwc screen decorations is changed
due to display change.

Bug: 209498721
Test: atest ScreenDecorationsTest DisplayCutoutBaseViewTest
Change-Id: I286d5d368132381ad56798b794cd18f4ea5d03c5
parent 52855a06
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment