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

Commit

Permalink
fix java application on A14
Browse files Browse the repository at this point in the history
  • Loading branch information
Deenu488 committed Mar 2, 2024
1 parent 88aeadd commit 6ec473e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.tyron.builder.compiler.java;

import android.os.Build;
import com.tyron.builder.BuildModule;
import com.tyron.builder.compiler.BuildType;
import com.tyron.builder.compiler.Task;
Expand Down Expand Up @@ -39,6 +40,9 @@ public void prepare(BuildType type) throws IOException {
}
zipFile = new File(mApkFile.getParent(), "classes.dex.zip");
mApkFile.renameTo(zipFile);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
mApkFile.setReadOnly();
}

if (!zipFile.exists()) {
throw new IOException("Unable to find classes.dex.zip File in projects build path");
Expand Down
24 changes: 24 additions & 0 deletions javac/src/main/java/com/sun/tools/javap/Javap.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.sun.tools.javap;

import java.io.ByteArrayOutputStream;
import java.io.PrintStream;

public class Javap {

public static void main(String[] args) {
try {
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
PrintStream printStream = new PrintStream(outputStream);

com.sun.tools.javap.JavapTask javapTask = new com.sun.tools.javap.JavapTask();
javapTask.handleOptions(args);
javapTask.setLog(printStream);
javapTask.run();

// Print the output
System.out.println(outputStream.toString());
} catch (Exception e) {
e.printStackTrace(); // Print the exception stack trace
}
}
}

0 comments on commit 6ec473e

Please sign in to comment.