question: public int allocateRankForNewItem ( ShortcutInfo info ) { int rank = getItemCount ( ) ; ArrayList < View > views = new ArrayList < View > ( mFolder . getItemsInReadingOrder ( ) ) ; views . add ( rank , null ) ; arrangeChildren ( views , views . size ( ) , false ) ; setCurrentPage ( rank / mMaxItemsPerPage ) ; return rank ; }
target:  Create space for a new item at the end, and returns the rank for that item. Also sets the current page to the last page.