Plugins: bringup

This commit is contained in:
MM20
2023-11-05 19:02:59 +01:00
parent 7da84a747f
commit 801caf9dd6
54 changed files with 1335 additions and 88 deletions
+1
View File
@@ -51,5 +51,6 @@ dependencies {
implementation(project(":core:ktx"))
implementation(project(":core:i18n"))
implementation(project(":libs:material-color-utilities"))
api(project(":core:shared"))
}
@@ -0,0 +1,12 @@
package de.mm20.launcher2.plugin
data class Plugin(
val enabled: Boolean,
val label: String,
val description: String? = null,
val settingsActivity: String? = null,
val packageName: String,
val className: String,
val type: PluginType,
val authority: String,
)
@@ -0,0 +1,17 @@
package de.mm20.launcher2.plugin
import kotlinx.coroutines.flow.Flow
interface PluginRepository {
fun findMany(
type: PluginType? = null,
enabled: Boolean? = null,
packageName: String? = null,
): Flow<List<Plugin>>
fun get(authority: String): Flow<Plugin?>
fun insertMany(plugins: List<Plugin>)
fun insert(plugin: Plugin)
fun update(plugin: Plugin)
fun deleteMany()
}
@@ -16,8 +16,6 @@ interface File : SavableSearchable {
val isDirectory: Boolean
val metaData: ImmutableMap<FileMetaType, String>
val isStoredInCloud: Boolean
override val preferDetailsOverLaunch: Boolean
get() = false
@@ -5,7 +5,7 @@ interface SearchableSerializer {
val typePrefix: String
}
class NullSerializer : SearchableSerializer {
class NullSerializer : SearchableSerializer{
override fun serialize(searchable: SavableSearchable): String? {
return null
}