Commit 7d8eabd1 authored by Mygod's avatar Mygod

Correctly resolve no plugin found

parent eee293c0
......@@ -134,10 +134,10 @@ object PluginManager {
private fun initNative(options: PluginOptions): String? {
val providers = app.packageManager.queryIntentContentProviders(
Intent(PluginContract.ACTION_NATIVE_PLUGIN, buildUri(options.id)), 0)
check(providers.size == 1)
if (providers.isEmpty()) return null
val uri = Uri.Builder()
.scheme(ContentResolver.SCHEME_CONTENT)
.authority(providers[0].providerInfo.authority)
.authority(providers.single().providerInfo.authority)
.build()
val cr = app.contentResolver
return try {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment