From bc80d7e5857668e10415f941dd65993bd62ff2c6 Mon Sep 17 00:00:00 2001 From: Yein Jo Date: Thu, 2 Feb 2023 22:28:59 +0000 Subject: [PATCH] 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 --- .../android/systemui/charging/WiredChargingRippleController.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/charging/WiredChargingRippleController.kt b/packages/SystemUI/src/com/android/systemui/charging/WiredChargingRippleController.kt index fb0c0a69e7c84..5ca36ab39dba6 100644 --- a/packages/SystemUI/src/com/android/systemui/charging/WiredChargingRippleController.kt +++ b/packages/SystemUI/src/com/android/systemui/charging/WiredChargingRippleController.kt @@ -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