- final List<Account> matches =
- (profileUUID == null) ? dao.lookupByNameSync(String.valueOf(constraint))
- : dao.lookupInProfileByNameSync(profileUUID,
- String.valueOf(constraint));
+ Logger.debug("acc", String.format("Looking for account '%s'", constraint));
+ final List<String> matches = AccountDAO.unbox(
+ (profileId == NO_PROFILE_ID) ? dao.lookupNamesByNameSync(
+ String.valueOf(constraint)
+ .toUpperCase()) : dao.lookupNamesInProfileByNameSync(profileId,
+ String.valueOf(constraint)
+ .toUpperCase()));