|
|
|
@ -120,6 +120,7 @@ import org.mozilla.fenix.home.sessioncontrol.SessionControlView
|
|
|
|
|
import org.mozilla.fenix.home.sessioncontrol.viewholders.CollectionViewHolder
|
|
|
|
|
import org.mozilla.fenix.home.topsites.DefaultTopSitesView
|
|
|
|
|
import org.mozilla.fenix.onboarding.FenixOnboarding
|
|
|
|
|
import org.mozilla.fenix.perf.MarkersFragmentLifecycleCallbacks
|
|
|
|
|
import org.mozilla.fenix.settings.SupportUtils
|
|
|
|
|
import org.mozilla.fenix.settings.SupportUtils.SumoTopic.HELP
|
|
|
|
|
import org.mozilla.fenix.settings.deletebrowsingdata.deleteAndQuit
|
|
|
|
@ -186,6 +187,9 @@ class HomeFragment : Fragment() {
|
|
|
|
|
internal var getMenuButton: () -> MenuButton? = { binding.menuButton }
|
|
|
|
|
|
|
|
|
|
override fun onCreate(savedInstanceState: Bundle?) {
|
|
|
|
|
// DO NOT ADD ANYTHING ABOVE THIS getProfilerTime CALL!
|
|
|
|
|
val profilerStartTime = requireComponents.core.engine.profiler?.getProfilerTime()
|
|
|
|
|
|
|
|
|
|
super.onCreate(savedInstanceState)
|
|
|
|
|
|
|
|
|
|
bundleArgs = args.toBundle()
|
|
|
|
@ -201,6 +205,11 @@ class HomeFragment : Fragment() {
|
|
|
|
|
) {
|
|
|
|
|
showPrivacyPopWindow(requireContext(), requireActivity())
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// DO NOT MOVE ANYTHING BELOW THIS addMarker CALL!
|
|
|
|
|
requireComponents.core.engine.profiler?.addMarker(
|
|
|
|
|
MarkersFragmentLifecycleCallbacks.MARKER_NAME, profilerStartTime, "HomeFragment.onCreate",
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Suppress("LongMethod")
|
|
|
|
@ -209,6 +218,9 @@ class HomeFragment : Fragment() {
|
|
|
|
|
container: ViewGroup?,
|
|
|
|
|
savedInstanceState: Bundle?
|
|
|
|
|
): View {
|
|
|
|
|
// DO NOT ADD ANYTHING ABOVE THIS getProfilerTime CALL!
|
|
|
|
|
val profilerStartTime = requireComponents.core.engine.profiler?.getProfilerTime()
|
|
|
|
|
|
|
|
|
|
_binding = FragmentHomeBinding.inflate(inflater, container, false)
|
|
|
|
|
val activity = activity as HomeActivity
|
|
|
|
|
val components = requireComponents
|
|
|
|
@ -378,6 +390,11 @@ class HomeFragment : Fragment() {
|
|
|
|
|
activity.themeManager.applyStatusBarTheme(activity)
|
|
|
|
|
|
|
|
|
|
requireContext().components.analytics.experiments.recordExposureEvent(FeatureId.HOME_PAGE)
|
|
|
|
|
|
|
|
|
|
// DO NOT MOVE ANYTHING BELOW THIS addMarker CALL!
|
|
|
|
|
requireComponents.core.engine.profiler?.addMarker(
|
|
|
|
|
MarkersFragmentLifecycleCallbacks.MARKER_NAME, profilerStartTime, "HomeFragment.onCreateView",
|
|
|
|
|
)
|
|
|
|
|
return binding.root
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -461,6 +478,9 @@ class HomeFragment : Fragment() {
|
|
|
|
|
|
|
|
|
|
@Suppress("LongMethod", "ComplexMethod")
|
|
|
|
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
|
|
|
|
// DO NOT ADD ANYTHING ABOVE THIS getProfilerTime CALL!
|
|
|
|
|
val profilerStartTime = requireComponents.core.engine.profiler?.getProfilerTime()
|
|
|
|
|
|
|
|
|
|
super.onViewCreated(view, savedInstanceState)
|
|
|
|
|
context?.metrics?.track(Event.HomeScreenDisplayed)
|
|
|
|
|
|
|
|
|
@ -531,6 +551,11 @@ class HomeFragment : Fragment() {
|
|
|
|
|
* the View action on the [TabsTrayDialogFragment] snackbar.*/
|
|
|
|
|
scrollAndAnimateCollection(bundleArgs.getLong(FOCUS_ON_COLLECTION, -1))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// DO NOT MOVE ANYTHING BELOW THIS addMarker CALL!
|
|
|
|
|
requireComponents.core.engine.profiler?.addMarker(
|
|
|
|
|
MarkersFragmentLifecycleCallbacks.MARKER_NAME, profilerStartTime, "HomeFragment.onViewCreated",
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private fun observeSearchEngineChanges() {
|
|
|
|
|