Add privacy dot flag for SystemUI
Add privacy dot flag, it is used to clearly indicate related components
to keep the maring spaces, or add related overlay views for it.
And also prevent NPE issues at b/199060326 even the phone configs for
cutout or rounded conrner are incorrect.
Detail:
1. ScreenDecorations:
a.Read privacy dot flag, and follow original
shouldShowRoundedCorner() method logic to provide another
shouldShowPrivacyDot() method. The existence of privacy dot container
is determinated throguht the return value of shouldShowPrivacyDot().
b. DisplayCutout::getCutout is a sync method, cache the return value
as local variable.
2. KeyguardStatusBarView: update keyguard status bar left/right margin
as this config.
3. StatusBarContentInsetsProvider: update phone status bar left/right
margin as this config
Bug: 190922585
Bug: 199060326
Bug: 199463850
Test: atest com.android.systemui.ScreenDecorationsTest
Change-Id: If1aa97b877ba374d6fa47615591bb91a4ebab421
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
index 37cc42e..6d0f276 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -711,4 +711,8 @@
<item>@drawable/rounded_corner_bottom</item>
<item>@drawable/rounded_corner_bottom_secondary</item>
</array>
+
+ <!-- Flag to enable privacy dot views, it shall be true for normal case -->
+ <bool name="config_enablePrivacyDot">true</bool>
+
</resources>