diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 6c7ae6eb1..63f16650e 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -159,6 +159,9 @@
+
diff --git a/common/src/main/java/com/yunbao/common/CommonAppConfig.java b/common/src/main/java/com/yunbao/common/CommonAppConfig.java
index 8633489c6..ee5be1227 100644
--- a/common/src/main/java/com/yunbao/common/CommonAppConfig.java
+++ b/common/src/main/java/com/yunbao/common/CommonAppConfig.java
@@ -35,6 +35,8 @@ public class CommonAppConfig {
public static final boolean IS_GOOGLE_PLAY = getMetaDataBoolean("IS_GOOGLE_PLAY");
//是否开启上报错误日志功能
public static final boolean IS_UPLOAD_ERROR_LOG = getMetaDataBoolean("IS_UPLOAD_ERROR_LOG");
+ //是否为插件包模式
+ public static final boolean IS_PLUGIN_MODEL = getMetaDataBoolean("IS_PLUGIN_MODEL");
//外部sd卡
public static final String DCMI_PATH = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM).getAbsolutePath();
diff --git a/common/src/main/java/com/yunbao/common/utils/PluginManager.java b/common/src/main/java/com/yunbao/common/utils/PluginManager.java
index b140203bb..13ba2274c 100644
--- a/common/src/main/java/com/yunbao/common/utils/PluginManager.java
+++ b/common/src/main/java/com/yunbao/common/utils/PluginManager.java
@@ -8,6 +8,7 @@ import android.os.Handler;
import android.os.Looper;
import android.util.Log;
+import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.CommonAppContext;
import java.io.BufferedInputStream;
@@ -47,6 +48,9 @@ public class PluginManager {
}
public boolean isDownloadApk() {
+ if(!CommonAppConfig.IS_PLUGIN_MODEL){
+ return true;
+ }
return new File(CommonAppContext.sInstance.getFilesDir().getAbsolutePath() + File.separator + "plugin_download" + File.separator + "anchorPlugin.apk").exists();
}
@@ -54,6 +58,10 @@ public class PluginManager {
* 加载主播插件
*/
public void loadAnchorPlugin(DialogInterface.OnDismissListener dismissListener) {
+ if(!CommonAppConfig.IS_PLUGIN_MODEL){
+ dismissListener.onDismiss(null);
+ return;
+ }
new Thread(() -> {
try {
if (Arrays.asList(CommonAppContext.sInstance.getAssets().list("")).contains("anchorPlugin.apk")) {
diff --git a/main/src/main/java/com/yunbao/main/dialog/MainStartDialogFragment.java b/main/src/main/java/com/yunbao/main/dialog/MainStartDialogFragment.java
index a774b3ba9..db687fb19 100644
--- a/main/src/main/java/com/yunbao/main/dialog/MainStartDialogFragment.java
+++ b/main/src/main/java/com/yunbao/main/dialog/MainStartDialogFragment.java
@@ -216,7 +216,7 @@ public class MainStartDialogFragment extends AbsDialogFragment implements View.O
}
};
}
- if (PluginManager.getInstance().isDownloadApk()) {
+ if (!CommonAppConfig.IS_PLUGIN_MODEL || PluginManager.getInstance().isDownloadApk()) {
PluginManager.getInstance().loadAnchorPlugin(it -> {
LiveHttpUtil.getLiveSdk(mGetLiveSdkCallback);
});