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

Commit 7dd2364

Browse files
authored
Update Libs.java
1 parent a57f747 commit 7dd2364

File tree

1 file changed

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

1 file changed

+5
-7
lines changed

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

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public static void Main(Context ctx) {
1111
loadAllLibs(ctx);
1212
}
1313
public static void clearCache(Context ctx) {
14-
String dirPath = ctx.getDir("alvinqid", Context.MODE_PRIVATE).getAbsolutePath();
14+
String dirPath = ctx.getCacheDir().getAbsolutePath();
1515
File dirsPath = new File(dirPath);
1616
if(dirsPath.exists()) {
1717
Logger.get().info("Clearing Cache...");
@@ -21,8 +21,7 @@ public static void clearCache(Context ctx) {
2121
}
2222
public static void copyAllLibs(Context ctx) {
2323
try {
24-
//Context context = ctx;
25-
String dirPath = ctx.getDir("alvinqid", Context.MODE_PRIVATE).getAbsolutePath();
24+
String dirPath = ctx.getCacheDir().getAbsolutePath();
2625
File dirsPath = new File(dirPath, "libs");
2726
File libsDir = new File("/storage/emulated/0/alvinqid/libs");
2827
if (!libsDir.exists()) {
@@ -72,17 +71,16 @@ public static void copyFile(File source, File dest) throws IOException {
7271
}
7372
public static void loadAllLibs(Context ctx) {
7473
try {
75-
String dirPath = ctx.getDir("alvinqid", Context.MODE_PRIVATE).getAbsolutePath();
76-
//File libsDir = new File("/storage/emulated/0/alvinqid", "libs");
74+
String dirPath = ctx.getCacheDir().getAbsolutePath();
7775
File libsDir = new File(dirPath, "libs");
7876

7977
File[] jars = libsDir.listFiles();
8078
if (jars != null) {
8179
for (File jar : jars) {
8280
if(!jar.getName().endsWith(".jar")) continue;
83-
//LogToast(ctx, "Loaded -> " + jar.getName());
84-
Logger.get().info("Loaded -> " + jar.getName());
81+
Logger.get().info("Loaded -> " + jar.getName());
8582
LibsManager.get(ctx).loadLib(jar);
83+
Logger.get().info("Loaded -> " + jar.getName() + " Done!");
8684
}
8785
}
8886
} catch (Exception e) {

0 commit comments

Comments
 (0)