Change call log directory

This commit is contained in:
12aw 2023-12-09 20:21:13 +01:00
parent b88abafcd2
commit 6e8f28e595

View file

@ -1,5 +1,7 @@
package eu.siacs.conversations.xmpp.jingle;
import static eu.siacs.conversations.persistance.FileBackend.APP_DIRECTORY;
import android.util.Log;
import android.os.Environment;
@ -3020,7 +3022,7 @@ public class JingleRtpConnection extends AbstractJingleConnection
this.jingleConnectionManager.setTerminalSessionState(id, getEndUserState(), getMedia());
this.jingleConnectionManager.finishConnectionOrThrow(this);
try {
File log = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS), "Cheogram/calls/" + id.getWith().asBareJid() + "." + id.getSessionId() + "." + created + ".log");
File log = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS) + File.separator + APP_DIRECTORY + File.separator + "calls/" + id.getWith().asBareJid() + "." + id.getSessionId() + "." + created + ".log");
log.getParentFile().mkdirs();
Runtime.getRuntime().exec(new String[]{"logcat", "-dT", "" + created + ".0", "-f", log.getAbsolutePath()});
} catch (final IOException e) { }