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

Commit 9300cdba authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Add keep rules for WeaklyReferencedCallback annotation" into main am:...

Merge "Add keep rules for WeaklyReferencedCallback annotation" into main am: cc0bb805 am: be6deccf

Original change: https://android-review.googlesource.com/c/platform/build/+/3197595



Change-Id: I33f901608d19434a1b6d7b6e50a71934081a4e16
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents c5503599 be6deccf
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -38,6 +38,17 @@
  @com.android.internal.annotations.KeepForWeakReference <fields>;
}

# Needed to ensure callback field references are kept in their respective
# owning classes when the downstream callback registrars only store weak refs.
-if @com.android.internal.annotations.WeaklyReferencedCallback class *
-keepclassmembers,allowaccessmodification class * {
  <1> *;
}
-if class * extends @com.android.internal.annotations.WeaklyReferencedCallback **
-keepclassmembers,allowaccessmodification class * {
  <1> *;
}

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