@Override
    public void checkSelectedMedia(List<BaseMedia> allMedias, List<BaseMedia> selectedMedias) {
        if (allMedias == null || allMedias.size() == 0) {
            return;
        }
        Map<String, ImageMedia> map = new HashMap<>(allMedias.size());
        for (BaseMedia allMedia : allMedias) {
            if (!(allMedia instanceof ImageMedia)) {
                return;
            }
            ImageMedia media = (ImageMedia) allMedia;
            media.setSelected(false);
            map.put(media.getPath(), media);
        }
        if (selectedMedias == null || selectedMedias.size() < 0) {
            return;
        }
        for (BaseMedia media : selectedMedias) {
            if (map.containsKey(media.getPath())) {
                map.get(media.getPath()).setSelected(true);
            }
        }
    }
A presenter implement {@link com.bilibili.boxing.presenter.PickerContract.Presenter}.

@author ChenSL
boxing/src/main/java/com/bilibili/boxing/presenter/PickerPresenter.java