From fa2b957796c0c06dc0ffbf7c8d7622d311ea23ea Mon Sep 17 00:00:00 2001 From: Prabir Pradhan Date: Tue, 23 Aug 2022 22:48:06 +0000 Subject: Prevent native methods in InputManagerService from being removed Add a proguard rule to prevent native methods in InputManagerService from being removed. If proguard removes one of these methods, the system crashes at boot when it tries to register the native implementation through JNI, resulting in a hard-to-debug bootloop. Bug: None Test: manual Change-Id: I528bd97c9ef179ff18e3e0ad95a4e9a015b7e6c9 --- services/proguard.flags | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/proguard.flags b/services/proguard.flags index c9303462fb6a..606f360f2cc5 100644 --- a/services/proguard.flags +++ b/services/proguard.flags @@ -104,6 +104,9 @@ -keep,allowoptimization,allowaccessmodification class com.android.server.input.InputManagerService { ; } +-keep,allowoptimization,allowaccessmodification class com.android.server.input.NativeInputManagerService$NativeImpl { + ; +} -keep,allowoptimization,allowaccessmodification class com.android.server.usb.UsbHostManager { *** usbDeviceRemoved(...); *** usbDeviceAdded(...); -- cgit v1.2.3-59-g8ed1b