Refactor: split into modules autojs, common, app and automator

This commit is contained in:
hyb1996
2017-04-03 00:43:15 +08:00
parent e7500e6e21
commit bfabef6a0e
182 changed files with 2521 additions and 5840 deletions

View File

@@ -0,0 +1,27 @@
package com.stardust.util;
import android.content.res.AssetManager;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
/**
* Created by Stardust on 2017/3/14.
*/
public class AssetsCache {
private Map<String, String> mCache = new HashMap<>();
public String read(AssetManager manager, String path) throws IOException {
String str = mCache.get(path);
if (str == null) {
str = FileUtils.readString(manager.open(path));
mCache.put(path, str);
}
return str;
}
}