From 5d2298bb1e47b591c13ca9c22dc97f77ddb50440 Mon Sep 17 00:00:00 2001 From: Fahim Salam Chowdhury Date: Wed, 19 Oct 2022 12:17:21 +0600 Subject: [PATCH] 770-Disable_dynamic_shortcut_feature issue: https://gitlab.e.foundation/e/os/backlog/-/issues/770 App shortcut features required launcher activity. As app has no launcher activity, dynamic shortcut setup & update failed & throws exception. & Since app has no launcher activity, we don't required the app shortcut feature. --- app/src/main/java/at/bitfire/davdroid/App.kt | 3 --- app/src/main/java/at/bitfire/davdroid/ui/AccountsActivity.kt | 5 ----- 2 files changed, 8 deletions(-) diff --git a/app/src/main/java/at/bitfire/davdroid/App.kt b/app/src/main/java/at/bitfire/davdroid/App.kt index c6aa1d245..690bbbc75 100644 --- a/app/src/main/java/at/bitfire/davdroid/App.kt +++ b/app/src/main/java/at/bitfire/davdroid/App.kt @@ -84,9 +84,6 @@ class App: Application(), Thread.UncaughtExceptionHandler { // check whether a tasks app is currently installed SyncUtils.updateTaskSync(this) - // create/update app shortcuts - UiUtils.updateShortcuts(this) - // check/repair sync intervals AccountSettings.repairSyncIntervals(this) } diff --git a/app/src/main/java/at/bitfire/davdroid/ui/AccountsActivity.kt b/app/src/main/java/at/bitfire/davdroid/ui/AccountsActivity.kt index a38d1d0ad..072e5dde4 100644 --- a/app/src/main/java/at/bitfire/davdroid/ui/AccountsActivity.kt +++ b/app/src/main/java/at/bitfire/davdroid/ui/AccountsActivity.kt @@ -10,8 +10,6 @@ import android.content.ContentResolver import android.content.Context import android.content.Intent import android.content.SyncStatusObserver -import android.content.pm.ShortcutManager -import android.os.Build import android.os.Bundle import android.view.MenuItem import androidx.activity.viewModels @@ -136,9 +134,6 @@ class AccountsActivity: AppCompatActivity(), NavigationView.OnNavigationItemSele AccountManager.get(this).getAccountsByType(getString(R.string.account_type)) fun syncAllAccounts(item: MenuItem? = null) { - if (Build.VERSION.SDK_INT >= 25) - getSystemService()?.reportShortcutUsed(UiUtils.SHORTCUT_SYNC_ALL) - val accounts = allAccounts() for (account in accounts) DavUtils.requestSync(this, account) -- GitLab