MCPcopy Index your code
hub / github.com/razerdp/BasePopup / init

Method init

app/src/main/java/razerdp/demo/base/TestData.java:47–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45
46
47 public static void init() {
48 RxHelper.runOnBackground(data -> {
49 String json = FileUtil.readFile(fileName);
50 if (!TextUtils.isEmpty(json)) {
51 List<TestResult> ret = GsonUtil.INSTANCE.toList(json, TestResult.class);
52 if (ret != null) {
53 localCache.addAll(ret);
54 }
55 }
56 });
57 }
58
59 public static void getTestData(int count, ExtSimpleCallback<List<TestResult>> cb) {
60 if (cb == null) return;

Callers 1

onCreateMethod · 0.95

Calls 4

runOnBackgroundMethod · 0.95
readFileMethod · 0.95
isEmptyMethod · 0.80
toListMethod · 0.80

Tested by

no test coverage detected