1、相心美颜So文件静默加载,但是不显示下载弹窗
2、so未加载成功主播开播提示:请稍等.... 3、app组件没有依赖公共组件,依赖了main组件,现直接使用组件之间通信了
This commit is contained in:
@@ -82,6 +82,7 @@ import java.util.List;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipInputStream;
|
||||
|
||||
import myname.pdlive.shayu.BuildConfig;
|
||||
import myname.pdlive.shayu.R;
|
||||
|
||||
|
||||
@@ -165,13 +166,12 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL
|
||||
Log.i("downLoad","架构: " + Build.CPU_ABI);
|
||||
|
||||
if(CommonAppConfig.IS_GOOGLE_PLAY == 0){
|
||||
//链接包 下载so库
|
||||
//链接包 下载美颜so库
|
||||
checkFaceUnitySOFile();
|
||||
// checkAgoraSOFile();
|
||||
}else {
|
||||
//渠道包
|
||||
mHandler.sendEmptyMessageDelayed(WHAT_GET_CONFIG, 1000);
|
||||
}
|
||||
mHandler.sendEmptyMessageDelayed(WHAT_GET_CONFIG, 1000);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -186,6 +186,7 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL
|
||||
//解压后的文件数量必须要有2个
|
||||
//如果文件存在,解压后 文件数量一致,直接进入下一步
|
||||
if (fileSo.exists() && getFileCount(fileSoList.getAbsolutePath()) == 2){
|
||||
MainActivity.faceSDKIsLoadSuceness = true;
|
||||
mHandler.sendEmptyMessageDelayed(WHAT_GET_CONFIG, 1000);
|
||||
return;
|
||||
}
|
||||
@@ -194,10 +195,10 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL
|
||||
Log.i("download", soUrl);
|
||||
|
||||
if (!fileSo.exists()) {
|
||||
downloadSo(outputDir.getAbsolutePath(), soUrl,Constants.FaceUnity_SO_Name,true);
|
||||
downloadSo(outputDir.getAbsolutePath(), soUrl,Constants.FaceUnity_SO_Name,false);
|
||||
}else if (fileSo.exists() && getFileCount(outputDir.getAbsolutePath()) < 3) {
|
||||
fileSo.delete();
|
||||
downloadSo(outputDir.getAbsolutePath(), soUrl,Constants.FaceUnity_SO_Name,true);
|
||||
downloadSo(outputDir.getAbsolutePath(), soUrl,Constants.FaceUnity_SO_Name,false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -282,6 +283,10 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL
|
||||
File fileSo = new File(outputDir, fileName);
|
||||
try {
|
||||
unzip(fileSo.getAbsolutePath(), outputDir);
|
||||
MainActivity.faceSDKIsLoadSuceness = true;
|
||||
if (BuildConfig.DEBUG){
|
||||
ToastUtil.showDebug("美颜SDK加载成功...");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.e("ZipCheck", "Error reading ZIP file", e);
|
||||
throw new RuntimeException(e);
|
||||
@@ -316,7 +321,6 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL
|
||||
ZipInputStream zipIn = new ZipInputStream(new FileInputStream(zipFilePath));
|
||||
ZipEntry entry = zipIn.getNextEntry();
|
||||
while (entry != null) {
|
||||
|
||||
String filePath = destDirectory + File.separator + sanitizePath(entry.getName());
|
||||
Log.d("Unzip", "Extracting: " + filePath);
|
||||
if (!entry.isDirectory()) {
|
||||
|
||||
Reference in New Issue
Block a user