From eed90ced953b4d6ae1954da9ff7f94238508f2ba Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Fri, 1 Mar 2024 11:38:50 +0000 Subject: [PATCH] Remove READ_CONTACTS permission from Play Store version Google has been flagging all XMPP apps with this permission, claiming that they upload users' contacts to a third-party without properly disclosing such. The reality is that the contacts integration is actually entirely local, and allows you to (optionally) link your XMPP contacts with entries in your phone contacts, so you can see your preferred contact photo, etc. As nice a little feature as this is, it's probably not widely used, and it's not worth having Google delist the app entirely due to it. --- build.gradle | 6 ++++-- src/conversationsFree/AndroidManifest.xml | 7 +++++++ src/main/AndroidManifest.xml | 1 - src/main/java/eu/siacs/conversations/Config.java | 4 ++++ .../eu/siacs/conversations/ui/ContactDetailsActivity.java | 2 +- 5 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 src/conversationsFree/AndroidManifest.xml diff --git a/build.gradle b/build.gradle index 3ecc1c14f..6332dfde0 100644 --- a/build.gradle +++ b/build.gradle @@ -91,8 +91,8 @@ android { defaultConfig { minSdkVersion 21 targetSdkVersion 32 - versionCode 42050 - versionName "2.12.2" + versionCode 42051 + versionName "2.12.2-2" archivesBaseName += "-$versionName" applicationId "org.snikket.android" resValue "string", "applicationId", applicationId @@ -142,10 +142,12 @@ android { playstore { dimension "distribution" versionNameSuffix "+playstore" + buildConfigField "boolean", "CONTACTS_INTEGRATION", "false" } free { dimension "distribution" versionNameSuffix "+free" + buildConfigField "boolean", "CONTACTS_INTEGRATION", "true" } } diff --git a/src/conversationsFree/AndroidManifest.xml b/src/conversationsFree/AndroidManifest.xml new file mode 100644 index 000000000..9fd60596b --- /dev/null +++ b/src/conversationsFree/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + + + diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml index c18addf27..984bdc507 100644 --- a/src/main/AndroidManifest.xml +++ b/src/main/AndroidManifest.xml @@ -5,7 +5,6 @@ - = Build.VERSION_CODES.M) { + } else if (Config.CONTACTS_INTEGRATION && Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { requestPermissions(new String[]{Manifest.permission.READ_CONTACTS}, REQUEST_SYNC_CONTACTS); } }