From 4ff2c2b50c19ae93efff84f0005de633cec39c21 Mon Sep 17 00:00:00 2001 From: Sergejs Luhmirins Date: Thu, 29 Aug 2024 13:58:11 +0300 Subject: [PATCH] SM-569 Add more info logging in the orchestrator activity --- .../simprints/feature/orchestrator/OrchestratorActivity.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/feature/orchestrator/src/main/java/com/simprints/feature/orchestrator/OrchestratorActivity.kt b/feature/orchestrator/src/main/java/com/simprints/feature/orchestrator/OrchestratorActivity.kt index c615898013..9157a01ae7 100644 --- a/feature/orchestrator/src/main/java/com/simprints/feature/orchestrator/OrchestratorActivity.kt +++ b/feature/orchestrator/src/main/java/com/simprints/feature/orchestrator/OrchestratorActivity.kt @@ -30,6 +30,8 @@ internal class OrchestratorActivity : BaseActivity() { private var isGraphInitialized = false override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) + Simber.i("OrchestratorActivity.onCreate isGraphInitialized=$isGraphInitialized") + isGraphInitialized = savedInstanceState?.getBoolean(KEY_IS_GRAPH_INITIALIZED) ?: false lifecycle.addObserver(activityTracker) @@ -39,6 +41,8 @@ internal class OrchestratorActivity : BaseActivity() { this, R.id.orchestratorRootFragment ) { result -> + Simber.i("OrchestratorActivity on result ${result.resultCode}") + setResult(result.resultCode, Intent().putExtras(result.extras)) finish() } @@ -46,11 +50,14 @@ internal class OrchestratorActivity : BaseActivity() { override fun onStart() { super.onStart() + Simber.i("OrchestratorActivity.onStart isGraphInitialized=$isGraphInitialized") if (activityTracker.isMain(activity = this)) { if (!isGraphInitialized) { val action = intent.action.orEmpty() val extras = intent.extras ?: bundleOf() + Simber.i("Intent received: $action") + Simber.i("Intent from: $callingPackage") // Some co-sync functionality depends on the exact package name of the caller app, // e.g. to switch content providers of debug and release variants of the caller app