File tree Expand file tree Collapse file tree 2 files changed +2
-14
lines changed
app/src/main/kotlin/at/bitfire/davdroid Expand file tree Collapse file tree 2 files changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -6,10 +6,10 @@ package at.bitfire.davdroid.settings.migration
6
6
7
7
import android.accounts.Account
8
8
import android.accounts.AccountManager
9
+ import android.content.ContentResolver
9
10
import android.content.Context
10
11
import android.os.Build
11
12
import at.bitfire.davdroid.R
12
- import at.bitfire.davdroid.sync.adapter.SyncFrameworkIntegration
13
13
import dagger.Binds
14
14
import dagger.Module
15
15
import dagger.hilt.InstallIn
@@ -32,7 +32,6 @@ import javax.inject.Inject
32
32
*/
33
33
class AccountSettingsMigration21 @Inject constructor(
34
34
@ApplicationContext private val context : Context ,
35
- private val syncFrameworkIntegration : SyncFrameworkIntegration ,
36
35
private val logger : Logger
37
36
): AccountSettingsMigration {
38
37
@@ -58,7 +57,7 @@ class AccountSettingsMigration21 @Inject constructor(
58
57
private fun cancelSyncs (accountType : String ) {
59
58
accountManager.getAccountsByType(accountType).forEach { account ->
60
59
logger.info(" Android 14+: Canceling all (possibly forever pending) syncs for $account " )
61
- syncFrameworkIntegration .cancelSync(account, null )
60
+ ContentResolver .cancelSync(account, null )
62
61
}
63
62
}
64
63
Original file line number Diff line number Diff line change @@ -120,17 +120,6 @@ class SyncFrameworkIntegration @Inject constructor(
120
120
ContentResolver .cancelSync(syncRequest)
121
121
}
122
122
123
- /* *
124
- * Cancels all Sync Adapter Framework syncs (system wide) for given account and
125
- * authority. If authority is null, all syncs for the given account
126
- * regardless of authority are canceled.
127
- *
128
- * @param account The account for which syncs should be canceled.
129
- * @param authority Null or the authority for which syncs should be canceled.
130
- */
131
- fun cancelSync (account : Account , authority : String? ) =
132
- ContentResolver .cancelSync(account, authority)
133
-
134
123
/* *
135
124
* Enables/disables sync adapter automatic sync (content triggered sync) for the given
136
125
* account and authority. Does *not* call [ContentResolver.setIsSyncable].
You can’t perform that action at this time.
0 commit comments