From 4928c1156d901755698a3eb56e56e9772b2af898 Mon Sep 17 00:00:00 2001 From: Damontecres Date: Mon, 11 May 2026 11:12:05 -0400 Subject: [PATCH] Fix cleaning up APKs on debug builds (#1373) ## Description Directly use "Wholphin" when searching for older APKs to clean up. On debug builds, the `app_name` string is "Wholphin (Debug)" but the APK file names is always "Wholphin.apk", so I think the debug build won't clean them up. ### Related issues Fixes #1368 ### Testing Testing downloading a few times without this change, applied the change, and clean up worked ## Screenshots N/A ## AI or LLM usage None --- .../com/github/damontecres/wholphin/services/UpdateChecker.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/github/damontecres/wholphin/services/UpdateChecker.kt b/app/src/main/java/com/github/damontecres/wholphin/services/UpdateChecker.kt index f2a0bd23..b56d8a7d 100644 --- a/app/src/main/java/com/github/damontecres/wholphin/services/UpdateChecker.kt +++ b/app/src/main/java/com/github/damontecres/wholphin/services/UpdateChecker.kt @@ -340,7 +340,7 @@ class UpdateChecker context.contentResolver.delete( MediaStore.Downloads.EXTERNAL_CONTENT_URI, "${MediaStore.MediaColumns.DISPLAY_NAME} LIKE ? AND ${MediaStore.MediaColumns.MIME_TYPE} = ?", - arrayOf(context.getString(R.string.app_name) + "%", APK_MIME_TYPE), + arrayOf("$ASSET_NAME%", APK_MIME_TYPE), ) Timber.i("Deleted $deletedRows rows") } else {