private void updateActionSummary(Preference pref, ActionInfo.Record record) { ActionInfo info = new ActionInfo(record); // name if (Strings.isNullOrEmpty(info.getName())) { if (record.type == ActionInfo.TYPE_NONE) { pref.setSummary(getString(R.string.none)); } else { pref.setSummary(getString(R.string.not_found)); } } else { pref.setSummary(info.getName()); } // icon pref.setIcon(info.newIconDrawable(pref.getContext())); }