mirror of
https://github.com/termux/termux-app
synced 2024-06-21 08:37:10 +00:00
Revert "clean /tmp directory on cold start"
This reverts commit beb8a004e6
.
This commit is contained in:
parent
e49d514236
commit
9f79393aa5
|
@ -590,18 +590,6 @@ public final class TermuxActivity extends Activity implements ServiceConnection
|
|||
new AlertDialog.Builder(this).setTitle(R.string.max_terminals_reached_title).setMessage(R.string.max_terminals_reached_message)
|
||||
.setPositiveButton(android.R.string.ok, null).show();
|
||||
} else {
|
||||
if (mTermService.getSessions().size() == 0 && !mTermService.isWakelockEnabled()) {
|
||||
File termuxTmpDir = new File(TermuxService.PREFIX_PATH + "/tmp");
|
||||
if (termuxTmpDir.exists()) {
|
||||
try {
|
||||
TermuxInstaller.deleteFolder(termuxTmpDir);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
termuxTmpDir.mkdirs();
|
||||
}
|
||||
}
|
||||
String executablePath = (failSafe ? "/system/bin/sh" : null);
|
||||
TerminalSession newSession = mTermService.createTermSession(executablePath, null, null, failSafe);
|
||||
if (sessionName != null) {
|
||||
|
|
|
@ -250,14 +250,6 @@ public final class TermuxService extends Service implements SessionChangedCallba
|
|||
return mTerminalSessions;
|
||||
}
|
||||
|
||||
public boolean isWakelockEnabled() {
|
||||
if (mWakeLock == null) {
|
||||
return false;
|
||||
} else {
|
||||
return mWakeLock.isHeld();
|
||||
}
|
||||
}
|
||||
|
||||
TerminalSession createTermSession(String executablePath, String[] arguments, String cwd, boolean failSafe) {
|
||||
new File(HOME_PATH).mkdirs();
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user