diff --git a/.gitignore b/.gitignore index 05373ccf..198a321c 100644 --- a/.gitignore +++ b/.gitignore @@ -308,5 +308,6 @@ fabric.properties .idea/deploymentTargetSelector.xml .idea/copilot .idea/other.xml +.idea/studiobot.xml .kotlin \ No newline at end of file diff --git a/app/ui/src/main/java/de/mm20/launcher2/ui/base/AppWidgetHost.kt b/app/ui/src/main/java/de/mm20/launcher2/ui/base/AppWidgetHost.kt index f2648693..189dafff 100644 --- a/app/ui/src/main/java/de/mm20/launcher2/ui/base/AppWidgetHost.kt +++ b/app/ui/src/main/java/de/mm20/launcher2/ui/base/AppWidgetHost.kt @@ -7,8 +7,8 @@ import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.remember import androidx.compose.runtime.staticCompositionLocalOf import androidx.compose.ui.platform.LocalContext -import androidx.compose.ui.platform.LocalLifecycleOwner import androidx.lifecycle.Lifecycle +import androidx.lifecycle.compose.LocalLifecycleOwner import androidx.lifecycle.repeatOnLifecycle import de.mm20.launcher2.crashreporter.CrashReporter import kotlinx.coroutines.awaitCancellation @@ -24,7 +24,7 @@ fun ProvideAppWidgetHost( val context = LocalContext.current val widgetHost = remember { AppWidgetHost(context.applicationContext, 44203) } LaunchedEffect(null) { - lifecycleOwner.lifecycle.repeatOnLifecycle(Lifecycle.State.STARTED) { + lifecycleOwner.lifecycle.repeatOnLifecycle(Lifecycle.State.RESUMED) { widgetHost.startListening() try { awaitCancellation() diff --git a/app/ui/src/main/java/de/mm20/launcher2/ui/launcher/SharedLauncherActivity.kt b/app/ui/src/main/java/de/mm20/launcher2/ui/launcher/SharedLauncherActivity.kt index 9b324033..3cb3cf48 100644 --- a/app/ui/src/main/java/de/mm20/launcher2/ui/launcher/SharedLauncherActivity.kt +++ b/app/ui/src/main/java/de/mm20/launcher2/ui/launcher/SharedLauncherActivity.kt @@ -77,7 +77,6 @@ import de.mm20.launcher2.ui.locals.LocalWindowSize import de.mm20.launcher2.ui.overlays.OverlayHost import de.mm20.launcher2.ui.theme.LauncherTheme import de.mm20.launcher2.ui.theme.wallpaperColorsAsState -import kotlin.math.pow abstract class SharedLauncherActivity( @@ -195,7 +194,10 @@ abstract class SharedLauncherActivity( if (it != null) { enterTransitionProgress.value = 0f enterTransition = it - enterTransitionProgress.animateTo(100f, animationSpec = animMotionSpec) + enterTransitionProgress.animateTo( + 100f, + animationSpec = animMotionSpec + ) enterTransition = null } } @@ -275,10 +277,15 @@ abstract class SharedLauncherActivity( }, ) - is GestureAction.Widgets -> ScaffoldGesture( - component = widgetComponent, - animation = if (gesture.orientation == null) ScaffoldAnimation.ZoomIn else ScaffoldAnimation.Push, - ) + is GestureAction.Widgets -> + if (widgetsOnHomeScreen == true) { + null + } else { + ScaffoldGesture( + component = widgetComponent, + animation = if (gesture.orientation == null) ScaffoldAnimation.ZoomIn else ScaffoldAnimation.Push, + ) + } is GestureAction.Notifications -> ScaffoldGesture( component = NotificationsComponent, diff --git a/app/ui/src/main/java/de/mm20/launcher2/ui/launcher/search/SearchVM.kt b/app/ui/src/main/java/de/mm20/launcher2/ui/launcher/search/SearchVM.kt index 4f1f55f1..622303a2 100644 --- a/app/ui/src/main/java/de/mm20/launcher2/ui/launcher/search/SearchVM.kt +++ b/app/ui/src/main/java/de/mm20/launcher2/ui/launcher/search/SearchVM.kt @@ -214,7 +214,7 @@ class SearchVM : ViewModel(), KoinComponent { if (query.isEmpty()) { val hiddenItemKeys = if (!filters.hiddenItems) { searchableRepository.getKeys( - maxVisibility = VisibilityLevel.Hidden, + maxVisibility = VisibilityLevel.SearchOnly, includeTypes = listOf("app"), ) } else { @@ -275,18 +275,18 @@ class SearchVM : ViewModel(), KoinComponent { appResults.updateItems( results.apps - ?.filterNot { hiddenKeys.contains(it.key) } - ?.applyRanking(query) + ?.filterNot { hiddenKeys.contains(it.key) } + ?.applyRanking(query) ) appShortcutResults.updateItems( results.shortcuts - ?.filterNot { hiddenKeys.contains(it.key) } - ?.applyRanking(query) + ?.filterNot { hiddenKeys.contains(it.key) } + ?.applyRanking(query) ) fileResults.updateItems( results.files - ?.filterNot { hiddenKeys.contains(it.key) } - ?.applyRanking(query) + ?.filterNot { hiddenKeys.contains(it.key) } + ?.applyRanking(query) ) contactResults.updateItems( diff --git a/app/ui/src/main/java/de/mm20/launcher2/ui/launcher/sheets/EditFavoritesSheet.kt b/app/ui/src/main/java/de/mm20/launcher2/ui/launcher/sheets/EditFavoritesSheet.kt index 705b1783..c59b28be 100644 --- a/app/ui/src/main/java/de/mm20/launcher2/ui/launcher/sheets/EditFavoritesSheet.kt +++ b/app/ui/src/main/java/de/mm20/launcher2/ui/launcher/sheets/EditFavoritesSheet.kt @@ -119,10 +119,13 @@ fun EditFavoritesSheet( .align(Alignment.Center) ) } - } else if (createShortcutTarget != null) { - ShortcutPicker(viewModel, it) } else { ReorderFavoritesGrid(viewModel, it) + if (createShortcutTarget != null) { + BottomSheetDialog({viewModel.cancelPickShortcut()}) { + ShortcutPicker(viewModel, it) + } + } } } } diff --git a/app/ui/src/main/java/de/mm20/launcher2/ui/settings/gestures/GestureSettingsScreen.kt b/app/ui/src/main/java/de/mm20/launcher2/ui/settings/gestures/GestureSettingsScreen.kt index 73066d09..7a3ff0be 100644 --- a/app/ui/src/main/java/de/mm20/launcher2/ui/settings/gestures/GestureSettingsScreen.kt +++ b/app/ui/src/main/java/de/mm20/launcher2/ui/settings/gestures/GestureSettingsScreen.kt @@ -52,6 +52,7 @@ fun GestureSettingsScreen() { val viewModel: GestureSettingsScreenVM = viewModel() val hasPermission by viewModel.hasPermission.collectAsStateWithLifecycle(null) + val allowWidgetGesture by viewModel.allowWidgetGesture.collectAsStateWithLifecycle(null) val options = buildList { add(stringResource(R.string.gesture_action_none) to GestureAction.NoAction) @@ -61,7 +62,7 @@ fun GestureSettingsScreen() { add(stringResource(R.string.gesture_action_recents) to GestureAction.Recents) add(stringResource(R.string.gesture_action_power_menu) to GestureAction.PowerMenu) add(stringResource(R.string.gesture_action_open_search) to GestureAction.Search) - add(stringResource(R.string.gesture_action_widgets) to GestureAction.Widgets) + if (allowWidgetGesture == true) add(stringResource(R.string.gesture_action_widgets) to GestureAction.Widgets) add(stringResource(R.string.gesture_action_launch_app) to GestureAction.Launch(null)) } @@ -265,7 +266,7 @@ fun GesturePreference( icon = icon, items = options, value = value, - summary = options.find { value?.javaClass == it.second.javaClass }?.first, + summary = options.find { value?.javaClass == it.second.javaClass }?.first ?: stringResource(R.string.gesture_action_none), onValueChanged = { if (it != null) onValueChanged(it) } ) } diff --git a/app/ui/src/main/java/de/mm20/launcher2/ui/settings/gestures/GestureSettingsScreenVM.kt b/app/ui/src/main/java/de/mm20/launcher2/ui/settings/gestures/GestureSettingsScreenVM.kt index 1471af46..1f2fc989 100644 --- a/app/ui/src/main/java/de/mm20/launcher2/ui/settings/gestures/GestureSettingsScreenVM.kt +++ b/app/ui/src/main/java/de/mm20/launcher2/ui/settings/gestures/GestureSettingsScreenVM.kt @@ -34,6 +34,9 @@ class GestureSettingsScreenVM : ViewModel(), KoinComponent { val hasPermission = permissionsManager.hasPermission(PermissionGroup.Accessibility) .stateIn(viewModelScope, SharingStarted.WhileSubscribed(), null) + val allowWidgetGesture = uiSettings.homeScreenWidgets.map { it == false } + .stateIn(viewModelScope, SharingStarted.WhileSubscribed(), null) + val swipeDown = gestureSettings.swipeDown .stateIn(viewModelScope, SharingStarted.WhileSubscribed(), null) val swipeLeft = gestureSettings.swipeLeft diff --git a/app/ui/src/main/java/de/mm20/launcher2/ui/settings/homescreen/HomescreenSettingsScreenVM.kt b/app/ui/src/main/java/de/mm20/launcher2/ui/settings/homescreen/HomescreenSettingsScreenVM.kt index 7867b26f..fec61653 100644 --- a/app/ui/src/main/java/de/mm20/launcher2/ui/settings/homescreen/HomescreenSettingsScreenVM.kt +++ b/app/ui/src/main/java/de/mm20/launcher2/ui/settings/homescreen/HomescreenSettingsScreenVM.kt @@ -157,38 +157,6 @@ class HomescreenSettingsScreenVM( fun setWidgetsOnHomeScreen(widgetsOnHomeScreen: Boolean) { uiSettings.setHomeScreenWidgets(widgetsOnHomeScreen) - viewModelScope.launch { - val gestures = gestureSettings.first() - if (widgetsOnHomeScreen) { - if (gestures.swipeUp is GestureAction.Widgets) { - gestureSettings.setSwipeUp(GestureAction.NoAction) - } else if (gestures.swipeRight is GestureAction.Widgets) { - gestureSettings.setSwipeUp(GestureAction.NoAction) - } else if (gestures.swipeLeft is GestureAction.Widgets) { - gestureSettings.setSwipeUp(GestureAction.NoAction) - } else if (gestures.swipeDown is GestureAction.Widgets) { - gestureSettings.setSwipeUp(GestureAction.NoAction) - } else if (gestures.longPress is GestureAction.Widgets) { - gestureSettings.setLongPress(GestureAction.NoAction) - } else if (gestures.doubleTap is GestureAction.Widgets) { - gestureSettings.setDoubleTap(GestureAction.NoAction) - } - } else { - if (gestures.swipeUp is GestureAction.NoAction || gestures.swipeUp is GestureAction.Widgets) { - gestureSettings.setSwipeUp(GestureAction.Widgets) - } else if (gestures.swipeRight is GestureAction.NoAction || gestures.swipeRight is GestureAction.Widgets) { - gestureSettings.setSwipeRight(GestureAction.Widgets) - } else if (gestures.swipeLeft is GestureAction.NoAction || gestures.swipeLeft is GestureAction.Widgets) { - gestureSettings.setSwipeLeft(GestureAction.Widgets) - } else if (gestures.swipeDown is GestureAction.NoAction || gestures.swipeDown is GestureAction.Widgets) { - gestureSettings.setSwipeDown(GestureAction.Widgets) - } else if (gestures.longPress is GestureAction.NoAction || gestures.longPress is GestureAction.Widgets) { - gestureSettings.setLongPress(GestureAction.Widgets) - } else if (gestures.doubleTap is GestureAction.NoAction || gestures.doubleTap is GestureAction.Widgets) { - gestureSettings.setDoubleTap(GestureAction.Widgets) - } - } - } } companion object : KoinComponent { diff --git a/core/i18n/src/main/res/values-it/strings.xml b/core/i18n/src/main/res/values-it/strings.xml index 94d155c3..ede85009 100644 --- a/core/i18n/src/main/res/values-it/strings.xml +++ b/core/i18n/src/main/res/values-it/strings.xml @@ -589,7 +589,7 @@ Semplice Orbita Binario - Mani + Lancette 7 segmenti Nessun orologio Delineato diff --git a/core/i18n/src/main/res/values-pt/strings.xml b/core/i18n/src/main/res/values-pt/strings.xml index ef7dfb8b..96d7dd44 100644 --- a/core/i18n/src/main/res/values-pt/strings.xml +++ b/core/i18n/src/main/res/values-pt/strings.xml @@ -554,7 +554,7 @@ Aplicação Modelo de URL Ativar plugin - Pesquisa de ficheiros + Ficheiros Experimental Já existe uma etiqueta com este nome. Já existe uma etiqueta com este nome. Se continuar, as etiquetas serão combinadas. @@ -799,4 +799,63 @@ 24 horas 12 horas Padrão do sistema + Importar tema + O tema já existe e será atualizado + Transparente + Sólida + Oculta + Conteúdo + Ponteiros 2 + Exportar tema + Alto contraste + Nome + Autor + Padrão + Super redonda + Formas + Forma base + Retangular + Tem a certeza de que deseja eliminar o esquema de formas %1$s? + Parabéns, acabou de se bloquear! + Abrir Breezy Weather + Transparência + Padrão + Semi-transparente + Breezy Weather + (sem nome) + Para utilizar Breezy Weather como serviço meteorológico:\n\n1. Aceda a Breezy Weather > Definições > Widgets & Papel de parede > Enviara dados Gadgetbridge > Ativar%1$s\n\n2. Em %1$s, selecione Breezy Weather como serviço de meteorologia. + Barra de progresso interativa + A permissão Tasks é necessária para a integração Tasks + Gerir localização em Breezy Weather + Nada selecionado + Guardar como ficheiro + Breezy Weather + Contactos + Tem a certeza de que deseja eliminar o esquema de transparência %1$s? + Instalar + A permissão Tasks é necessária para pesquisar tarefas + Tarefas + Pesquisar tarefas na aplicação Tasks + Tasks + Tasks é uma aplicação open souce para gerir tarefas, listas e lembretes. Se instalada, %1$s pode mostrar e pesquisar as tarefas na aplicação. + Integração com Tasks finalizada e pronta para utilização. + + +%1$d tarefa por realizar + +%1$d tarefas por realizar + +%1$d tarefas por realizar + + Tipografia + Breezy Weather é uma aplicação open source de meteorologia. Se instalada, %1$s pode utilizar Breezy Weather com a fonte de dados meteorológicos. + Tem a certeza de que deseja eliminar o esquema tipográfico %1$s? + Tipo de letra + Definições do dispositivo + Tipo de letra padrão + Tipo de letra do dispositivo + Genérica + Widgets no ecrã principal + Deslize acima + Mostrar widgets no ecrã principal e não em página secundária + Widgets + Você conseguir encontrar uma combinação de definições em não é possível aceder às pesquisas e às definições. Acabou de se bloquear. + Abrir Tasks \ No newline at end of file diff --git a/core/i18n/src/main/res/values-zh-rCN/strings.xml b/core/i18n/src/main/res/values-zh-rCN/strings.xml index 862270e6..bd8979c6 100644 --- a/core/i18n/src/main/res/values-zh-rCN/strings.xml +++ b/core/i18n/src/main/res/values-zh-rCN/strings.xml @@ -575,7 +575,7 @@ 开启于 %1$s, %2$s 在地图上查看 打开网站 - 您需要先设置该插件 + 您需要先设置此插件 此插件未正常运行 Bug 报告 长度单位 @@ -613,7 +613,7 @@ 支持的单位 链接的文件不为空,且其内容与此笔记的上次保存版本不匹配。您想保留哪个版本? 错误读取注释 - 无法读取链接文件。可能已被移动或删除。已从启动器的内部存储中恢复副本。如果您编辑笔记,链接文件可能会被覆盖 + 无法读取链接的文件,可能其已被移动或删除。已从启动器的存储中恢复副本。如果您编辑笔记,链接的文件可能会被覆盖。 保存笔记时出错 从原色开始 无法读取所选文件。请确保您选择的是有效的主题文件 (*.kvtheme),并且该文件未损坏。 @@ -793,4 +793,63 @@ 12小时 系统默认 需要通话权限才能开始通话 + 已有的样式将会被覆盖 + 透明 + 隐藏 + 填充 + 文件包含 + 标题字体 + 导入样式 + 刻度 + 导出样式 + 高对比度 + 形状 + 默认 + 直角 + 大圆角 + 基础形状 + 向上滑动 + 组件页 + 删除形状预设“%1$s”吗? + 你探索出了一套访问不了搜索和组件页的配置,使你无法进入设置 — 让启动器桌面变成了启动弃。 + 默认 + 透明度 + 半透明 + 删除透明度预设“%1$s”吗? + 雷雨 + 雾霾 + 任务 + 打开 Breezy Weather + 未选 + 保存为文件 + Breezy Weather + 名称 + 作者 + Breezy Weather + 在 Breezy Weather 中管理位置 + 搜索在 Tasks 应用中的任务 + (新建) + 设备默认的 + 可交互进度条 + 删除字体预设“%1$s”吗? + 恭喜!你给你自个儿锁里头了! + 需要 Tasks 权限来接入 Tasks 应用 + 要使用 Breezy Weather 作为天气数据源:\n\n1. 启用 Breezy Weather > 设置 > 微件与动态壁纸 > 发送天气数据到 Gadgetbridge 中的 %1$s\n\n2. 在 %1$s 中将 Breezy Weather 设为天气数据源 + 安装 + Tasks + 已成功接入 Tasks 并可以开始使用了。 + Tasks 是一个免费的开源 to-do 及提醒事项应用。如果已经安装,%1$s 可以显示并搜索在 Tasks 应用中的任务。 + + +%1$d 个未完成任务 + + 需要 Tasks 应用权限来搜索任务 + 文字 + 字体 + Breezy Weather 是一款免费的开源天气应用。安装后 %1$s 可将其作为天气数据的数据源。 + 正文字体 + 常规字体 + 直达组件 + 在主屏幕而不是组件页显示组件 + 标签必须拥有一个名字。如果继续设为空,这个标签会被删除。 + 打开 Tasks 应用 \ No newline at end of file diff --git a/core/i18n/src/main/res/values-zh-rCN/units.xml b/core/i18n/src/main/res/values-zh-rCN/units.xml index d4a5b295..b6530c50 100644 --- a/core/i18n/src/main/res/values-zh-rCN/units.xml +++ b/core/i18n/src/main/res/values-zh-rCN/units.xml @@ -4,7 +4,7 @@ 米 - 公里 + 千米 厘米 @@ -119,28 +119,28 @@ 吉位字节 - 万亿位字节 + 太位字节 千比特 - kbit - Mbit + kb + Mb 兆比特 - Gbit + Gb 吉比特 - 万亿比特 + TB - terabits + 太比特 m/s km/h - 公里每小时 + 千米每小时 mph @@ -160,7 +160,7 @@ t - 公吨 + 吨 tn.l. @@ -192,7 +192,7 @@ 开 - 万亿字节 + 太字节 kiB diff --git a/core/i18n/src/main/res/values-zh-rTW/strings.xml b/core/i18n/src/main/res/values-zh-rTW/strings.xml index 60750bb4..ba4f6b0f 100644 --- a/core/i18n/src/main/res/values-zh-rTW/strings.xml +++ b/core/i18n/src/main/res/values-zh-rTW/strings.xml @@ -66,7 +66,7 @@ 西北偏西 西北 西北偏北 - https://en.wikipedia.org + https://zh.wikipedia.org/zh-tw/ 來自維基百科 標題:%1$s 藝術家:%1$s @@ -620,7 +620,7 @@ 線上結果 應用程式 中間 - 顯示秒 + 顯示秒數 底部 動態區域 自訂篩選器列 @@ -845,4 +845,9 @@ 向上滑動 小工具 開啟 Tasks 應用程式 + 不透明 + 隱藏 + 透明 + 時鐘標記 + 互動式播放器進度條 \ No newline at end of file diff --git a/data/appshortcuts/build.gradle.kts b/data/appshortcuts/build.gradle.kts index 3af37414..8dac9f39 100644 --- a/data/appshortcuts/build.gradle.kts +++ b/data/appshortcuts/build.gradle.kts @@ -54,5 +54,6 @@ dependencies { implementation(project(":core:ktx")) implementation(project(":core:crashreporter")) implementation(project(":core:preferences")) + implementation(project(":core:profiles")) } \ No newline at end of file diff --git a/data/appshortcuts/src/main/java/de/mm20/launcher2/appshortcuts/AppShortcutRepository.kt b/data/appshortcuts/src/main/java/de/mm20/launcher2/appshortcuts/AppShortcutRepository.kt index 4dee8303..f5da3137 100644 --- a/data/appshortcuts/src/main/java/de/mm20/launcher2/appshortcuts/AppShortcutRepository.kt +++ b/data/appshortcuts/src/main/java/de/mm20/launcher2/appshortcuts/AppShortcutRepository.kt @@ -13,6 +13,7 @@ import de.mm20.launcher2.ktx.normalize import de.mm20.launcher2.permissions.PermissionGroup import de.mm20.launcher2.permissions.PermissionsManager import de.mm20.launcher2.preferences.search.ShortcutSearchSettings +import de.mm20.launcher2.profiles.ProfileManager import de.mm20.launcher2.search.AppShortcut import de.mm20.launcher2.search.ResultScore import de.mm20.launcher2.search.SearchableRepository @@ -27,6 +28,7 @@ import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.SharingStarted import kotlinx.coroutines.flow.callbackFlow import kotlinx.coroutines.flow.combine +import kotlinx.coroutines.flow.first import kotlinx.coroutines.flow.flow import kotlinx.coroutines.flow.flowOf import kotlinx.coroutines.flow.map @@ -54,6 +56,7 @@ internal class AppShortcutRepositoryImpl( private val context: Context, private val permissionsManager: PermissionsManager, private val settings: ShortcutSearchSettings, + private val profileManager: ProfileManager, ) : AppShortcutRepository { private val scope = CoroutineScope(Dispatchers.Default + Job()) @@ -213,9 +216,9 @@ internal class AppShortcutRepositoryImpl( val launcherApps = context.getSystemService(Context.LAUNCHER_APPS_SERVICE) as LauncherApps if (!launcherApps.hasShortcutHostPermission()) return emptyList() val results = mutableListOf() - val profiles = launcherApps.profiles + val profiles = profileManager.activeProfiles.first() for (profile in profiles) { - val activities = launcherApps.getShortcutConfigActivityList(null, profile) + val activities = launcherApps.getShortcutConfigActivityList(null, profile.userHandle) results.addAll( activities.map { AppShortcutConfigActivity(it) diff --git a/data/appshortcuts/src/main/java/de/mm20/launcher2/appshortcuts/Module.kt b/data/appshortcuts/src/main/java/de/mm20/launcher2/appshortcuts/Module.kt index 67b7bead..49bd6dcf 100644 --- a/data/appshortcuts/src/main/java/de/mm20/launcher2/appshortcuts/Module.kt +++ b/data/appshortcuts/src/main/java/de/mm20/launcher2/appshortcuts/Module.kt @@ -8,7 +8,7 @@ import org.koin.core.qualifier.named import org.koin.dsl.module val appShortcutsModule = module { - factory { AppShortcutRepositoryImpl(androidContext(), get(), get()) } + factory { AppShortcutRepositoryImpl(androidContext(), get(), get(), get()) } factory>(named()) { get() } factory(named(LauncherShortcut.Domain)) { LauncherShortcutDeserializer(androidContext()) } factory(named(LegacyShortcut.Domain)) { LegacyShortcutDeserializer(androidContext()) } diff --git a/docs/index.md b/docs/index.md index 7609d8d0..0e30c1bf 100644 --- a/docs/index.md +++ b/docs/index.md @@ -23,6 +23,6 @@ hero: - Wallpaper by Allec Gomes on Unspash.com + Wallpaper by Allec Gomes on Unsplash.com diff --git a/services/widgets/src/main/java/de/mm20/launcher2/services/widgets/WidgetsService.kt b/services/widgets/src/main/java/de/mm20/launcher2/services/widgets/WidgetsService.kt index a2766c13..34b652c0 100644 --- a/services/widgets/src/main/java/de/mm20/launcher2/services/widgets/WidgetsService.kt +++ b/services/widgets/src/main/java/de/mm20/launcher2/services/widgets/WidgetsService.kt @@ -33,6 +33,7 @@ class WidgetsService( for (profile in profiles) { widgets.addAll(appWidgetManager.getInstalledProvidersForProfile(profile)) } + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { // Ignore widgets that the launcher is not supposed to access widgets.filter { @@ -41,7 +42,6 @@ class WidgetsService( } else { widgets } - widgets } fun getAvailableBuiltInWidgets(): Flow> {