From 1f6c971caba4d5cf78ac561b0cec006a2c482a1b Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Tue, 29 Oct 2019 10:27:48 +0530 Subject: [PATCH] Add IRequestFinishCallback leak from Android 10 (#1608) Signed-off-by: Harsh Shandilya --- .../main/java/shark/AndroidReferenceMatchers.kt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/shark-android/src/main/java/shark/AndroidReferenceMatchers.kt b/shark-android/src/main/java/shark/AndroidReferenceMatchers.kt index ad8f6d28bc..fc1aab5142 100644 --- a/shark-android/src/main/java/shark/AndroidReferenceMatchers.kt +++ b/shark-android/src/main/java/shark/AndroidReferenceMatchers.kt @@ -50,6 +50,23 @@ enum class AndroidReferenceMatchers { // ######## Android Framework known leaks ######## + IREQUEST_FINISH_CALLBACK { + override fun add( + references: MutableList + ) { + references += instanceFieldLeak("android.app.Activity\$1", "this\$0", + description = "Android Q added a new android.app.IRequestFinishCallback\$Stub " + + "class. android.app.Activity creates an implementation of that interface as an " + + "anonymous subclass. That anonymous subclass has a reference to the activity. " + + "Another process is keeping the android.app.IRequestFinishCallback\$Stub " + + "reference alive long after Activity.onDestroyed() has been called, " + + "causing the activity to leak." + ) { + sdkInt == 29 + } + } + }, + ACTIVITY_CLIENT_RECORD__NEXT_IDLE { override fun add( references: MutableList