From 5073bcfddff0e39b77d824847e36f1111975ebb6 Mon Sep 17 00:00:00 2001 From: dev-12 Date: Tue, 30 Sep 2025 19:06:49 +0530 Subject: [PATCH] migrate to account removed callback from account manager --- app/src/main/AndroidManifest.xml | 9 ++++++--- .../owncloud/notes/receiver/AccountRemoveReceiver.java | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index bbb354c90..5b815edc2 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -7,6 +7,7 @@ + @@ -183,11 +184,13 @@ android:enabled="true" android:exported="true"/> - + android:permission="foundation.e.accountmanager.permission.ACCOUNT_EVENTS"> - + diff --git a/app/src/main/java/it/niedermann/owncloud/notes/receiver/AccountRemoveReceiver.java b/app/src/main/java/it/niedermann/owncloud/notes/receiver/AccountRemoveReceiver.java index 480a7d1a7..4c6d837d4 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/receiver/AccountRemoveReceiver.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/receiver/AccountRemoveReceiver.java @@ -39,13 +39,13 @@ public class AccountRemoveReceiver extends BroadcastReceiver { private static final String TAG = AccountRemoveReceiver.class.getSimpleName(); private static final String[] SUPPORTED_ACCOUNT_TYPES = {"e.foundation.webdav.eelo"}; - private static final String ACTION_ACCOUNT_REMOVE = "android.accounts.action.ACCOUNT_REMOVED"; + private static final String ACTION_ACCOUNT_REMOVED = "foundation.e.accountmanager.action.ACCOUNT_REMOVED"; private final ExecutorService executor = Executors.newCachedThreadPool(); @Override public void onReceive(Context context, Intent intent) { - if (!ACTION_ACCOUNT_REMOVE.equals(intent.getAction())) { + if (!ACTION_ACCOUNT_REMOVED.equals(intent.getAction())) { return; } -- GitLab