question: public boolean handleFileUpdated ( DownloadsDB db , int index , String filename , long fileSize ) { DownloadInfo di = db . getDownloadInfoByFileName ( filename ) ; if ( null != di ) { String oldFile = di . mFileName ; if ( null != oldFile ) { if ( filename . equals ( oldFile ) ) { return false ; } String deleteFile = Helpers . generateSaveFileName ( this , oldFile ) ; File f = new File ( deleteFile ) ; if ( f . exists ( ) ) f . delete ( ) ; } } return ! Helpers . doesFileExist ( this , filename , fileSize , true ) ; }
target:  The APK has been updated and a filename has been sent down from the Market call. If the file has the same name as the previous file, we do nothing as the file is guaranteed to be the same. If the file does not have the same name, we download it if it hasn't already been delivered by Market.