forked from Tencent/Shadow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'Tencent#31' into 'master'
修改固定类名com.tencent.shadow.sdk.pluginloader.PluginLoaderImpl的逻辑。将其改为Factory模式,避免Hardcode参数。 fixed Tencent#31. 修改固定类名com.tencent.shadow.sdk.pluginloader.PluginLoaderImpl的逻辑。将其改为Factory模式,避免Hardcode参数。 fixed Tencent#31. See merge request !86
- Loading branch information
Showing
5 changed files
with
39 additions
and
47 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
...c-loader-impl/src/main/kotlin/com/tencent/shadow/dynamic/loader/impl/CoreLoaderFactory.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.tencent.shadow.dynamic.loader.impl | ||
|
||
import android.content.Context | ||
import com.tencent.shadow.core.loader.ShadowPluginLoader | ||
|
||
interface CoreLoaderFactory { | ||
fun build(hostAppContext: Context): ShadowPluginLoader | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
...ic-loader/src/main/java/com/tencent/shadow/dynamic/loader/impl/CoreLoaderFactoryImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.tencent.shadow.dynamic.loader.impl; | ||
|
||
import android.content.Context; | ||
|
||
import com.tencent.shadow.core.loader.ShadowPluginLoader; | ||
import com.tencent.shadow.test.dynamic.loader.TestPluginLoader; | ||
|
||
/** | ||
* 这个类的包名类名是固定的。 | ||
* <p> | ||
* 见com.tencent.shadow.dynamic.loader.impl.DynamicPluginLoader#CORE_LOADER_FACTORY_IMPL_NAME | ||
*/ | ||
public class CoreLoaderFactoryImpl implements CoreLoaderFactory { | ||
@Override | ||
public ShadowPluginLoader build(Context hostAppContext) { | ||
return new TestPluginLoader(hostAppContext); | ||
} | ||
} |
11 changes: 3 additions & 8 deletions
11
...ow/sdk/pluginloader/PluginLoaderImpl.java → ...test/dynamic/loader/TestPluginLoader.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters