diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index beb17782f..b6a231beb 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -77,6 +77,9 @@ + + + { @@ -75,6 +76,25 @@ fun HomePage() { navController.toDestinationsNavigator().navigate(SnapshotPageDestination) } } + } else if (uri != null && intent.getStringExtra("source") == OpenFileActivity::class.qualifiedName) { + vm.viewModelScope.launchTry(Dispatchers.IO) { + toast("加载导入...") + vm.tabFlow.value = subsPage.navItem + importData(uri) + } + } else if (intent.action == TileService.ACTION_QS_TILE_PREFERENCES) { + val qsTileCpt = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { + intent.getParcelableExtra(Intent.EXTRA_COMPONENT_NAME, ComponentName::class.java) + } else { + @Suppress("DEPRECATION") + intent.getParcelableExtra(Intent.EXTRA_COMPONENT_NAME) as ComponentName? + } ?: return@LaunchedEffect + delay(200) + if (qsTileCpt == HttpTileService::class.componentName || qsTileCpt == FloatingTileService::class.componentName) { + navController.toDestinationsNavigator().navigate(AdvancedPageDestination) + } else if (qsTileCpt == SnapshotTileService::class.componentName) { + navController.toDestinationsNavigator().navigate(SnapshotPageDestination) + } } })