Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3eb3ca0c authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Add keep rules for @KeepForWeakReference annotation"

parents 266225cc 7d0c90b5
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -15,6 +15,12 @@
@**.VisibleForTesting *;
}

# Keep rule for members that are needed solely to keep alive downstream weak
# references, and could otherwise be removed after tree shaking optimizations.
-keepclassmembers,allowaccessmodification,allowobfuscation,allowshrinking class * {
  @com.android.internal.annotations.KeepForWeakReference <fields>;
}

# Understand the common @Keep annotation from various Android packages:
#  * android.support.annotation
#  * androidx.annotation