aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Heckel <pheckel@datto.com>2022-12-09 21:26:52 -0500
committerPhilipp Heckel <pheckel@datto.com>2022-12-09 21:26:52 -0500
commit39d44056600004e1081a3c4ec5da5ef6a4579ea3 (patch)
tree6396eed1a7f4160ee19290be29a81bce61491ee0
parente4bc5abc016d49e6efeb3548ac9519adec28e99f (diff)
downloadponypush-39d44056600004e1081a3c4ec5da5ef6a4579ea3.tar.gz
ponypush-39d44056600004e1081a3c4ec5da5ef6a4579ea3.tar.bz2
ponypush-39d44056600004e1081a3c4ec5da5ef6a4579ea3.zip
Completely removed REQUEST_INSTALL_PACKAGES permission instead of stripping it out via gradle (32)
-rw-r--r--app/src/main/AndroidManifest.xml2
-rw-r--r--app/src/main/java/io/heckel/ntfy/util/Util.kt5
2 files changed, 6 insertions, 1 deletions
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 0950b40..4fb15f4 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -18,7 +18,7 @@
- Google rejected the permission for ntfy, so this permission is STRIPPED OUT by the build process
for the Google Play variant of the app.
-->
- <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES"/>
+ <!-- <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES"/> -->
<application
android:name=".app.Application"
diff --git a/app/src/main/java/io/heckel/ntfy/util/Util.kt b/app/src/main/java/io/heckel/ntfy/util/Util.kt
index 26b616c..2ffbb76 100644
--- a/app/src/main/java/io/heckel/ntfy/util/Util.kt
+++ b/app/src/main/java/io/heckel/ntfy/util/Util.kt
@@ -504,3 +504,8 @@ fun Button.dangerButton(context: Context) {
setTextColor(ContextCompat.getColor(context, Colors.dangerText(context)))
}
}
+
+fun Long.nullIfZero(): Long? {
+ return if (this == 0L) return null else this
+}
+