Skip to content
This repository was archived by the owner on Dec 29, 2025. It is now read-only.

Commit a57f747

Browse files
authored
Update Libs.java
1 parent eac3214 commit a57f747

File tree

1 file changed

+12
-2
lines changed
  • src/main/java/id.my.alvinq.prokitid.app/libs

1 file changed

+12
-2
lines changed

src/main/java/id.my.alvinq.prokitid.app/libs/Libs.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,19 @@
66

77
public class Libs {
88
public static void Main(Context ctx) {
9+
clearCache(ctx);
910
copyAllLibs(ctx);
1011
loadAllLibs(ctx);
1112
}
13+
public static void clearCache(Context ctx) {
14+
String dirPath = ctx.getDir("alvinqid", Context.MODE_PRIVATE).getAbsolutePath();
15+
File dirsPath = new File(dirPath);
16+
if(dirsPath.exists()) {
17+
Logger.get().info("Clearing Cache...");
18+
dirsPath.delete();
19+
Logger.get().info("Clearing Cache Done!");
20+
}
21+
}
1222
public static void copyAllLibs(Context ctx) {
1323
try {
1424
//Context context = ctx;
@@ -32,9 +42,9 @@ public static void copyAllLibs(Context ctx) {
3242
dirsPath.delete();
3343
dirsPath.mkdirs();
3444
} else {
35-
dirsPath.delete();
45+
dirsPath.delete();
3646
dirsPath.mkdirs();
37-
}
47+
}
3848
}
3949

4050
File[] jars = libsDir.listFiles();

0 commit comments

Comments
 (0)