question: private void cleanUpHistory ( ) { if ( ! mHistoryOfNumbers . isEmpty ( ) && mHistoryOfNumbers . size ( ) >= MAX_HISTORY_SIZE ) { for ( int i = 0 ; i < Math . max ( 1 , MAX_HISTORY_SIZE / 2 ) ; i ++ ) { mPreviousNumbers . remove ( mHistoryOfNumbers . removeFirst ( ) ) ; } } }
target:  Removes old tracks and cleans up the history preparing for new tracks to be added to the mapping