Skip to content

Commit

Permalink
Remove READ_CONTACTS permission from Play Store version
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mwild1 committed Mar 1, 2024
1 parent bc54fed commit eed90ce
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 4 deletions.
6 changes: 4 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
}
}

Expand Down
7 changes: 7 additions & 0 deletions src/conversationsFree/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.READ_CONTACTS" />

</manifest>
1 change: 0 additions & 1 deletion src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.READ_PROFILE" />
<uses-permission
android:name="android.permission.READ_PHONE_STATE"
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/eu/siacs/conversations/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ public static boolean multipleEncryptionChoices() {

public static final long CONTACT_SYNC_RETRY_INTERVAL = 1000L * 60 * 5;

// 2024-02-14: Contacts integration has been removed from Play Store builds, at least for now,
// due to Google aggressively delisting XMPP apps that use it, claiming that the apps are uploading
// contact lists to the server (even though they are not).
public static final boolean CONTACTS_INTEGRATION = BuildConfig.CONTACTS_INTEGRATION;

public static final boolean QUICKSTART_ENABLED = true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
private void checkContactPermissionAndShowAddDialog() {
if (hasContactsPermission()) {
showAddToPhoneBookDialog();
} else if (Build.VERSION.SDK_INT >= 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);
}
}
Expand Down

0 comments on commit eed90ce

Please sign in to comment.