mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
resources loading
This commit is contained in:
parent
15f0ba12d1
commit
90be3b3401
2 changed files with 3 additions and 2 deletions
|
@ -53,9 +53,9 @@ abstract class Plugin {
|
|||
@JsonProperty("name") var name: String? = null
|
||||
@JsonProperty("pluginClassName") var pluginClassName: String? = null
|
||||
@JsonProperty("version") var version: Int? = null
|
||||
@JsonProperty("requiresResources") var requiresResources: Boolean = false
|
||||
}
|
||||
|
||||
var resources: Resources? = null
|
||||
var needsResources = false
|
||||
var __filename: String? = null
|
||||
}
|
|
@ -251,7 +251,8 @@ object PluginManager {
|
|||
}
|
||||
|
||||
pluginInstance.__filename = fileName
|
||||
if (pluginInstance.needsResources) {
|
||||
if (manifest.requiresResources) {
|
||||
Log.d(TAG, "Loading resources for ${data.internalName}")
|
||||
// based on https://stackoverflow.com/questions/7483568/dynamic-resource-loading-from-other-apk
|
||||
val assets = AssetManager::class.java.newInstance()
|
||||
val addAssetPath =
|
||||
|
|
Loading…
Reference in a new issue