Compare commits

...

9 Commits

Author SHA1 Message Date
Evgeny Poberezkin ab87d274b0 nix 2024-09-13 20:04:29 +01:00
Evgeny Poberezkin 1f50e580ed Merge branch 'master' into av/anroid-memory-usage 2024-09-13 20:03:56 +01:00
Stanislav Dmitrenko 4447b66b4e android: fix showing logs from core (#4880) 2024-09-13 20:02:32 +01:00
Avently eed216cd75 update 2024-09-14 01:45:45 +07:00
Avently f18d776c2d android: fix showing logs from core 2024-09-14 01:41:13 +07:00
Evgeny Poberezkin d3141a26a5 nix 2024-09-13 17:31:42 +01:00
Avently ccf2db000c update 2024-09-13 23:20:51 +07:00
Evgeny Poberezkin 0a2f1408f3 nix 2024-09-13 16:27:46 +01:00
Avently ef70e1ce15 core: update simplexmq 2024-09-13 22:09:30 +07:00
4 changed files with 15 additions and 18 deletions
@@ -66,7 +66,7 @@ class SimplexApp: Application(), LifecycleEventObserver, Configuration.Provider
}
}
context = this
initHaskell()
initHaskell(packageName)
initMultiplatform()
runMigrations()
tmpDir.deleteRecursively()
@@ -31,22 +31,19 @@ lateinit var androidAppContext: Context
var mainActivity: WeakReference<FragmentActivity> = WeakReference(null)
var callActivity: WeakReference<ComponentActivity> = WeakReference(null)
fun initHaskell() {
val socketName = "chat.simplex.app.local.socket.address.listen.native.cmd2" + Random.nextLong(100000)
fun initHaskell(packageName: String) {
val s = Semaphore(0)
thread(name="stdout/stderr pipe") {
Log.d(TAG, "starting server")
var server: LocalServerSocket? = null
for (i in 0..100) {
try {
server = LocalServerSocket(socketName + i)
break
} catch (e: IOException) {
Log.e(TAG, e.stackTraceToString())
}
}
if (server == null) {
throw Error("Unable to setup local server socket. Contact developers")
val server: LocalServerSocket
try {
server = LocalServerSocket(packageName)
} catch (e: IOException) {
Log.e(TAG, e.stackTraceToString())
Log.e(TAG, "Unable to setup local server socket. Contact developers")
s.release()
// Will not have logs from backend
return@thread
}
Log.d(TAG, "started server")
s.release()
@@ -60,7 +57,7 @@ fun initHaskell() {
Log.d(TAG, "starting receiver loop")
while (true) {
val line = input.readLine() ?: break
Log.w("$TAG (stdout/stderr)", line)
Log.w(TAG, "(stdout/stderr) $line")
logbuffer.add(line)
}
Log.w(TAG, "exited receiver loop")
@@ -70,7 +67,7 @@ fun initHaskell() {
System.loadLibrary("app-lib")
s.acquire()
pipeStdOutToSocket(socketName)
pipeStdOutToSocket(packageName)
initHS()
}
+1 -1
View File
@@ -12,7 +12,7 @@ constraints: zip +disable-bzip2 +disable-zstd
source-repository-package
type: git
location: https://github.com/simplex-chat/simplexmq.git
tag: f5e666ae4f41351d5d5ac416cd6fb1d5fadc8ab7
tag: 6302a32922884c4ac296a6ea0203da7fbc6b48fd
source-repository-package
type: git
+1 -1
View File
@@ -1,5 +1,5 @@
{
"https://github.com/simplex-chat/simplexmq.git"."f5e666ae4f41351d5d5ac416cd6fb1d5fadc8ab7" = "1cq9apm9vp40v4ck0wcbis4463q3cjd9fbx5511hhh6lah6llifc";
"https://github.com/simplex-chat/simplexmq.git"."6302a32922884c4ac296a6ea0203da7fbc6b48fd" = "1y6sbqizrias40grzwir14xh61n3wxcxi61y3qgblhjmyqaxql87";
"https://github.com/simplex-chat/hs-socks.git"."a30cc7a79a08d8108316094f8f2f82a0c5e1ac51" = "0yasvnr7g91k76mjkamvzab2kvlb1g5pspjyjn2fr6v83swjhj38";
"https://github.com/simplex-chat/direct-sqlcipher.git"."f814ee68b16a9447fbb467ccc8f29bdd3546bfd9" = "1ql13f4kfwkbaq7nygkxgw84213i0zm7c1a8hwvramayxl38dq5d";
"https://github.com/simplex-chat/sqlcipher-simple.git"."a46bd361a19376c5211f1058908fc0ae6bf42446" = "1z0r78d8f0812kxbgsm735qf6xx8lvaz27k1a0b4a2m0sshpd5gl";