what-the-bank/sources/o/SVZ.java

64 lines
1.6 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package o;
import android.graphics.Bitmap;
import android.graphics.Rect;
import android.net.Uri;
import java.io.File;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
/* loaded from: classes3.dex */
public final class SVZ {
public final Bitmap a;
public int b;
public final Integer c;
public boolean d;
public Rect e;
public final Uri i;
private SVZ(Uri uri) {
String obj = uri.toString();
if (obj.startsWith("file:///") && !new File(obj.substring(7)).exists()) {
try {
uri = Uri.parse(URLDecoder.decode(obj, "UTF-8"));
} catch (UnsupportedEncodingException unused) {
}
}
this.a = null;
this.i = uri;
this.c = null;
this.d = true;
}
private SVZ(int i) {
this.a = null;
this.i = null;
this.c = Integer.valueOf(i);
this.d = true;
}
public static SVZ a(int i) {
return new SVZ(i);
}
public static SVZ d(String str) {
if (str == null) {
throw new NullPointerException("Asset name must not be null");
}
return b("file:///android_asset/".concat(String.valueOf(str)));
}
public static SVZ b(String str) {
if (str == null) {
throw new NullPointerException("Uri must not be null");
}
if (!str.contains("://")) {
if (str.startsWith("/")) {
str = str.substring(1);
}
str = "file:///".concat(String.valueOf(str));
}
return new SVZ(Uri.parse(str));
}
}