|
|
@ -238,10 +238,6 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
|
|
|
|
safeIntent
|
|
|
|
safeIntent
|
|
|
|
?.let(::getIntentSource)
|
|
|
|
?.let(::getIntentSource)
|
|
|
|
?.also { components.analytics.metrics.track(Event.OpenedApp(it)) }
|
|
|
|
?.also { components.analytics.metrics.track(Event.OpenedApp(it)) }
|
|
|
|
// record on cold startup
|
|
|
|
|
|
|
|
safeIntent
|
|
|
|
|
|
|
|
?.let(::getIntentAllSource)
|
|
|
|
|
|
|
|
?.also { components.analytics.metrics.track(Event.AppReceivedIntent(it)) }
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
supportActionBar?.hide()
|
|
|
|
supportActionBar?.hide()
|
|
|
|
|
|
|
|
|
|
|
@ -474,14 +470,6 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
|
|
|
|
?.let { it as? TabsTrayFragment }
|
|
|
|
?.let { it as? TabsTrayFragment }
|
|
|
|
?.also { it.dismissAllowingStateLoss() }
|
|
|
|
?.also { it.dismissAllowingStateLoss() }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Note: This does not work in case of an user sending an intent with ACTION_VIEW
|
|
|
|
|
|
|
|
// for example, launch the application, and than use adb to send an intent with
|
|
|
|
|
|
|
|
// ACTION_VIEW to open a link. In this case, we will get multiple telemetry events.
|
|
|
|
|
|
|
|
intent
|
|
|
|
|
|
|
|
.toSafeIntent()
|
|
|
|
|
|
|
|
.let(::getIntentAllSource)
|
|
|
|
|
|
|
|
?.also { components.analytics.metrics.track(Event.AppReceivedIntent(it)) }
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -637,14 +625,6 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected open fun getIntentAllSource(intent: SafeIntent): Event.AppReceivedIntent.Source? {
|
|
|
|
|
|
|
|
return when {
|
|
|
|
|
|
|
|
intent.isLauncherIntent -> Event.AppReceivedIntent.Source.APP_ICON
|
|
|
|
|
|
|
|
intent.action == Intent.ACTION_VIEW -> Event.AppReceivedIntent.Source.LINK
|
|
|
|
|
|
|
|
else -> Event.AppReceivedIntent.Source.UNKNOWN
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* External sources such as 3rd party links and shortcuts use this function to enter
|
|
|
|
* External sources such as 3rd party links and shortcuts use this function to enter
|
|
|
|
* private mode directly before the content view is created. Returns the mode set by the intent
|
|
|
|
* private mode directly before the content view is created. Returns the mode set by the intent
|
|
|
|