|
|
|
@ -311,16 +311,7 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Launch this on a background thread so as not to affect startup performance
|
|
|
|
|
lifecycleScope.launch(IO) {
|
|
|
|
|
if (
|
|
|
|
|
settings().checkDefaultBrowserAndSet()
|
|
|
|
|
) {
|
|
|
|
|
metrics.track(Event.ChangedToDefaultBrowser)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
DefaultBrowserNotificationWorker.setDefaultBrowserNotificationIfNeeded(applicationContext)
|
|
|
|
|
}
|
|
|
|
|
trackDefaultBrowser()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
override fun onStart() = PerfStartup.homeActivityOnStart.measureNoInline {
|
|
|
|
@ -955,6 +946,19 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private fun trackDefaultBrowser(){
|
|
|
|
|
// Launch this on a background thread so as not to affect startup performance
|
|
|
|
|
lifecycleScope.launch(IO) {
|
|
|
|
|
if (
|
|
|
|
|
settings().checkDefaultBrowserAndSet()
|
|
|
|
|
) {
|
|
|
|
|
metrics.track(Event.ChangedToDefaultBrowser)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
DefaultBrowserNotificationWorker.setDefaultBrowserNotificationIfNeeded(applicationContext)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@VisibleForTesting
|
|
|
|
|
internal fun isActivityColdStarted(startingIntent: Intent, activityIcicle: Bundle?): Boolean {
|
|
|
|
|
// First time opening this activity in the task.
|
|
|
|
|