Fix wired charging ripple not showing up in multi-user mode.

Changed the Window type to TYPE_KEYGUARD_DIALOG to make the ripple show
up in non-owner user mode. Per android official doc, TYPE_SYSTEM_OVERLAY does not support multiuser -- "In multiuser systems shows only on the owning user's window." It's also deprecated.

This matches with the WirelssCharingAnimation Window type.

Please find the recording in the bug.

Bug: 266112677
Test: Manual & `adb shell cmd statusbar charging-ripple`
Change-Id: Ibc73d27d9c7272a4ae5dc4da4e894c020addd1e1
This commit is contained in:
Yein Jo
2023-02-02 22:28:59 +00:00
parent 71592cf7ff
commit bc80d7e585

View File

@@ -72,7 +72,7 @@ class WiredChargingRippleController @Inject constructor(
height = WindowManager.LayoutParams.MATCH_PARENT
layoutInDisplayCutoutMode = WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS
format = PixelFormat.TRANSLUCENT
type = WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY
type = WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG
fitInsetsTypes = 0 // Ignore insets from all system bars
title = "Wired Charging Animation"
flags = (WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE