package ph;

import android.util.Log;
import com.bumptech.glide.load.data.d;
import java.io.File;
import java.io.IOException;
import java.nio.ByteBuffer;
import ph.n;

/* loaded from: classes4.dex */
public class d implements n {

    /* JADX INFO: Access modifiers changed from: private */
    /* loaded from: classes4.dex */
    public static final class a implements com.bumptech.glide.load.data.d {

        /* renamed from: p, reason: collision with root package name */
        private final File f32656p;

        a(File file) {
            this.f32656p = file;
        }

        @Override // com.bumptech.glide.load.data.d
        public Class a() {
            return ByteBuffer.class;
        }

        @Override // com.bumptech.glide.load.data.d
        public void b() {
        }

        @Override // com.bumptech.glide.load.data.d
        public void cancel() {
        }

        @Override // com.bumptech.glide.load.data.d
        public jh.a d() {
            return jh.a.LOCAL;
        }

        @Override // com.bumptech.glide.load.data.d
        public void e(com.bumptech.glide.g gVar, d.a aVar) {
            try {
                aVar.f(ei.a.a(this.f32656p));
            } catch (IOException e10) {
                if (Log.isLoggable("ByteBufferFileLoader", 3)) {
                    Log.d("ByteBufferFileLoader", "Failed to obtain ByteBuffer for file", e10);
                }
                aVar.c(e10);
            }
        }
    }

    /* loaded from: classes4.dex */
    public static class b implements o {
        @Override // ph.o
        public void d() {
        }

        @Override // ph.o
        public n e(r rVar) {
            return new d();
        }
    }

    @Override // ph.n
    /* renamed from: c, reason: merged with bridge method [inline-methods] */
    public n.a b(File file, int i10, int i11, jh.h hVar) {
        return new n.a(new di.b(file), new a(file));
    }

    @Override // ph.n
    /* renamed from: d, reason: merged with bridge method [inline-methods] */
    public boolean a(File file) {
        return true;
    }
}
