package ඓ.ᨨ.K.ඓ.ῲ;

import android.content.Context;
import android.database.Cursor;
import android.database.MatrixCursor;
import android.database.MergeCursor;
import android.net.Uri;
import android.provider.MediaStore;
import com.zhihu.matisse.internal.entity.Album;
import ඓ.ᨨ.K.ඓ.K.C0778;
import ῲ.ᓣ.ῲ.C1687;

/* renamed from: ඓ.ᨨ.K.ඓ.ῲ.ῲ  reason: contains not printable characters */
/* compiled from: AlbumMediaLoader */
public class C0776 extends C1687 {

    /* renamed from: ᑓ  reason: contains not printable characters */
    public static final String[] f3935 = {"_id", "_display_name", "mime_type", "_size", "duration"};

    /* renamed from: ゎ  reason: contains not printable characters */
    public static final String[] f3936 = {String.valueOf(1), String.valueOf(3)};

    /* renamed from: 㴪  reason: contains not printable characters */
    public static final Uri f3937 = MediaStore.Files.getContentUri("external");

    /* renamed from: ᓆ  reason: contains not printable characters */
    public final boolean f3938;

    public C0776(Context context, String str, String[] strArr, boolean z) {
        super(context, f3937, f3935, str, strArr, "datetaken DESC");
        this.f3938 = z;
    }

    /* renamed from: K  reason: contains not printable characters */
    public static C1687 m2348(Context context, Album album, boolean z) {
        String[] strArr;
        String[] strArr2;
        String str;
        String[] strArr3;
        String str2 = "media_type=? AND _size>0";
        if (!album.m1905()) {
            if (C0778.C0779.f3967.m2360()) {
                strArr2 = new String[]{String.valueOf(1), album.m1910(), "image/gif"};
                str = "media_type=? AND  bucket_id=? AND mime_type=? AND _size>0";
            } else {
                if (C0778.C0779.f3967.m2359()) {
                    strArr3 = new String[]{String.valueOf(1), album.m1910()};
                } else if (C0778.C0779.f3967.m2358()) {
                    strArr3 = new String[]{String.valueOf(3), album.m1910()};
                } else {
                    strArr2 = new String[]{String.valueOf(1), String.valueOf(3), album.m1910()};
                    str = "(media_type=? OR media_type=?) AND  bucket_id=? AND _size>0";
                }
                strArr = strArr3;
                str2 = "media_type=? AND  bucket_id=? AND _size>0";
                z = false;
            }
            str2 = str;
            strArr = strArr2;
            z = false;
        } else if (C0778.C0779.f3967.m2360()) {
            strArr = new String[]{String.valueOf(1), "image/gif"};
            str2 = "media_type=? AND mime_type=? AND _size>0";
        } else if (C0778.C0779.f3967.m2359()) {
            strArr = new String[]{String.valueOf(1)};
        } else if (C0778.C0779.f3967.m2358()) {
            strArr = new String[]{String.valueOf(3)};
        } else {
            strArr = f3936;
            str2 = "(media_type=? OR media_type=?) AND _size>0";
        }
        return new C0776(context, str2, strArr, z);
    }

    @Override // ῲ.ᓣ.ῲ.C1683
    /* renamed from: 㑃  reason: contains not printable characters */
    public void m2351() {
    }

    @Override // ῲ.ᓣ.ῲ.AbstractC1688, ῲ.ᓣ.ῲ.C1687, ῲ.ᓣ.ῲ.C1687
    /* renamed from: ᑓ  reason: contains not printable characters */
    public Cursor m2350() {
        Cursor r0 = super.m4299();
        if (!this.f3938 || !m4290().getApplicationContext().getPackageManager().hasSystemFeature("android.hardware.camera")) {
            return r0;
        }
        MatrixCursor matrixCursor = new MatrixCursor(f3935);
        matrixCursor.addRow(new Object[]{-1L, "Capture", "", 0, 0});
        return new MergeCursor(new Cursor[]{matrixCursor, r0});
    }
}
