Live Football Updates v1.0.1版本的 MD5 值为:636649089335ebb37514551724606ad0
以下内容为反编译后的 t.java 源代码,内容仅作参考
package u1;
import android.content.Context;
import android.content.pm.PackageManager;
import android.content.res.AssetFileDescriptor;
import android.content.res.Resources;
import android.net.Uri;
import android.text.TextUtils;
import com.facebook.ads.AdError;
import java.io.EOFException;
import java.io.FileInputStream;
import java.io.IOException;
import java.nio.channels.FileChannel;
import s1.e0;
public final class t extends b {
public final Context f31301e;
public h f31302f;
public AssetFileDescriptor f31303g;
public FileInputStream f31304h;
public long i;
public boolean f31305j;
public static class a extends f {
public a(int i, String str, Exception exc) {
super(i, str, exc);
}
}
public t(Context context) {
super(false);
this.f31301e = context.getApplicationContext();
}
@Deprecated
public static Uri buildRawResourceUri(int i) {
return Uri.parse("rawresource:///" + i);
}
@Override
public final void close() throws a {
this.f31302f = null;
try {
try {
FileInputStream fileInputStream = this.f31304h;
if (fileInputStream != null) {
fileInputStream.close();
}
this.f31304h = null;
try {
try {
AssetFileDescriptor assetFileDescriptor = this.f31303g;
if (assetFileDescriptor != null) {
assetFileDescriptor.close();
}
} catch (IOException e10) {
throw new a(2000, null, e10);
}
} finally {
this.f31303g = null;
if (this.f31305j) {
this.f31305j = false;
m();
}
}
} catch (IOException e11) {
throw new a(2000, null, e11);
}
} catch (Throwable th2) {
this.f31304h = null;
try {
try {
AssetFileDescriptor assetFileDescriptor2 = this.f31303g;
if (assetFileDescriptor2 != null) {
assetFileDescriptor2.close();
}
this.f31303g = null;
if (this.f31305j) {
this.f31305j = false;
m();
}
throw th2;
} catch (IOException e12) {
throw new a(2000, null, e12);
}
} finally {
this.f31303g = null;
if (this.f31305j) {
this.f31305j = false;
m();
}
}
}
}
@Override
public final long d(h hVar) throws a {
Resources resources;
int parseInt;
AssetFileDescriptor openRawResourceFd;
long min;
String host;
this.f31302f = hVar;
n(hVar);
Uri normalizeScheme = hVar.f31250a.normalizeScheme();
boolean equals = TextUtils.equals("rawresource", normalizeScheme.getScheme());
Context context = this.f31301e;
try {
try {
if (!equals) {
if (TextUtils.equals("android.resource", normalizeScheme.getScheme()) && normalizeScheme.getPathSegments().size() == 1) {
String lastPathSegment = normalizeScheme.getLastPathSegment();
lastPathSegment.getClass();
}
if (TextUtils.equals("android.resource", normalizeScheme.getScheme())) {
String path = normalizeScheme.getPath();
path.getClass();
if (path.startsWith("/")) {
path = path.substring(1);
}
if (TextUtils.isEmpty(normalizeScheme.getHost())) {
host = context.getPackageName();
} else {
host = normalizeScheme.getHost();
}
if (host.equals(context.getPackageName())) {
resources = context.getResources();
} else {
try {
resources = context.getPackageManager().getResourcesForApplication(host);
} catch (PackageManager.NameNotFoundException e10) {
throw new a(2005, "Package in android.resource:// URI not found. Check http://g.co/dev/packagevisibility.", e10);
}
}
parseInt = resources.getIdentifier(a0.f.h(host, ":", path), "raw", null);
if (parseInt == 0) {
throw new a(2005, "Resource not found.", null);
}
openRawResourceFd = resources.openRawResourceFd(parseInt);
if (openRawResourceFd == null) {
this.f31303g = openRawResourceFd;
long length = openRawResourceFd.getLength();
FileInputStream fileInputStream = new FileInputStream(this.f31303g.getFileDescriptor());
this.f31304h = fileInputStream;
int i = (length > (-1L) ? 1 : (length == (-1L) ? 0 : -1));
long j4 = hVar.f31255f;
try {
if (i != 0 && j4 > length) {
throw new a(AdError.REMOTE_ADS_SERVICE_ERROR, null, null);
}
long startOffset = this.f31303g.getStartOffset();
long skip = fileInputStream.skip(startOffset + j4) - startOffset;
if (skip == j4) {
if (i == 0) {
FileChannel channel = fileInputStream.getChannel();
if (channel.size() == 0) {
this.i = -1L;
} else {
long size = channel.size() - channel.position();
this.i = size;
if (size < 0) {
throw new a(AdError.REMOTE_ADS_SERVICE_ERROR, null, null);
}
}
} else {
long j10 = length - skip;
this.i = j10;
if (j10 < 0) {
throw new f(AdError.REMOTE_ADS_SERVICE_ERROR);
}
}
long j11 = hVar.f31256g;
int i10 = (j11 > (-1L) ? 1 : (j11 == (-1L) ? 0 : -1));
if (i10 != 0) {
long j12 = this.i;
if (j12 == -1) {
min = j11;
} else {
min = Math.min(j12, j11);
}
this.i = min;
}
this.f31305j = true;
o(hVar);
if (i10 == 0) {
return this.i;
}
return j11;
}
throw new a(AdError.REMOTE_ADS_SERVICE_ERROR, null, null);
} catch (a e11) {
throw e11;
} catch (IOException e12) {
throw new a(2000, null, e12);
}
}
throw new a(2000, "Resource is compressed: " + normalizeScheme, null);
}
throw new a(1004, "Unsupported URI scheme (" + normalizeScheme.getScheme() + "). Only android.resource is supported.", null);
}
openRawResourceFd = resources.openRawResourceFd(parseInt);
if (openRawResourceFd == null) {
}
} catch (Resources.NotFoundException e13) {
throw new a(2005, null, e13);
}
String lastPathSegment2 = normalizeScheme.getLastPathSegment();
lastPathSegment2.getClass();
parseInt = Integer.parseInt(lastPathSegment2);
} catch (NumberFormatException unused) {
throw new a(1004, "Resource identifier must be an integer.", null);
}
resources = context.getResources();
}
@Override
public final Uri j() {
h hVar = this.f31302f;
if (hVar != null) {
return hVar.f31250a;
}
return null;
}
@Override
public final int read(byte[] bArr, int i, int i10) throws a {
if (i10 == 0) {
return 0;
}
long j4 = this.i;
if (j4 == 0) {
return -1;
}
if (j4 != -1) {
try {
i10 = (int) Math.min(j4, i10);
} catch (IOException e10) {
throw new a(2000, null, e10);
}
}
FileInputStream fileInputStream = this.f31304h;
int i11 = e0.f30451a;
int read = fileInputStream.read(bArr, i, i10);
if (read == -1) {
if (this.i == -1) {
return -1;
}
throw new a(2000, "End of stream reached having not read sufficient data.", new EOFException());
}
long j10 = this.i;
if (j10 != -1) {
this.i = j10 - read;
}
l(read);
return read;
}
}