private void onTopicSelected(String topic) {
    if (mSelectedTopic.equals(topic)) {
      return;
    }
    LOGD(TAG, "Topic selected: " + topic);
    VideoLibraryFragment frag =
        (VideoLibraryFragment)
            getFragmentManager()
                .findFragmentById(com.saarang.samples.apps.iosched.R.id.videos_fragment);
    if (frag == null) {
      LOGE(TAG, "Videos fragment not found.");
      return;
    }
    mSelectedTopic = topic;

    /* [ANALYTICS:EVENT]
     * TRIGGER:   Select a topic on the topics dropdown in the Video Library.
     * CATEGORY:  'Video Library'
     * ACTION:    selecttopic
     * LABEL:     year (e.g. "Android", "Chrome", ...)
     * [/ANALYTICS]
     */
    AnalyticsManager.sendEvent("Video Library", "selecttopic", topic, 0L);

    frag.setFilterAndReload(mSelectedYear, mSelectedTopic);
  }
  private void onYearSelected(int year) {
    if (mSelectedYear == year) {
      return;
    }
    LOGD(TAG, "Year selected: " + year);
    VideoLibraryFragment frag =
        (VideoLibraryFragment)
            getFragmentManager()
                .findFragmentById(com.saarang.samples.apps.iosched.R.id.videos_fragment);
    if (frag == null) {
      LOGE(TAG, "Videos fragment not found.");
      return;
    }
    mSelectedYear = year;

    /* [ANALYTICS:EVENT]
     * TRIGGER:   Select a year on the Years dropdown in the Video Library.
     * CATEGORY:  'Video Library'
     * ACTION:    selectyear
     * LABEL:     year (e.g. 2014, 2013, 2012)
     * [/ANALYTICS]
     */
    AnalyticsManager.sendEvent("Video Library", "selectyear", String.valueOf(year), 0L);

    frag.setFilterAndReload(mSelectedYear, mSelectedTopic);
  }