Skip to content

Commit

Permalink
performance opti
Browse files Browse the repository at this point in the history
  • Loading branch information
Chen Jiaxin committed Oct 20, 2024
1 parent c8475a7 commit 1b6c342
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/src/main/java/com/termux/app/TermuxActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import static android.view.ViewGroup.LayoutParams.MATCH_PARENT;
import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
import static com.termux.shared.termux.TermuxConstants.TERMUX_FILES_DIR_PATH;
import static com.termux.shared.termux.TermuxConstants.TERMUX_HOME_DIR_PATH;
import static com.termux.shared.termux.TermuxConstants.TERMUX_TMP_PREFIX_DIR_PATH;

import android.annotation.SuppressLint;
Expand Down Expand Up @@ -1233,12 +1234,12 @@ protected void onActivityResult(int requestCode, int resultCode, @Nullable Inten

public void reInstallCustomStartScript() {
runOnUiThread(() -> {
FileUtils.copyAssetsFile2Phone(this, "recover");
FileUtils.copyAssetsFile2Phone(this, "setMoBoxEnv");
FileUtils.copyAssetsFile2Phone(this, "winhandler.exe");
FileUtils.copyAssetsFile2Phone(this, "wfm.exe");
FileUtils.copyAssetsFile2Phone(this, "wine.tar");
CommandUtils.exec(this, "chmod", new ArrayList<>(Arrays.asList("+x", TERMUX_FILES_DIR_PATH + "/home/recover")));
CommandUtils.execInPath(this, "recover", null, "/home/");
String command = TERMUX_HOME_DIR_PATH +"/setMoBoxEnv\n";
mTermuxTerminalSessionActivityClient.getCurrentStoredSessionOrLast().write(command);
});
}

Expand Down
File renamed without changes.

0 comments on commit 1b6c342

Please sign in to comment.