jimu-decompiled/sources/com/tencent/open/a/d.java
2025-05-13 19:24:51 +02:00

91 lines
2.3 KiB
Java

package com.tencent.open.a;
import android.annotation.SuppressLint;
import android.os.Environment;
import android.os.StatFs;
import java.io.File;
import java.text.SimpleDateFormat;
/* compiled from: ProGuard */
/* loaded from: classes.dex */
public class d {
/* compiled from: ProGuard */
public static final class a {
public static final boolean a(int i, int i2) {
return i2 == (i & i2);
}
}
/* compiled from: ProGuard */
public static final class b {
public static boolean a() {
String externalStorageState = Environment.getExternalStorageState();
return "mounted".equals(externalStorageState) || "mounted_ro".equals(externalStorageState);
}
public static c b() {
if (a()) {
return c.b(Environment.getExternalStorageDirectory());
}
return null;
}
}
/* compiled from: ProGuard */
public static class c {
private File a;
private long b;
private long c;
public File a() {
return this.a;
}
public long b() {
return this.b;
}
public long c() {
return this.c;
}
public String toString() {
return String.format("[%s : %d / %d]", a().getAbsolutePath(), Long.valueOf(c()), Long.valueOf(b()));
}
public void a(File file) {
this.a = file;
}
public void b(long j) {
this.c = j;
}
public static c b(File file) {
c cVar = new c();
cVar.a(file);
StatFs statFs = new StatFs(file.getAbsolutePath());
long blockSize = statFs.getBlockSize();
long blockCount = statFs.getBlockCount();
long availableBlocks = statFs.getAvailableBlocks();
cVar.a(blockCount * blockSize);
cVar.b(availableBlocks * blockSize);
return cVar;
}
public void a(long j) {
this.b = j;
}
}
/* compiled from: ProGuard */
/* renamed from: com.tencent.open.a.d$d, reason: collision with other inner class name */
public static final class C0017d {
@SuppressLint({"SimpleDateFormat"})
public static SimpleDateFormat a(String str) {
return new SimpleDateFormat(str);
}
}
}