Skip to content

Commit

Permalink
[android] Fix synchronized contacts not appearing in some contact apps
Browse files Browse the repository at this point in the history
Certain contact apps require the account to be syncable.
In order to do this, we implement a stubbed sync service
and adapter which does nothing and ask Android not to
call it. Preexisting installations of the app will need
to turn contact synchronization off and on again to
receive this fix.
Closes #6568.

Co-authored-by: paw <[email protected]>
  • Loading branch information
rezbyte and paw-hub committed Aug 30, 2024
1 parent 9ed7803 commit a1a95ba
Show file tree
Hide file tree
Showing 4 changed files with 589 additions and 121 deletions.
13 changes: 13 additions & 0 deletions app-android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS"/>
<uses-permission android:name="android.permission.USE_CREDENTIALS"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC"/>
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS"/>
<uses-permission
android:name="android.permission.SCHEDULE_EXACT_ALARM"
android:maxSdkVersion="32"/>
Expand Down Expand Up @@ -150,6 +151,18 @@
android:resource="@xml/authenticator"/>
</service>

<service
android:name=".StubSyncService"
android:exported="false"
android:process=":sync">
<intent-filter>
<action android:name="android.content.SyncAdapter"/>
</intent-filter>
<meta-data
android:name="android.content.SyncAdapter"
android:resource="@xml/syncadapter"/>
</service>


<receiver
android:name=".push.BootBroadcastReceiver"
Expand Down
Loading

0 comments on commit a1a95ba

Please sign in to comment.