111
This commit is contained in:
@@ -1 +1 @@
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'com.android.library'
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user