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
Loading
Please register or sign in to comment