Skip to content

Commit

Permalink
Merge pull request #2633 from EpicDima/epicdima/add_to_ignored_UiMode…
Browse files Browse the repository at this point in the history
…Manager_context_leak

Add known UiModeManager memory leak from Android OS
  • Loading branch information
pyricau committed Feb 17, 2024
2 parents 03d72b3 + 82b60ea commit b5e059c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions shark/shark-android/api/shark-android.api
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ public abstract class shark/AndroidReferenceMatchers : java/lang/Enum {
public static final field TEXT_TO_SPEECH Lshark/AndroidReferenceMatchers;
public static final field TEXT_VIEW__MLAST_HOVERED_VIEW Lshark/AndroidReferenceMatchers;
public static final field TOAST_TN Lshark/AndroidReferenceMatchers;
public static final field UI_MODE_MANAGER Lshark/AndroidReferenceMatchers;
public static final field USER_MANAGER__SINSTANCE Lshark/AndroidReferenceMatchers;
public static final field VIEWLOCATIONHOLDER_ROOT Lshark/AndroidReferenceMatchers;
public static final field VIEW_CONFIGURATION__MCONTEXT Lshark/AndroidReferenceMatchers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1021,6 +1021,25 @@ enum class AndroidReferenceMatchers {
}
},

UI_MODE_MANAGER {
override fun add(
references: MutableList<ReferenceMatcher>
) {
references += nativeGlobalVariableLeak(
"android.app.UiModeManager\$1",
description = """
UiModeManager$1 is an anonymous class of the IUiModeManagerCallback.Stub that is
stored in memory native code. `this$0` is an instance of the UiModeManager that
contains the `mContext` field, which is why retain this reference.
Introduced in Android 14.0.0_r11: https://cs.android.com/android/_/android/platform/frameworks/base/+/cbbc772a41d20645ae434d74c482f3f4ad377e2c
Fixed in Android 14.0.0_r16: https://cs.android.com/android/_/android/platform/frameworks/base/+/2bc364179327022d0f60224a1f2420349074c5d2
""".trimIndent()
) {
sdkInt == 34
}
}
},

// ######## Manufacturer specific known leaks ########

// SAMSUNG
Expand Down

0 comments on commit b5e059c

Please sign in to comment.