There will not be a confusing warning message when a file in the Assets directory is not found

This commit is contained in:
zhangjiongxuan 2017-07-18 17:20:42 +08:00
parent fe25514770
commit e176e7350d

View File

@ -30,6 +30,7 @@ import com.qihoo360.replugin.utils.FileUtils;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
@ -75,7 +76,10 @@ public class PackageFilesUtil {
if (BuildConfig.DEBUG) {
Log.i(TAG, "Opening in assets: " + filename);
}
} catch (Exception e) {
} catch (FileNotFoundException e) {
// 找不到文件很正常不做任何处理
// Ignore
} catch (IOException e) {
if (BuildConfig.DEBUG) {
Log.w(TAG, filename, e);
}