Revert part of previous changes, causes issues

This commit is contained in:
Sylvain Berfini 2024-02-21 09:51:04 +01:00
parent 625edfe33a
commit f91252f678
2 changed files with 0 additions and 17 deletions

View file

@ -341,14 +341,6 @@ class CoreContext @UiThread constructor(val context: Context) : HandlerThread("C
}
}
@UiThread
fun onAppDestroyed() {
postOnCoreThread {
Log.w("$TAG App has been destroyed, stopping Core")
destroyCore()
}
}
@WorkerThread
fun isAddressMyself(address: Address): Boolean {
val found = core.accountList.find {

View file

@ -77,10 +77,6 @@ class ActivityMonitor : ActivityLifecycleCallbacks {
override fun onActivityDestroyed(activity: Activity) {
Log.d("$TAG onActivityDestroyed [$activity]")
activities.remove(activity)
if (activities.isEmpty()) {
onAppDestroyed()
}
}
private fun startInactivityChecker() {
@ -106,11 +102,6 @@ class ActivityMonitor : ActivityLifecycleCallbacks {
}
}
private fun onAppDestroyed() {
Log.w("$TAG onAppDestroyed()")
coreContext.onAppDestroyed()
}
private fun onBackgroundMode() {
Log.i("$TAG onBackgroundMode()")
coreContext.onBackground()