public int getCount() {
   int count = 0;
   int activityCount = mDataModel.getActivityCount();
   if (!mShowDefaultActivity && mDataModel.getDefaultActivity() != null) {
     activityCount--;
   }
   count = Math.min(activityCount, mMaxActivityCount);
   if (mShowFooterView) {
     count++;
   }
   return count;
 }
 public Object getItem(int position) {
   final int itemViewType = getItemViewType(position);
   switch (itemViewType) {
     case ITEM_VIEW_TYPE_FOOTER:
       return null;
     case ITEM_VIEW_TYPE_ACTIVITY:
       if (!mShowDefaultActivity && mDataModel.getDefaultActivity() != null) {
         position++;
       }
       return mDataModel.getActivity(position);
     default:
       throw new IllegalArgumentException();
   }
 }
 public ResolveInfo getDefaultActivity() {
   return mDataModel.getDefaultActivity();
 }