Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 25fab805 authored by George Mount's avatar George Mount Committed by Android (Google) Code Review
Browse files

Merge "Fix extra gray item in secure album." into gb-ub-photos-arches

parents 40bb7158 78ea143f
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -64,18 +64,23 @@ public class SecureAlbum extends MediaSet implements StitchingChangeListener {
    }

    public void addMediaItem(boolean isVideo, int id) {
        Path pathBase;
        if (isVideo) {
            mAllItems.add(Path.fromString("/local/video/item/" + id));
            pathBase = LocalVideo.ITEM_PATH;
            mMinVideoId = Math.min(mMinVideoId, id);
            mMaxVideoId = Math.max(mMaxVideoId, id);
        } else {
            mAllItems.add(Path.fromString("/local/image/item/" + id));
            pathBase = LocalImage.ITEM_PATH;
            mMinImageId = Math.min(mMinImageId, id);
            mMaxImageId = Math.max(mMaxImageId, id);
        }
        Path path = pathBase.getChild(id);
        if (!mAllItems.contains(path)) {
            mAllItems.add(path);
            mAllItemTypes.add(isVideo);
            mNotifier.fakeChange();
        }
    }

    // The sequence is stitching items, local media items, and unlock image.
    @Override