Force Software Rendering for KeyguardClockFrame

Using hardware rendering disables the ability to intercept alpha
and handle it seperately. Enforcing a software layer for the view
in question prevents this from happening.

Bug: 288233136
Test: Manually tested the new setting
Change-Id: I8e1ea0769bdba27e880eea642176fdd2c25bfca4
This commit is contained in:
Hawkwood Glazier
2023-07-12 20:10:08 +00:00
parent d2b57db8d4
commit c9044de544

View File

@@ -12,6 +12,10 @@ class KeyguardClockFrame(
) : FrameLayout(context, attrs) { ) : FrameLayout(context, attrs) {
private var drawAlpha: Int = 255 private var drawAlpha: Int = 255
init {
setLayerType(View.LAYER_TYPE_SOFTWARE, null)
}
protected override fun onSetAlpha(alpha: Int): Boolean { protected override fun onSetAlpha(alpha: Int): Boolean {
drawAlpha = alpha drawAlpha = alpha
return true return true