code: function getMainLaunchActivityIndex(activities) {
    var launchActivityIndex = -1;
    activities.some(function(activity, index) {
      if (isLaunchActivity(activity)) {
        launchActivityIndex = index;
        return true;
      }
  
      return false;
    });
  
    return launchActivityIndex;
  }
docs: Find index of the applications launcher activity.
  
  @param {Array} activities - list of all activities in the app
  @return {Integer} index of the launch activity; -1 - if none was found