package h2;

import android.os.StatFs;
import java.io.File;
import x7.t;
import x7.x;

/* JADX INFO: renamed from: h2.a, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C1028a {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public x f13354a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public t f13355b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public double f13356c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public long f13357d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public long f13358e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public g7.d f13359f;

    public final i a() {
        long j8;
        x xVar = this.f13354a;
        if (xVar == null) {
            throw new IllegalStateException("directory == null");
        }
        double d8 = this.f13356c;
        if (d8 > 0.0d) {
            try {
                File fileF = xVar.f();
                fileF.mkdir();
                StatFs statFs = new StatFs(fileF.getAbsolutePath());
                j8 = s7.d.j((long) (d8 * statFs.getBlockCountLong() * statFs.getBlockSizeLong()), this.f13357d, this.f13358e);
            } catch (Exception unused) {
                j8 = this.f13357d;
            }
        } else {
            j8 = 0;
        }
        return new i(j8, this.f13359f, this.f13355b, xVar);
    }
}
