1、删除打包x86架构的配置
2、声网SO不做动态加载 3、美颜so动态加载
This commit is contained in:
@@ -159,22 +159,22 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL
|
||||
e.printStackTrace();
|
||||
}
|
||||
SpUtil.getInstance().setBooleanValue("NOTIFICATION", NotificationManagerCompat.from(this).areNotificationsEnabled());
|
||||
Log.i("downLoad","架构: " + Build.CPU_ABI);
|
||||
|
||||
if(CommonAppConfig.IS_GOOGLE_PLAY != 0){
|
||||
//渠道包
|
||||
mHandler.sendEmptyMessageDelayed(WHAT_GET_CONFIG, 1000);
|
||||
}else {
|
||||
if(CommonAppConfig.IS_GOOGLE_PLAY == 0){
|
||||
//链接包 下载so库
|
||||
checkFaceUnitySOFile();
|
||||
checkAgoraSOFile();
|
||||
// checkAgoraSOFile();
|
||||
}else {
|
||||
//渠道包
|
||||
mHandler.sendEmptyMessageDelayed(WHAT_GET_CONFIG, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void checkFaceUnitySOFile() {
|
||||
File outputDir = new File(mContext.getDir("lib", Context.MODE_PRIVATE).getAbsoluteFile(), Constants.DOWNLOAD_FaceUnity_SO);
|
||||
String cpuAbi = "";
|
||||
cpuAbi = Build.CPU_ABI;
|
||||
String cpuAbi = Build.CPU_ABI;
|
||||
if (!outputDir.exists()) {
|
||||
outputDir.mkdirs();
|
||||
}
|
||||
@@ -190,30 +190,29 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL
|
||||
Log.i("download", soUrl);
|
||||
|
||||
if (!fileSo.exists()) {
|
||||
downloadSo(outputDir.getAbsolutePath(), soUrl,Constants.FaceUnity_SO_Name,false);
|
||||
downloadSo(outputDir.getAbsolutePath(), soUrl,Constants.FaceUnity_SO_Name,true);
|
||||
}else if (fileSo.exists() && getFileCount(outputDir.getAbsolutePath()) < 3) {
|
||||
fileSo.delete();
|
||||
downloadSo(outputDir.getAbsolutePath(), soUrl,Constants.FaceUnity_SO_Name,false);
|
||||
downloadSo(outputDir.getAbsolutePath(), soUrl,Constants.FaceUnity_SO_Name,true);
|
||||
}
|
||||
}
|
||||
|
||||
private void checkAgoraSOFile() {
|
||||
//存储路径 //检查是否下载过
|
||||
File outputDir = new File(mContext.getDir("lib", Context.MODE_PRIVATE).getAbsoluteFile(), Constants.DOWNLOAD_Agora_SO);
|
||||
Log.i("downLoad", "outputDir.getAbsolutePath() = " + outputDir.getAbsolutePath());
|
||||
Log.i("downLoad", "outputDir.getAbsolutePath() 1 = " + outputDir.getAbsolutePath());
|
||||
|
||||
String cpuAbi = "";
|
||||
cpuAbi = Build.CPU_ABI;
|
||||
String cpuAbi = Build.CPU_ABI;
|
||||
|
||||
if (!outputDir.exists()) {
|
||||
Log.e("downLoad", "outputDir:>>>" + outputDir.exists());
|
||||
outputDir.mkdirs();
|
||||
}
|
||||
File fileSo = new File(outputDir, Constants.Agora_SO_Name);
|
||||
Log.i("downLoad", "fileSo.getAbsolutePath() = " + fileSo.getAbsolutePath());
|
||||
Log.i("downLoad", "fileSo.getAbsolutePath() 2 = " + fileSo.getAbsolutePath());
|
||||
|
||||
File fileSoList = new File(outputDir, cpuAbi);
|
||||
Log.i("downLoad", "fileSoList.getAbsolutePath() = " + fileSoList.getAbsolutePath());
|
||||
Log.i("downLoad", "fileSoList.getAbsolutePath() 3 = " + fileSoList.getAbsolutePath());
|
||||
|
||||
//解压后的文件数量必须要有22个
|
||||
//如果文件存在,解压后 文件数量一致,直接进入下一步
|
||||
|
||||
Reference in New Issue
Block a user