Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -39,18 +41,23 @@ internal class OrchestratorActivity : BaseActivity() {
this,
R.id.orchestratorRootFragment
) { result ->
Simber.i("OrchestratorActivity on result ${result.resultCode}")

setResult(result.resultCode, Intent().putExtras(result.extras))
finish()
}
}

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
Expand Down