package ph;

import android.content.res.AssetFileDescriptor;
import android.net.Uri;
import android.os.ParcelFileDescriptor;
import android.text.TextUtils;
import java.io.File;
import java.io.InputStream;
import ph.n;

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

    /* renamed from: a, reason: collision with root package name */
    private final n f32741a;

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

        @Override // ph.o
        public n e(r rVar) {
            return new v(rVar.d(Uri.class, AssetFileDescriptor.class));
        }
    }

    /* 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 v(rVar.d(Uri.class, ParcelFileDescriptor.class));
        }
    }

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

        @Override // ph.o
        public n e(r rVar) {
            return new v(rVar.d(Uri.class, InputStream.class));
        }
    }

    public v(n nVar) {
        this.f32741a = nVar;
    }

    private static Uri e(String str) {
        if (TextUtils.isEmpty(str)) {
            return null;
        }
        if (str.charAt(0) == '/') {
            return f(str);
        }
        Uri parse = Uri.parse(str);
        return parse.getScheme() == null ? f(str) : parse;
    }

    private static Uri f(String str) {
        return Uri.fromFile(new File(str));
    }

    @Override // ph.n
    /* renamed from: c, reason: merged with bridge method [inline-methods] */
    public n.a b(String str, int i10, int i11, jh.h hVar) {
        Uri e10 = e(str);
        if (e10 == null || !this.f32741a.a(e10)) {
            return null;
        }
        return this.f32741a.b(e10, i10, i11, hVar);
    }

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