The function select_adf_by_aid first searches for the complete AID in the set of AIDs that were read from EF.DIR. Lets put this task into a separate helper method Change-Id: I88447d47bc96d0d4ff5cea694b46e854232cdf86