Bug 1320730 - Ensure homepanel telemetry session is set when panel initially loaded r=sebastian

We currently only start a session when swiping between homepanels. We should also send
it when showing the homepanel normally.

MozReview-Commit-ID: 8Kk2RDCbDDc

--HG--
extra : rebase_source : 113474aa6efe5a7e25a2b96a6db5bc049a12d7cf
This commit is contained in:
Andrzej Hunt 2017-02-07 13:05:34 -08:00
parent 64e3711920
commit 2ed9560b6e

View File

@ -461,6 +461,12 @@ public class HomePager extends ViewPager implements HomeScreen {
adapter.setCanLoadHint(true); adapter.setCanLoadHint(true);
} }
}); });
// We need to fire telemetry on the initial load: we will subsequently send telemetry whenever
// the user switches between homepanels, but the first load doesn't involve any switching hence
// we need to send telemetry now:
final String panelType = ((HomeAdapter) getAdapter()).getPanelIdAtPosition(mDefaultPageIndex);
startNewPanelTelemetrySession(panelType);
} }
@Override @Override