How to get application icon? - Android studio : I'm trying to do an app with all installed app's name, permissions and icon. 
I have done successfully the first and the second, but I don't know what to do for the third.

Here it is AppsAdapter class:

    class AppsAdapter extends BaseAdapter {

    private final Context mContext;
    private List<Pair<String, List<String>>> mAppsWithPermission;

    public AppsAdapter(Context context, List<Pair<String, List<String>>> appsWithPermission) {
        mContext = context;
        mAppsWithPermission = appsWithPermission;
    }

    static class ViewHolder {
        public TextView appName;
        public TextView appPermissions;
        public ImageView appIcon;
    }

    @Override
    public int getCount() {
        return mAppsWithPermission.size();
    }

    @Override
    public Object getItem(int position) {
        return mAppsWithPermission.get(position);
    }

    @Override
    public long getItemId(int position) {
        return mAppsWithPermission.get(position).hashCode();
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        ViewHolder holder;

        if (convertView == null) {

            convertView = LayoutInflater.from(mContext).inflate(R.layout.list_item, parent, false);
            holder = new ViewHolder();
            holder.appName = convertView.findViewById(R.id.list_item_appname);
            holder.appPermissions = convertView.findViewById(R.id.list_item_apppermissions);
            holder.appIcon = convertView.findViewById(R.id.list_item_appicon);
            convertView.setTag(holder);

        } else {
            holder = (ViewHolder) convertView.getTag();
        }

        Pair<String, List<String>> item = mAppsWithPermission.get(position);

        holder.appName.setText(item.first);
        holder.appPermissions.setText(item.second.toString());
        

        return convertView;

    }
    }

I'm trying to get AppIcon.

What should I do? 

Thanks in advance

Faby

