From 87800837dd7b26973f6f6051f38068b58ff5e15e Mon Sep 17 00:00:00 2001 From: Mark Date: Wed, 14 Dec 2022 09:03:09 +0000 Subject: [PATCH] SyncSM10: explicitly keep TetheringUtils jni methods Found R8 accidentally remove TetheringUtils jni methods while doing some refactor. If any of jni java methods is removed by R8, devices would fail to boot because of jni registering failure. Explicitly adding progurad rule to make sure R8 never remove it. Test: boot, atest CtsTetheringTest Change-Id: I091a2f094d01f683fb454ed4624be35555940393 --- Tethering/proguard.flags | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Tethering/proguard.flags b/Tethering/proguard.flags index 109bbda584..47e284866b 100644 --- a/Tethering/proguard.flags +++ b/Tethering/proguard.flags @@ -15,6 +15,10 @@ native ; } +-keep class com.android.networkstack.tethering.util.TetheringUtils { + native ; +} + # Ensure runtime-visible field annotations are kept when using R8 full mode. -keepattributes RuntimeVisibleAnnotations,AnnotationDefault -keep interface com.android.networkstack.tethering.util.Struct$Field {