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
This commit is contained in:
Prabir Pradhan
2022-08-23 22:48:06 +00:00
parent 51603de7dd
commit fa2b957796

View File

@@ -104,6 +104,9 @@
-keep,allowoptimization,allowaccessmodification class com.android.server.input.InputManagerService {
<methods>;
}
-keep,allowoptimization,allowaccessmodification class com.android.server.input.NativeInputManagerService$NativeImpl {
<methods>;
}
-keep,allowoptimization,allowaccessmodification class com.android.server.usb.UsbHostManager {
*** usbDeviceRemoved(...);
*** usbDeviceAdded(...);