diff --git a/java/proguard.flags b/java/proguard.flags
index 4da182b1fa2761ef46006f1e1bb75c722d8b5f05..c08a968bcfa5579e180454146b1b52a5dbd4b131 100644
--- a/java/proguard.flags
+++ b/java/proguard.flags
@@ -1,16 +1,16 @@
 # Keep classes and methods that have the @UsedForTesting annotation
 -keep @com.android.inputmethod.annotations.UsedForTesting class *
 -keepclassmembers class * {
-@com.android.inputmethod.annotations.UsedForTesting *;
+    @com.android.inputmethod.annotations.UsedForTesting *;
 }
 
 # Keep classes and methods that have the @ExternallyReferenced annotation
 -keep @com.android.inputmethod.annotations.ExternallyReferenced class *
 -keepclassmembers class * {
-@com.android.inputmethod.annotations.ExternallyReferenced *;
+    @com.android.inputmethod.annotations.ExternallyReferenced *;
 }
 
 # Keep native methods
--keep class * {
-native <methods>;
+-keepclassmembers class * {
+    native <methods>;
 }