This commit is contained in:
18142669586
2022-08-11 17:51:13 +08:00
parent 01d0def52d
commit c4e2e96185
12 changed files with 58 additions and 57 deletions

View File

@@ -1 +1 @@
apply plugin: 'com.android.library'
apply plugin: 'com.android.library'

View File

@@ -278,7 +278,7 @@ public class LiveEnterRoomAnimPresenter {
}
try {
BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file));
mSVGAParser.decodeFromInputStream(bis, file.getAbsolutePath(), mParseCompletionCallback, true);
mSVGAParser.decodeFromInputStream(bis, file.getAbsolutePath(), mParseCompletionCallback, true,null,null);
} catch (Exception e) {
Log.i("fff", e.getMessage());
e.printStackTrace();

View File

@@ -1264,7 +1264,7 @@ public class LiveGiftAnimPresenter {
}
try {
BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file));
mSVGAParser.decodeFromInputStream(bis, file.getAbsolutePath(), mParseCompletionCallback, true);
mSVGAParser.decodeFromInputStream(bis, file.getAbsolutePath(), mParseCompletionCallback, true,null,null);
} catch (Exception e) {
e.printStackTrace();
mShowGif = false;
@@ -1300,7 +1300,7 @@ public class LiveGiftAnimPresenter {
}
try {
BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file));
mIconSVGAParser.decodeFromInputStream(bis, file.getAbsolutePath(), mParseIconCompletionCallback, true);
mIconSVGAParser.decodeFromInputStream(bis, file.getAbsolutePath(), mParseIconCompletionCallback, true,null,null);
} catch (Exception e) {
e.printStackTrace();
mShowAllServer = false;

View File

@@ -41,30 +41,32 @@ public class UnzipFromAssets {
int count = 0;
// 如果进入点为空说明已经遍历完所有压缩包中文件和目录
while (zipEntry != null) {
// 如果是一个目录
if (zipEntry.isDirectory()) {
file = new File(outputDirectory + File.separator + zipEntry.getName());
// 文件需要覆盖或者是文件不存在
if (isReWrite || !file.exists()) {
file.mkdir();
}
} else {
// 如果是文件
file = new File(outputDirectory + File.separator + zipEntry.getName());
// 文件需要覆盖或者文件不存在,则解压文件
if (isReWrite || !file.exists()) {
file.createNewFile();
FileOutputStream fileOutputStream = new FileOutputStream(file);
while ((count = zipInputStream.read(buffer)) > 0) {
fileOutputStream.write(buffer, 0, count);
file = new File(outputDirectory + File.separator + zipEntry.getName());
String canonicalPath = file.getCanonicalPath();
if (!canonicalPath.startsWith(outputDirectory + File.separator + zipEntry.getName())) {
// 如果是一个目录
if (zipEntry.isDirectory()) {
// 文件需要覆盖或者是文件不存在
if (isReWrite || !file.exists()) {
file.mkdir();
}
} else {
// 如果是文件
// 文件需要覆盖或者文件不存在,则解压文件
if (isReWrite || !file.exists()) {
file.createNewFile();
FileOutputStream fileOutputStream = new FileOutputStream(file);
while ((count = zipInputStream.read(buffer)) > 0) {
fileOutputStream.write(buffer, 0, count);
}
fileOutputStream.close();
}
fileOutputStream.close();
}
// 定位到下一个文件入口
zipEntry = zipInputStream.getNextEntry();
}
// 定位到下一个文件入口
zipEntry = zipInputStream.getNextEntry();
}
zipInputStream.close();
}

View File

@@ -125,7 +125,7 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
public void onError() {
Log.e("errqs", "errl");
}
});
},null);
}
private void svga_new_user_double() {
@@ -142,7 +142,7 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
public void onError() {
Log.e("errqs", "errl");
}
});
},null);
}
private void svga_new_user_follow() {
@@ -158,7 +158,7 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
public void onError() {
Log.e("errqs", "errl");
}
});
},null);
}
@@ -651,7 +651,7 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
public void onError() {
Log.e("errqs", "errl");
}
});
},null);
}
}