Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1
- uses: gradle/actions/wrapper-validation@48b5f213c81028ace310571dc5ec0fbbca0b2947 # v4

checks:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -39,7 +39,9 @@ jobs:
- 21
- 23
- 26
# - 29 flaky
- 31
- 33
- 34
include:
- arch: x86
api-level: 16
Expand All @@ -49,11 +51,6 @@ jobs:
api-level: 19
target: google_apis
channel: stable
# Failing (something about permissions maybe?
# - arch: x86
# api-level: 30
# target: aosp_atd
# channel: canary
steps:
- name: Enable KVM group perms
run: |
Expand Down
2 changes: 2 additions & 0 deletions leakcanary/leakcanary-android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ android {
compileSdk = libs.versions.androidCompileSdk.get().toInt()
defaultConfig {
minSdk = libs.versions.androidMinSdk.get().toInt()
// Avoid DeprecatedTargetSdkVersionDialog / INSTALL_FAILED_DEPRECATED_SDK_VERSION on API 28+
targetSdk = libs.versions.androidCompileSdk.get().toInt()
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
buildFeatures.buildConfig = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,16 @@ internal class LeakActivityTest {
fun importHeapDumpFile() = tryAndRestoreConfig {
val latch = CountDownLatch(1)
LeakCanary.config = LeakCanary.config.run {
copy(eventListeners = eventListeners + EventListener { event ->
if (event is HeapAnalysisDone<*>) {
latch.countDown()
copy(
// Disable notifications to prevent RequestPermissionActivity from launching on API 33+
// (targetSdk >= 33 triggers POST_NOTIFICATIONS permission request which pauses LeakActivity)
showNotifications = false,
eventListeners = eventListeners + EventListener { event ->
if (event is HeapAnalysisDone<*>) {
latch.countDown()
}
}
})
)
}
val hprof = writeHeapDump {
"Holder" clazz {
Expand Down
Loading