From 876d01da00fce68e889eaa6e10270eeef0b0b1da Mon Sep 17 00:00:00 2001 From: Philipp Heckel Date: Fri, 19 Sep 2025 14:55:21 -0400 Subject: [PATCH] Remove REQUEST_INSTALL_PACKAGES permission --- app/build.gradle | 18 ---------------- app/src/main/AndroidManifest.xml | 8 ------- app/src/main/java/io/heckel/ntfy/util/Util.kt | 21 ++++++++++++------- .../metadata/android/en-US/changelog/NEXT.txt | 3 +++ 4 files changed, 16 insertions(+), 34 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 6663949d..a2d4e1a0 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -53,12 +53,10 @@ android { play { buildConfigField 'boolean', 'FIREBASE_AVAILABLE', 'true' buildConfigField 'boolean', 'RATE_APP_AVAILABLE', 'true' - buildConfigField 'boolean', 'INSTALL_PACKAGES_AVAILABLE', 'false' } fdroid { buildConfigField 'boolean', 'FIREBASE_AVAILABLE', 'false' buildConfigField 'boolean', 'RATE_APP_AVAILABLE', 'false' - buildConfigField 'boolean', 'INSTALL_PACKAGES_AVAILABLE', 'true' } } @@ -82,22 +80,6 @@ android.applicationVariants.all { variant -> googleTask.enabled = shouldProcessGoogleServices } -// Strips out REQUEST_INSTALL_PACKAGES permission for Google Play variant -android.applicationVariants.all { variant -> - def shouldStripInstallPermission = variant.flavorName == "play" - if (shouldStripInstallPermission) { - variant.outputs.each { output -> - def processManifest = output.getProcessManifestProvider().get() - processManifest.doLast { task -> - def outputDir = task.getMultiApkManifestOutputDirectory().get().asFile - def manifestOutFile = file("$outputDir/AndroidManifest.xml") - def newFileContents = manifestOutFile.collect { s -> s.contains("android.permission.REQUEST_INSTALL_PACKAGES") ? "" : s }.join("\n") - manifestOutFile.write(newFileContents, 'UTF-8') - } - } - } -} - dependencies { // AndroidX, The Basics implementation "androidx.appcompat:appcompat:1.6.1" diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index cb991fa1..f13448a6 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -12,14 +12,6 @@ - - -