From 4d8cd6a0d7b46cbfa3eda492e1ba62836fdacc86 Mon Sep 17 00:00:00 2001 From: Shan Huang Date: Wed, 14 Apr 2021 11:23:51 +0800 Subject: [PATCH] Set charging animation windows as trusted overlays so that touches can pass through. Test: Manual Bug: 184867824 Change-Id: I8f37b68ea48076eb9ad90aa1d7d200b9316a2253 --- .../com/android/systemui/charging/WirelessChargingAnimation.java | 1 + .../systemui/statusbar/charging/WiredChargingRippleController.kt | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/charging/WirelessChargingAnimation.java b/packages/SystemUI/src/com/android/systemui/charging/WirelessChargingAnimation.java index 1e86cf1d0171e..9d47bbb033800 100644 --- a/packages/SystemUI/src/com/android/systemui/charging/WirelessChargingAnimation.java +++ b/packages/SystemUI/src/com/android/systemui/charging/WirelessChargingAnimation.java @@ -121,6 +121,7 @@ public class WirelessChargingAnimation { params.setFitInsetsTypes(0 /* ignore all system bar insets */); params.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE; + params.setTrustedOverlay(); if (looper == null) { // Use Looper.myLooper() if looper is not specified. diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/charging/WiredChargingRippleController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/charging/WiredChargingRippleController.kt index fd060e6d486d8..ea2a531e7be23 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/charging/WiredChargingRippleController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/charging/WiredChargingRippleController.kt @@ -58,6 +58,7 @@ class WiredChargingRippleController @Inject constructor( title = "Wired Charging Animation" flags = (WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE or WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE) + setTrustedOverlay() } @VisibleForTesting