discord-jadx/app/src/main/java/c/c/a/a0/d.java

3324 lines
124 KiB
Java

package c.c.a.a0;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.res.TypedArray;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.StateListDrawable;
import android.media.MediaFormat;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
import android.os.Looper;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.PowerManager;
import android.os.Process;
import android.os.Trace;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.Spanned;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.util.Base64;
import android.util.Log;
import android.util.Pair;
import androidx.annotation.ColorInt;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RecentlyNonNull;
import androidx.core.app.NotificationCompat;
import androidx.core.internal.view.SupportMenu;
import androidx.core.text.TextUtilsCompat;
import androidx.core.view.ViewCompat;
import androidx.recyclerview.widget.ItemTouchHelper;
import c.c.a.b0.g;
import c.f.d.d.i;
import c.f.g.e.b0;
import c.f.g.e.d0;
import c.f.g.e.e0;
import c.f.g.e.p;
import c.f.g.e.r;
import c.f.g.e.s;
import c.f.g.e.u;
import c.f.g.e.v;
import c.f.g.f.c;
import c.f.j.d.e;
import c.f.m.h;
import c.g.a.a.p;
import c.g.a.c.j;
import c.i.a.b.i.d;
import c.i.a.c.b3.b;
import c.i.a.c.b3.t.f;
import c.i.a.c.f3.t;
import c.i.a.c.f3.x;
import c.i.a.c.g3.z.h;
import c.i.a.c.x2.o;
import c.i.a.c.x2.w;
import c.i.a.c.x2.z;
import com.adjust.sdk.Constants;
import com.discord.api.stageinstance.StageInstance;
import com.discord.api.stageinstance.StageInstancePrivacyLevel;
import com.discord.api.voice.state.StageRequestToSpeakState;
import com.discord.api.voice.state.VoiceState;
import com.discord.app.AppPermissionsRequests;
import com.discord.i18n.RenderContext;
import com.discord.player.MediaSource;
import com.discord.player.MediaType;
import com.discord.simpleast.core.node.Node;
import com.discord.utilities.logging.Logger;
import com.discord.utilities.logging.LoggingProvider;
import com.facebook.cache.common.CacheKey;
import com.facebook.common.file.FileUtils$CreateDirectoryException;
import com.facebook.common.file.FileUtils$FileDeleteException;
import com.facebook.common.file.FileUtils$ParentDirNotFoundException;
import com.facebook.common.file.FileUtils$RenameException;
import com.facebook.datasource.DataSource;
import com.facebook.drawee.R;
import com.facebook.drawee.drawable.ScalingUtils$ScaleType;
import com.facebook.soloader.SysUtil$LollipopSysdeps;
import com.facebook.soloader.SysUtil$MarshmallowSysdeps;
import com.google.android.exoplayer2.ParserException;
import com.google.android.exoplayer2.metadata.Metadata;
import com.google.android.gms.common.api.ApiException;
import com.google.android.gms.common.api.ResolvableApiException;
import com.google.android.gms.common.api.Status;
import com.google.android.gms.common.internal.safeparcel.SafeParcelReader$ParseException;
import com.google.android.gms.tasks.TaskCompletionSource;
import com.google.android.material.shadow.ShadowDrawableWrapper;
import com.google.android.material.snackbar.BaseTransientBottomBar;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonToken;
import d0.t.k;
import d0.z.d.m;
import java.io.EOFException;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.RandomAccessFile;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.Array;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.lang.reflect.TypeVariable;
import java.lang.reflect.WildcardType;
import java.net.URL;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.channels.FileChannel;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Collection;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Objects;
import java.util.UUID;
import java.util.concurrent.ScheduledExecutorService;
import java.util.zip.Inflater;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import org.checkerframework.checker.nullness.qual.EnsuresNonNull;
import org.checkerframework.dataflow.qual.Pure;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
/* compiled from: AnimatableValueParser */
public class d {
public static boolean a;
public static ScheduledExecutorService b;
@Nullable
/* renamed from: c reason: collision with root package name */
public static Boolean f258c;
@Nullable
public static Boolean d;
@Nullable
public static Boolean e;
@Nullable
public static Boolean f;
/* compiled from: ArrayBuilders */
public static class a {
public final /* synthetic */ Class a;
public final /* synthetic */ int b;
/* renamed from: c reason: collision with root package name */
public final /* synthetic */ Object f259c;
public a(Class cls, int i, Object obj) {
this.a = cls;
this.b = i;
this.f259c = obj;
}
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(c.g.a.c.i0.d.o(obj, this.a) && Array.getLength(obj) == this.b)) {
return false;
}
for (int i = 0; i < this.b; i++) {
Object obj2 = Array.get(this.f259c, i);
Object obj3 = Array.get(obj, i);
if (!(obj2 == obj3 || obj2 == null || obj2.equals(obj3))) {
return false;
}
}
return true;
}
}
@NonNull
@EnsuresNonNull({"#1"})
public static <T> T A(@Nullable T t) {
Objects.requireNonNull(t, "null reference");
return t;
}
@NonNull
public static String A0(@RecentlyNonNull int i) {
switch (i) {
case -1:
return "SUCCESS_CACHE";
case 0:
return "SUCCESS";
case 1:
case 9:
case 11:
case 12:
default:
return c.d.b.a.a.f(32, "unknown status code: ", i);
case 2:
return "SERVICE_VERSION_UPDATE_REQUIRED";
case 3:
return "SERVICE_DISABLED";
case 4:
return "SIGN_IN_REQUIRED";
case 5:
return "INVALID_ACCOUNT";
case 6:
return "RESOLUTION_REQUIRED";
case 7:
return "NETWORK_ERROR";
case 8:
return "INTERNAL_ERROR";
case 10:
return "DEVELOPER_ERROR";
case 13:
return "ERROR";
case 14:
return "INTERRUPTED";
case 15:
return "TIMEOUT";
case 16:
return "CANCELED";
case 17:
return "API_NOT_CONNECTED";
case 18:
return "DEAD_CLIENT";
case 19:
return "REMOTE_EXCEPTION";
case 20:
return "CONNECTION_SUSPENDED_DURING_CALL";
case 21:
return "RECONNECTION_TIMED_OUT_DURING_UPDATE";
case 22:
return "RECONNECTION_TIMED_OUT";
}
}
public static void A1(FileChannel fileChannel, ByteBuffer byteBuffer, int i, long j) throws IOException {
int read;
byteBuffer.position(0);
byteBuffer.limit(i);
while (byteBuffer.remaining() > 0 && (read = fileChannel.read(byteBuffer, j)) != -1) {
j += (long) read;
}
if (byteBuffer.remaining() <= 0) {
byteBuffer.position(0);
return;
}
throw new h("ELF file truncated");
}
public static void A2(Parcel parcel, int i) {
int dataPosition = parcel.dataPosition();
parcel.setDataPosition(i - 4);
parcel.writeInt(dataPosition - i);
parcel.setDataPosition(dataPosition);
}
public static void B(boolean z2) {
if (!z2) {
throw new IllegalStateException();
}
}
public static String[] B0() {
return Build.VERSION.SDK_INT >= 23 ? SysUtil$MarshmallowSysdeps.getSupportedAbis() : SysUtil$LollipopSysdeps.getSupportedAbis();
}
public static int B1(InputStream inputStream) throws IOException {
return ((((byte) (inputStream.read() & 255)) << 16) & ItemTouchHelper.ACTION_MODE_DRAG_MASK) | ((((byte) (inputStream.read() & 255)) << 8) & 65280) | (((byte) (inputStream.read() & 255)) & 255);
}
public static void C(boolean z2, Object obj) {
if (!z2) {
throw new IllegalStateException(String.valueOf(obj));
}
}
public static String C0(String str) {
return c.d.b.a.a.v("TransportRuntime.", str);
}
@RecentlyNonNull
public static boolean C1(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i) {
w2(parcel, i, 4);
return parcel.readInt() != 0;
}
@Pure
public static void D(boolean z2) {
if (!z2) {
throw new IllegalStateException();
}
}
public static Pair<Integer, Integer> D0(InputStream inputStream) throws IOException {
inputStream.skip(7);
short read = (short) (inputStream.read() & 255);
short read2 = (short) (inputStream.read() & 255);
short read3 = (short) (inputStream.read() & 255);
if (read == 157 && read2 == 1 && read3 == 42) {
return new Pair<>(Integer.valueOf(m0(inputStream)), Integer.valueOf(m0(inputStream)));
}
return null;
}
@RecentlyNonNull
public static IBinder D1(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i) {
int K1 = K1(parcel, i);
int dataPosition = parcel.dataPosition();
if (K1 == 0) {
return null;
}
IBinder readStrongBinder = parcel.readStrongBinder();
parcel.setDataPosition(dataPosition + K1);
return readStrongBinder;
}
@Pure
public static void E(boolean z2, Object obj) {
if (!z2) {
throw new IllegalStateException(String.valueOf(obj));
}
}
public static Pair<Integer, Integer> E0(InputStream inputStream) throws IOException {
v0(inputStream);
if (((byte) (inputStream.read() & 255)) != 47) {
return null;
}
int read = ((byte) inputStream.read()) & 255;
return new Pair<>(Integer.valueOf(((((byte) inputStream.read()) & 255) | ((read & 63) << 8)) + 1), Integer.valueOf(((((((byte) inputStream.read()) & 255) & 15) << 10) | ((((byte) inputStream.read()) & 255) << 2) | ((read & 192) >> 6)) + 1));
}
@RecentlyNonNull
public static int E1(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i) {
w2(parcel, i, 4);
return parcel.readInt();
}
public static void F(@RecentlyNonNull boolean z2) {
if (!z2) {
throw new IllegalStateException();
}
}
public static long F0(FileChannel fileChannel, ByteBuffer byteBuffer, long j) throws IOException {
A1(fileChannel, byteBuffer, 4, j);
return ((long) byteBuffer.getInt()) & 4294967295L;
}
@RecentlyNonNull
public static long F1(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i) {
w2(parcel, i, 8);
return parcel.readLong();
}
public static void G(@RecentlyNonNull boolean z2, @RecentlyNonNull Object obj) {
if (!z2) {
throw new IllegalStateException(String.valueOf(obj));
}
}
public static final boolean G0(Long l, long j) {
return l != null && (l.longValue() & j) == j;
}
public static int G1(x xVar) {
int i = 0;
while (xVar.a() != 0) {
int t = xVar.t();
i += t;
if (t != 255) {
return i;
}
}
return -1;
}
@EnsuresNonNull({"#1"})
@Pure
public static <T> T H(@Nullable T t) {
if (t != null) {
return t;
}
throw new IllegalStateException();
}
public static boolean H0(byte[] bArr, byte[] bArr2, int i) {
Objects.requireNonNull(bArr);
Objects.requireNonNull(bArr2);
if (bArr2.length + i > bArr.length) {
return false;
}
for (int i2 = 0; i2 < bArr2.length; i2++) {
if (bArr[i + i2] != bArr2[i2]) {
return false;
}
}
return true;
}
public static int H1(InputStream inputStream, int i, boolean z2) throws IOException {
int i2;
int i3 = 0;
for (int i4 = 0; i4 < i; i4++) {
int read = inputStream.read();
if (read != -1) {
if (z2) {
i2 = (read & 255) << (i4 * 8);
} else {
i3 <<= 8;
i2 = read & 255;
}
i3 |= i2;
} else {
throw new IOException("no more bytes");
}
}
return i3;
}
public static boolean I(byte[] bArr, String str) {
if (bArr.length != str.length()) {
return false;
}
for (int i = 0; i < bArr.length; i++) {
if (str.charAt(i) != bArr[i]) {
return false;
}
}
return true;
}
public static int I0(int i, int i2) {
return ((i + 31) * 31) + i2;
}
public static long I1(x xVar, int i, int i2) {
xVar.E(i);
if (xVar.a() < 5) {
return -9223372036854775807L;
}
int f2 = xVar.f();
if ((8388608 & f2) != 0 || ((2096896 & f2) >> 8) != i2) {
return -9223372036854775807L;
}
if (((f2 & 32) != 0) && xVar.t() >= 7 && xVar.a() >= 7) {
if ((xVar.t() & 16) == 16) {
byte[] bArr = new byte[6];
System.arraycopy(xVar.a, xVar.b, bArr, 0, 6);
xVar.b += 6;
return ((((long) bArr[0]) & 255) << 25) | ((((long) bArr[1]) & 255) << 17) | ((((long) bArr[2]) & 255) << 9) | ((((long) bArr[3]) & 255) << 1) | ((((long) bArr[4]) & 255) >> 7);
}
}
return -9223372036854775807L;
}
public static void J(long j, x xVar, w[] wVarArr) {
while (true) {
boolean z2 = true;
if (xVar.a() > 1) {
int G1 = G1(xVar);
int G12 = G1(xVar);
int i = xVar.b + G12;
if (G12 == -1 || G12 > xVar.a()) {
Log.w("CeaUtil", "Skipping remainder of malformed SEI NAL unit.");
i = xVar.f793c;
} else if (G1 == 4 && G12 >= 8) {
int t = xVar.t();
int y2 = xVar.y();
int f2 = y2 == 49 ? xVar.f() : 0;
int t2 = xVar.t();
if (y2 == 47) {
xVar.F(1);
}
boolean z3 = t == 181 && (y2 == 49 || y2 == 47) && t2 == 3;
if (y2 == 49) {
if (f2 != 1195456820) {
z2 = false;
}
z3 &= z2;
}
if (z3) {
K(j, xVar, wVarArr);
}
}
xVar.E(i);
} else {
return;
}
}
}
public static int J0(Object obj, Object obj2) {
int i = 0;
int hashCode = obj == null ? 0 : obj.hashCode();
if (obj2 != null) {
i = obj2.hashCode();
}
return I0(hashCode, i);
}
public static o.a J1(x xVar) {
xVar.F(1);
int v = xVar.v();
long j = ((long) xVar.b) + ((long) v);
int i = v / 18;
long[] jArr = new long[i];
long[] jArr2 = new long[i];
int i2 = 0;
while (true) {
if (i2 >= i) {
break;
}
long m = xVar.m();
if (m == -1) {
jArr = Arrays.copyOf(jArr, i2);
jArr2 = Arrays.copyOf(jArr2, i2);
break;
}
jArr[i2] = m;
jArr2[i2] = xVar.m();
xVar.F(2);
i2++;
}
xVar.F((int) (j - ((long) xVar.b)));
return new o.a(jArr, jArr2);
}
public static void K(long j, x xVar, w[] wVarArr) {
int t = xVar.t();
if ((t & 64) != 0) {
xVar.F(1);
int i = (t & 31) * 3;
int i2 = xVar.b;
for (w wVar : wVarArr) {
xVar.E(i2);
wVar.c(xVar, i);
if (j != -9223372036854775807L) {
wVar.d(j, 1, i, 0, null);
}
}
}
}
public static void K0(String str, String str2) {
Log.i(C0(str), str2);
}
@RecentlyNonNull
public static int K1(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i) {
return (i & SupportMenu.CATEGORY_MASK) != -65536 ? (i >> 16) & 65535 : parcel.readInt();
}
public static void L(Drawable drawable, Drawable drawable2) {
if (drawable != null && drawable != drawable2) {
drawable.setBounds(drawable2.getBounds());
drawable.setChangingConfigurations(drawable2.getChangingConfigurations());
drawable.setLevel(drawable2.getLevel());
drawable.setVisible(drawable2.isVisible(), false);
drawable.setState(drawable2.getState());
}
}
public static int L0(int i) {
int i2 = 0;
while (i > 0) {
i2++;
i >>>= 1;
}
return i2;
}
public static z L1(x xVar, boolean z2, boolean z3) throws ParserException {
if (z2) {
l2(3, xVar, false);
}
String q = xVar.q((int) xVar.j());
long j = xVar.j();
String[] strArr = new String[((int) j)];
int length = q.length() + 11 + 4;
for (int i = 0; ((long) i) < j; i++) {
strArr[i] = xVar.q((int) xVar.j());
length = length + 4 + strArr[i].length();
}
if (!z3 || (xVar.t() & 1) != 0) {
return new z(q, strArr, length + 1);
}
throw ParserException.a("framing bit expected to be set", null);
}
@RecentlyNonNull
public static Bundle M(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i) {
int K1 = K1(parcel, i);
int dataPosition = parcel.dataPosition();
if (K1 == 0) {
return null;
}
Bundle readBundle = parcel.readBundle();
parcel.setDataPosition(dataPosition + K1);
return readBundle;
}
public static <T> DataSource<T> M0(Throwable th) {
c.f.e.h hVar = new c.f.e.h();
Objects.requireNonNull(th);
hVar.k(th, null);
return hVar;
}
public static void M1(b.C0086b bVar) {
bVar.k = -3.4028235E38f;
bVar.j = Integer.MIN_VALUE;
CharSequence charSequence = bVar.a;
if (charSequence instanceof Spanned) {
if (!(charSequence instanceof Spannable)) {
bVar.a = SpannableString.valueOf(charSequence);
}
CharSequence charSequence2 = bVar.a;
Objects.requireNonNull(charSequence2);
N1((Spannable) charSequence2, c.i.a.c.d3.h.a);
}
}
@RecentlyNonNull
public static byte[] N(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i) {
int K1 = K1(parcel, i);
int dataPosition = parcel.dataPosition();
if (K1 == 0) {
return null;
}
byte[] createByteArray = parcel.createByteArray();
parcel.setDataPosition(dataPosition + K1);
return createByteArray;
}
/* JADX INFO: Can't fix incorrect switch cases order, some code will duplicate */
/* JADX WARNING: Code restructure failed: missing block: B:98:0x01a2, code lost:
if (r0.equals("video/mp2t") == false) goto L_0x01bc;
*/
/* JADX WARNING: Removed duplicated region for block: B:102:0x01b1 */
/* JADX WARNING: Removed duplicated region for block: B:105:0x01bc */
/* JADX WARNING: Removed duplicated region for block: B:107:0x01c2 A[RETURN, SYNTHETIC] */
/* JADX WARNING: Removed duplicated region for block: B:108:0x01c4 A[RETURN, SYNTHETIC] */
/* JADX WARNING: Removed duplicated region for block: B:109:0x01c6 A[RETURN, SYNTHETIC] */
/* JADX WARNING: Removed duplicated region for block: B:110:0x01c9 A[RETURN, SYNTHETIC] */
/* JADX WARNING: Removed duplicated region for block: B:111:0x01cc A[RETURN, SYNTHETIC] */
/* JADX WARNING: Removed duplicated region for block: B:112:0x01ce A[RETURN, SYNTHETIC] */
/* JADX WARNING: Removed duplicated region for block: B:113:0x01d0 A[RETURN, SYNTHETIC] */
/* JADX WARNING: Removed duplicated region for block: B:114:0x01d3 A[RETURN, SYNTHETIC] */
/* JADX WARNING: Removed duplicated region for block: B:115:0x01d6 A[RETURN, SYNTHETIC] */
/* JADX WARNING: Removed duplicated region for block: B:116:0x01d9 A[RETURN, SYNTHETIC] */
/* JADX WARNING: Removed duplicated region for block: B:117:0x01db A[RETURN, SYNTHETIC] */
/* JADX WARNING: Removed duplicated region for block: B:118:0x01dd A[RETURN, SYNTHETIC] */
/* JADX WARNING: Removed duplicated region for block: B:119:0x01e0 A[RETURN, SYNTHETIC] */
/* JADX WARNING: Removed duplicated region for block: B:120:0x01e3 A[ORIG_RETURN, RETURN, SYNTHETIC] */
/* JADX WARNING: Removed duplicated region for block: B:27:0x0072 */
/* JADX WARNING: Removed duplicated region for block: B:31:0x007b */
/* JADX WARNING: Removed duplicated region for block: B:34:0x0085 */
/* JADX WARNING: Removed duplicated region for block: B:37:0x0094 */
/* JADX WARNING: Removed duplicated region for block: B:40:0x00a2 */
/* JADX WARNING: Removed duplicated region for block: B:43:0x00ae */
/* JADX WARNING: Removed duplicated region for block: B:46:0x00ba */
/* JADX WARNING: Removed duplicated region for block: B:49:0x00c8 */
/* JADX WARNING: Removed duplicated region for block: B:52:0x00d6 */
/* JADX WARNING: Removed duplicated region for block: B:55:0x00e5 */
/* JADX WARNING: Removed duplicated region for block: B:58:0x00f1 */
/* JADX WARNING: Removed duplicated region for block: B:61:0x00ff */
/* JADX WARNING: Removed duplicated region for block: B:64:0x010d */
/* JADX WARNING: Removed duplicated region for block: B:67:0x011b */
/* JADX WARNING: Removed duplicated region for block: B:70:0x0129 */
/* JADX WARNING: Removed duplicated region for block: B:73:0x0137 */
/* JADX WARNING: Removed duplicated region for block: B:76:0x0146 */
/* JADX WARNING: Removed duplicated region for block: B:79:0x0154 */
/* JADX WARNING: Removed duplicated region for block: B:82:0x0162 */
/* JADX WARNING: Removed duplicated region for block: B:85:0x016e */
/* JADX WARNING: Removed duplicated region for block: B:88:0x0179 */
/* JADX WARNING: Removed duplicated region for block: B:91:0x0184 */
/* JADX WARNING: Removed duplicated region for block: B:94:0x018f */
/* JADX WARNING: Removed duplicated region for block: B:97:0x019b */
/* JADX WARNING: Removed duplicated region for block: B:99:0x01a5 */
public static int N0(Map<String, List<String>> map) {
char c2;
List<String> list = map.get("Content-Type");
String str = (list == null || list.isEmpty()) ? null : list.get(0);
if (str != null) {
ArrayList<t.a> arrayList = t.a;
int hashCode = str.hashCode();
char c3 = 2;
if (hashCode != -1007807498) {
if (hashCode != -586683234) {
if (hashCode == 187090231 && str.equals("audio/mp3")) {
c2 = 2;
if (c2 != 0) {
str = "audio/flac";
} else if (c2 == 1) {
str = "audio/wav";
} else if (c2 == 2) {
str = "audio/mpeg";
}
switch (str.hashCode()) {
case -2123537834:
if (str.equals("audio/eac3-joc")) {
c3 = 0;
break;
}
c3 = 65535;
break;
case -1662384011:
if (str.equals("video/mp2p")) {
c3 = 1;
break;
}
c3 = 65535;
break;
case -1662384007:
break;
case -1662095187:
if (str.equals("video/webm")) {
c3 = 3;
break;
}
c3 = 65535;
break;
case -1606874997:
if (str.equals("audio/amr-wb")) {
c3 = 4;
break;
}
c3 = 65535;
break;
case -1487394660:
if (str.equals("image/jpeg")) {
c3 = 5;
break;
}
c3 = 65535;
break;
case -1248337486:
if (str.equals("application/mp4")) {
c3 = 6;
break;
}
c3 = 65535;
break;
case -1004728940:
if (str.equals("text/vtt")) {
c3 = 7;
break;
}
c3 = 65535;
break;
case -387023398:
if (str.equals("audio/x-matroska")) {
c3 = '\b';
break;
}
c3 = 65535;
break;
case -43467528:
if (str.equals("application/webm")) {
c3 = '\t';
break;
}
c3 = 65535;
break;
case 13915911:
if (str.equals("video/x-flv")) {
c3 = '\n';
break;
}
c3 = 65535;
break;
case 187078296:
if (str.equals("audio/ac3")) {
c3 = 11;
break;
}
c3 = 65535;
break;
case 187078297:
if (str.equals("audio/ac4")) {
c3 = '\f';
break;
}
c3 = 65535;
break;
case 187078669:
if (str.equals("audio/amr")) {
c3 = '\r';
break;
}
c3 = 65535;
break;
case 187090232:
if (str.equals("audio/mp4")) {
c3 = 14;
break;
}
c3 = 65535;
break;
case 187091926:
if (str.equals("audio/ogg")) {
c3 = 15;
break;
}
c3 = 65535;
break;
case 187099443:
if (str.equals("audio/wav")) {
c3 = 16;
break;
}
c3 = 65535;
break;
case 1331848029:
if (str.equals("video/mp4")) {
c3 = 17;
break;
}
c3 = 65535;
break;
case 1503095341:
if (str.equals("audio/3gpp")) {
c3 = 18;
break;
}
c3 = 65535;
break;
case 1504578661:
if (str.equals("audio/eac3")) {
c3 = 19;
break;
}
c3 = 65535;
break;
case 1504619009:
if (str.equals("audio/flac")) {
c3 = 20;
break;
}
c3 = 65535;
break;
case 1504831518:
if (str.equals("audio/mpeg")) {
c3 = 21;
break;
}
c3 = 65535;
break;
case 1505118770:
if (str.equals("audio/webm")) {
c3 = 22;
break;
}
c3 = 65535;
break;
case 2039520277:
if (str.equals("video/x-matroska")) {
c3 = 23;
break;
}
c3 = 65535;
break;
default:
c3 = 65535;
break;
}
switch (c3) {
case 0:
case 11:
case 19:
return 0;
case 1:
return 10;
case 2:
return 11;
case 3:
case '\b':
case '\t':
case 22:
case 23:
return 6;
case 4:
case '\r':
case 18:
return 3;
case 5:
return 14;
case 6:
case 14:
case 17:
return 8;
case 7:
return 13;
case '\n':
return 5;
case '\f':
return 1;
case 15:
return 9;
case 16:
return 12;
case 20:
return 4;
case 21:
return 7;
}
}
} else if (str.equals("audio/x-wav")) {
c2 = 1;
if (c2 != 0) {
}
switch (str.hashCode()) {
case -2123537834:
break;
case -1662384011:
break;
case -1662384007:
break;
case -1662095187:
break;
case -1606874997:
break;
case -1487394660:
break;
case -1248337486:
break;
case -1004728940:
break;
case -387023398:
break;
case -43467528:
break;
case 13915911:
break;
case 187078296:
break;
case 187078297:
break;
case 187078669:
break;
case 187090232:
break;
case 187091926:
break;
case 187099443:
break;
case 1331848029:
break;
case 1503095341:
break;
case 1504578661:
break;
case 1504619009:
break;
case 1504831518:
break;
case 1505118770:
break;
case 2039520277:
break;
}
switch (c3) {
}
}
} else if (str.equals("audio/x-flac")) {
c2 = 0;
if (c2 != 0) {
}
switch (str.hashCode()) {
case -2123537834:
break;
case -1662384011:
break;
case -1662384007:
break;
case -1662095187:
break;
case -1606874997:
break;
case -1487394660:
break;
case -1248337486:
break;
case -1004728940:
break;
case -387023398:
break;
case -43467528:
break;
case 13915911:
break;
case 187078296:
break;
case 187078297:
break;
case 187078669:
break;
case 187090232:
break;
case 187091926:
break;
case 187099443:
break;
case 1331848029:
break;
case 1503095341:
break;
case 1504578661:
break;
case 1504619009:
break;
case 1504831518:
break;
case 1505118770:
break;
case 2039520277:
break;
}
switch (c3) {
}
}
c2 = 65535;
if (c2 != 0) {
}
switch (str.hashCode()) {
case -2123537834:
break;
case -1662384011:
break;
case -1662384007:
break;
case -1662095187:
break;
case -1606874997:
break;
case -1487394660:
break;
case -1248337486:
break;
case -1004728940:
break;
case -387023398:
break;
case -43467528:
break;
case 13915911:
break;
case 187078296:
break;
case 187078297:
break;
case 187078669:
break;
case 187090232:
break;
case 187091926:
break;
case 187099443:
break;
case 1331848029:
break;
case 1503095341:
break;
case 1504578661:
break;
case 1504619009:
break;
case 1504831518:
break;
case 1505118770:
break;
case 2039520277:
break;
}
switch (c3) {
}
}
return -1;
}
public static void N1(Spannable spannable, c.i.b.a.h<Object> hVar) {
Object[] spans = spannable.getSpans(0, spannable.length(), Object.class);
for (Object obj : spans) {
if (hVar.apply(obj)) {
spannable.removeSpan(obj);
}
}
}
public static final MediaSource O(MediaType mediaType, String str, String str2) {
m.checkNotNullParameter(mediaType, "mediaType");
m.checkNotNullParameter(str, "progressiveMediaUri");
m.checkNotNullParameter(str2, "featureTag");
Uri parse = Uri.parse(str);
m.checkNotNullExpressionValue(parse, "Uri.parse(progressiveMediaUri)");
return new MediaSource(parse, str2, mediaType);
}
public static int O0(Uri uri) {
String lastPathSegment = uri.getLastPathSegment();
if (lastPathSegment == null) {
return -1;
}
if (lastPathSegment.endsWith(".ac3") || lastPathSegment.endsWith(".ec3")) {
return 0;
}
if (lastPathSegment.endsWith(".ac4")) {
return 1;
}
if (lastPathSegment.endsWith(".adts") || lastPathSegment.endsWith(".aac")) {
return 2;
}
if (lastPathSegment.endsWith(".amr")) {
return 3;
}
if (lastPathSegment.endsWith(".flac")) {
return 4;
}
if (lastPathSegment.endsWith(".flv")) {
return 5;
}
if (lastPathSegment.startsWith(".mk", lastPathSegment.length() - 4) || lastPathSegment.endsWith(".webm")) {
return 6;
}
if (lastPathSegment.endsWith(".mp3")) {
return 7;
}
if (lastPathSegment.endsWith(".mp4") || lastPathSegment.startsWith(".m4", lastPathSegment.length() - 4) || lastPathSegment.startsWith(".mp4", lastPathSegment.length() - 5) || lastPathSegment.startsWith(".cmf", lastPathSegment.length() - 5)) {
return 8;
}
if (lastPathSegment.startsWith(".og", lastPathSegment.length() - 4) || lastPathSegment.endsWith(".opus")) {
return 9;
}
if (lastPathSegment.endsWith(".ps") || lastPathSegment.endsWith(".mpeg") || lastPathSegment.endsWith(".mpg") || lastPathSegment.endsWith(".m2p")) {
return 10;
}
if (lastPathSegment.endsWith(".ts") || lastPathSegment.startsWith(".ts", lastPathSegment.length() - 4)) {
return 11;
}
if (lastPathSegment.endsWith(".wav") || lastPathSegment.endsWith(".wave")) {
return 12;
}
if (lastPathSegment.endsWith(".vtt") || lastPathSegment.endsWith(".webvtt")) {
return 13;
}
return (lastPathSegment.endsWith(".jpg") || lastPathSegment.endsWith(".jpeg")) ? 14 : -1;
}
public static void O1(File file, File file2) throws FileUtils$RenameException {
Objects.requireNonNull(file);
file2.delete();
if (!file.renameTo(file2)) {
Throwable th = null;
if (file2.exists()) {
th = new FileUtils$FileDeleteException(file2.getAbsolutePath());
} else if (!file.getParentFile().exists()) {
th = new FileUtils$ParentDirNotFoundException(file.getAbsolutePath());
} else if (!file.exists()) {
th = new FileNotFoundException(file.getAbsolutePath());
}
StringBuilder R = c.d.b.a.a.R("Unknown error renaming ");
R.append(file.getAbsolutePath());
R.append(" to ");
R.append(file2.getAbsolutePath());
throw new FileUtils$RenameException(R.toString(), th);
}
}
@RecentlyNonNull
public static <T extends Parcelable> T P(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i, @RecentlyNonNull Parcelable.Creator<T> creator) {
int K1 = K1(parcel, i);
int dataPosition = parcel.dataPosition();
if (K1 == 0) {
return null;
}
T createFromParcel = creator.createFromParcel(parcel);
parcel.setDataPosition(dataPosition + K1);
return createFromParcel;
}
public static void P0(String str) {
throw new IllegalArgumentException(c.d.b.a.a.v("Unknown library: ", str));
}
public static final RenderContext P1(Function1<? super RenderContext, Unit> function1, Object... objArr) {
m.checkNotNullParameter(function1, "init");
m.checkNotNullParameter(objArr, "orderedArguments");
RenderContext renderContext = new RenderContext();
function1.invoke(renderContext);
if (!(objArr.length == 0)) {
if (!(!renderContext.a.isEmpty())) {
renderContext.f2137c = k.toList(objArr);
} else {
throw new IllegalArgumentException("must provide named arguments OR formatArgs, not both.");
}
}
return renderContext;
}
@RecentlyNonNull
public static String Q(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i) {
int K1 = K1(parcel, i);
int dataPosition = parcel.dataPosition();
if (K1 == 0) {
return null;
}
String readString = parcel.readString();
parcel.setDataPosition(dataPosition + K1);
return readString;
}
public static boolean Q0(XmlPullParser xmlPullParser, String str) throws XmlPullParserException {
return (xmlPullParser.getEventType() == 3) && xmlPullParser.getName().equals(str);
}
public static /* synthetic */ void Q1(AppPermissionsRequests appPermissionsRequests, Function0 function0, Function0 function02, int i, Object obj) {
int i2 = i & 1;
appPermissionsRequests.requestMicrophone(null, function02);
}
@RecentlyNonNull
public static String[] R(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i) {
int K1 = K1(parcel, i);
int dataPosition = parcel.dataPosition();
if (K1 == 0) {
return null;
}
String[] createStringArray = parcel.createStringArray();
parcel.setDataPosition(dataPosition + K1);
return createStringArray;
}
public static boolean R0(int i, int i2, e eVar) {
return eVar == null ? ((float) n0(i)) >= 2048.0f && n0(i2) >= 2048 : n0(i) >= eVar.a && n0(i2) >= eVar.b;
}
@Nullable
public static f R1(@Nullable f fVar, @Nullable String[] strArr, Map<String, f> map) {
int i = 0;
if (fVar == null) {
if (strArr == null) {
return null;
}
if (strArr.length == 1) {
return map.get(strArr[0]);
}
if (strArr.length > 1) {
f fVar2 = new f();
int length = strArr.length;
while (i < length) {
fVar2.a(map.get(strArr[i]));
i++;
}
return fVar2;
}
} else if (strArr != null && strArr.length == 1) {
fVar.a(map.get(strArr[0]));
return fVar;
} else if (strArr != null && strArr.length > 1) {
int length2 = strArr.length;
while (i < length2) {
fVar.a(map.get(strArr[i]));
i++;
}
}
return fVar;
}
@RecentlyNonNull
public static ArrayList<String> S(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i) {
int K1 = K1(parcel, i);
int dataPosition = parcel.dataPosition();
if (K1 == 0) {
return null;
}
ArrayList<String> createStringArrayList = parcel.createStringArrayList();
parcel.setDataPosition(dataPosition + K1);
return createStringArrayList;
}
public static boolean S0(c.f.j.j.e eVar, e eVar2) {
if (eVar == null) {
return false;
}
eVar.u();
int i = eVar.l;
if (i == 90 || i == 270) {
eVar.u();
int i2 = eVar.o;
eVar.u();
return R0(i2, eVar.n, eVar2);
}
eVar.u();
int i3 = eVar.n;
eVar.u();
return R0(i3, eVar.o, eVar2);
}
public static float S1(int i, float f2, int i2, int i3) {
float f3;
if (f2 == -3.4028235E38f) {
return -3.4028235E38f;
}
if (i == 0) {
f3 = (float) i3;
} else if (i == 1) {
f3 = (float) i2;
} else if (i != 2) {
return -3.4028235E38f;
} else {
return f2;
}
return f2 * f3;
}
@RecentlyNonNull
public static <T> T[] T(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i, @RecentlyNonNull Parcelable.Creator<T> creator) {
int K1 = K1(parcel, i);
int dataPosition = parcel.dataPosition();
if (K1 == 0) {
return null;
}
T[] tArr = (T[]) parcel.createTypedArray(creator);
parcel.setDataPosition(dataPosition + K1);
return tArr;
}
public static final boolean T0(Context context) {
m.checkNotNullParameter(context, "$this$isLtr");
return TextUtilsCompat.getLayoutDirectionFromLocale(Locale.getDefault()) == 0;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARNING: Unknown variable types count: 1 */
public static <TInput, TResult, TException extends Throwable> TResult T1(int i, TInput tinput, c.i.a.b.i.b<TInput, TResult, TException> bVar, c.i.a.b.j.s.a<TInput, TResult> aVar) throws Throwable {
TResult tresult;
if (i < 1) {
return (TResult) bVar.a(tinput);
}
do {
tresult = (TResult) bVar.a(tinput);
TInput tinput2 = tinput;
TResult tresult2 = tresult;
URL url = tresult2.b;
if (url != null) {
W("CctTransportBackend", "Following redirect to: %s", url);
tinput = new d.a(tresult2.b, tinput2.b, tinput2.f602c);
} else {
tinput = null;
}
if (tinput == null) {
break;
}
i--;
} while (i >= 1);
return tresult;
}
@RecentlyNonNull
public static <T> ArrayList<T> U(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i, @RecentlyNonNull Parcelable.Creator<T> creator) {
int K1 = K1(parcel, i);
int dataPosition = parcel.dataPosition();
if (K1 == 0) {
return null;
}
ArrayList<T> createTypedArrayList = parcel.createTypedArrayList(creator);
parcel.setDataPosition(dataPosition + K1);
return createTypedArrayList;
}
public static final boolean U0(VoiceState voiceState) {
m.checkNotNullParameter(voiceState, "$this$isMutedByAnySource");
return voiceState.h() || voiceState.e() || voiceState.l();
}
public static String U1(CacheKey cacheKey) throws UnsupportedEncodingException {
byte[] bytes = cacheKey.b().getBytes(Constants.ENCODING);
try {
MessageDigest instance = MessageDigest.getInstance(Constants.SHA1);
instance.update(bytes, 0, bytes.length);
return Base64.encodeToString(instance.digest(), 11);
} catch (NoSuchAlgorithmException e2) {
throw new RuntimeException(e2);
}
}
public static String V(String str) {
StringBuilder Q = c.d.b.a.a.Q(c.d.b.a.a.b(str, c.d.b.a.a.b(str, 5)), ".", str, ",.", str);
Q.append(" *");
return Q.toString();
}
public static final boolean V0(StageInstance stageInstance) {
m.checkNotNullParameter(stageInstance, "$this$isPublic");
return stageInstance.e() == StageInstancePrivacyLevel.PUBLIC;
}
public static void V1(Drawable drawable, Drawable.Callback callback, e0 e0Var) {
if (drawable != null) {
drawable.setCallback(callback);
if (drawable instanceof d0) {
((d0) drawable).b(e0Var);
}
}
}
public static void W(String str, String str2, Object obj) {
Log.d(C0(str), String.format(str2, obj));
}
public static final boolean W0(VoiceState voiceState) {
m.checkNotNullParameter(voiceState, "$this$isRemoveSignal");
return voiceState.a() == null;
}
public static void W1(MediaFormat mediaFormat, List<byte[]> list) {
for (int i = 0; i < list.size(); i++) {
mediaFormat.setByteBuffer(c.d.b.a.a.f(15, "csd-", i), ByteBuffer.wrap(list.get(i)));
}
}
public static void X(String str, String str2, Object... objArr) {
Log.d(C0(str), String.format(str2, objArr));
}
public static boolean X0(XmlPullParser xmlPullParser, String str) throws XmlPullParserException {
return (xmlPullParser.getEventType() == 2) && xmlPullParser.getName().equals(str);
}
public static void X1(Drawable drawable, c.f.g.e.e eVar) {
if (drawable != null && eVar != null) {
int i = eVar.a;
if (i != -1) {
drawable.setAlpha(i);
}
if (eVar.b) {
drawable.setColorFilter(eVar.f394c);
}
int i2 = eVar.d;
boolean z2 = false;
if (i2 != -1) {
drawable.setDither(i2 != 0);
}
int i3 = eVar.e;
if (i3 != -1) {
if (i3 != 0) {
z2 = true;
}
drawable.setFilterBitmap(z2);
}
}
}
public static boolean Y(File file) {
File[] listFiles;
if (file.isDirectory() && (listFiles = file.listFiles()) != null) {
for (File file2 : listFiles) {
Y(file2);
}
}
return file.delete();
}
@RecentlyNonNull
@TargetApi(20)
public static boolean Y0(@RecentlyNonNull Context context) {
PackageManager packageManager = context.getPackageManager();
if (f258c == null) {
f258c = Boolean.valueOf(packageManager.hasSystemFeature("android.hardware.type.watch"));
}
return f258c.booleanValue();
}
public static <TResult> void Y1(Status status, @Nullable TResult tresult, TaskCompletionSource<TResult> taskCompletionSource) {
if (status.w0()) {
taskCompletionSource.a.t(tresult);
return;
}
taskCompletionSource.a.s(new ApiException(status));
}
/* JADX WARNING: Removed duplicated region for block: B:38:0x009c */
/* JADX WARNING: Removed duplicated region for block: B:44:0x00b2 */
/* JADX WARNING: Removed duplicated region for block: B:51:0x00dd */
/* JADX WARNING: Removed duplicated region for block: B:52:0x00e0 */
/* JADX WARNING: Removed duplicated region for block: B:55:0x00ea */
public static int Z(c.f.j.d.f fVar, e eVar, c.f.j.j.e eVar2, int i) {
float f2;
int max;
float f3;
int i2;
int i3;
int i4;
int i5 = 1;
if (!c.f.j.j.e.q(eVar2)) {
return 1;
}
i(Boolean.valueOf(c.f.j.j.e.q(eVar2)));
if (eVar != null && eVar.b > 0 && eVar.a > 0) {
eVar2.u();
if (eVar2.n != 0) {
eVar2.u();
if (eVar2.o != 0) {
boolean z2 = false;
if (!fVar.c()) {
i2 = 0;
} else {
eVar2.u();
i2 = eVar2.l;
i(Boolean.valueOf(i2 == 0 || i2 == 90 || i2 == 180 || i2 == 270));
}
if (i2 == 90 || i2 == 270) {
z2 = true;
}
if (z2) {
eVar2.u();
i3 = eVar2.o;
} else {
eVar2.u();
i3 = eVar2.n;
}
if (z2) {
eVar2.u();
i4 = eVar2.n;
} else {
eVar2.u();
i4 = eVar2.o;
}
f2 = Math.max(((float) eVar.a) / ((float) i3), ((float) eVar.b) / ((float) i4));
int i6 = c.f.d.e.a.a;
eVar2.u();
int i7 = 2;
if (eVar2.k != c.f.i.b.a) {
if (f2 <= 0.6666667f) {
i5 = 2;
while (true) {
int i8 = i5 * 2;
double d2 = 1.0d / ((double) i8);
if ((d2 * 0.3333333432674408d) + d2 <= ((double) f2)) {
break;
}
i5 = i8;
}
}
} else if (f2 <= 0.6666667f) {
while (true) {
double d3 = (double) i7;
if (((1.0d / (Math.pow(d3, 2.0d) - d3)) * 0.3333333432674408d) + (1.0d / d3) <= ((double) f2)) {
break;
}
i7++;
}
i5 = i7 - 1;
}
eVar2.u();
int i9 = eVar2.o;
eVar2.u();
max = Math.max(i9, eVar2.n);
f3 = eVar == null ? eVar.f438c : (float) i;
while (((float) (max / i5)) > f3) {
eVar2.u();
i5 = eVar2.k == c.f.i.b.a ? i5 * 2 : i5 + 1;
}
return i5;
}
}
}
f2 = 1.0f;
eVar2.u();
int i7 = 2;
if (eVar2.k != c.f.i.b.a) {
}
eVar2.u();
int i9 = eVar2.o;
eVar2.u();
max = Math.max(i9, eVar2.n);
if (eVar == null) {
}
while (((float) (max / i5)) > f3) {
}
return i5;
}
@RecentlyNonNull
@TargetApi(26)
public static boolean Z0(@RecentlyNonNull Context context) {
if (Y0(context)) {
if (Build.VERSION.SDK_INT >= 24) {
if (d == null) {
d = Boolean.valueOf(context.getPackageManager().hasSystemFeature("cn.google"));
}
if (!d.booleanValue() || c.i.a.f.e.o.f.q0()) {
}
}
return true;
}
return false;
}
public static boolean Z1(Object obj, Collection<String> collection, Collection<String> collection2) {
if (collection == null && collection2 == null) {
return false;
}
return collection2 == null ? collection.contains(obj) : collection == null ? !collection2.contains(obj) : !collection2.contains(obj) || collection.contains(obj);
}
public static float a(float f2) {
return f2 <= 0.04045f ? f2 / 12.92f : (float) Math.pow((double) ((f2 + 0.055f) / 1.055f), 2.4000000953674316d);
}
public static void a0(File file) throws IOException {
if (file.isDirectory()) {
File[] listFiles = file.listFiles();
if (listFiles != null) {
for (File file2 : listFiles) {
a0(file2);
}
} else {
return;
}
}
if (!file.delete() && file.exists()) {
throw new IOException("could not delete: " + file);
}
}
public static final void a1(String str, String str2) {
m.checkNotNullParameter(str, "tag");
m.checkNotNullParameter(str2, NotificationCompat.CATEGORY_MESSAGE);
Logger.d$default(LoggingProvider.INSTANCE.get(), str, str2, null, 4, null);
}
public static long a2(InputStream inputStream, long j) throws IOException {
i(Boolean.valueOf(j >= 0));
long j2 = j;
while (j2 > 0) {
long skip = inputStream.skip(j2);
if (skip <= 0) {
if (inputStream.read() == -1) {
return j - j2;
}
skip = 1;
}
j2 -= skip;
}
return j;
}
public static float b(float f2) {
return f2 <= 0.0031308f ? f2 * 12.92f : (float) ((Math.pow((double) f2, 0.4166666567325592d) * 1.0549999475479126d) - 0.054999999701976776d);
}
public static void b0(String str, String str2, Throwable th) {
Log.e(C0(str), str2, th);
}
public static final void b1(String str, String str2, Throwable th) {
m.checkNotNullParameter(str, "tag");
m.checkNotNullParameter(str2, NotificationCompat.CATEGORY_MESSAGE);
Logger.e$default(LoggingProvider.INSTANCE.get(), str, str2, th, null, 8, null);
}
public static void b2(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i) {
parcel.setDataPosition(parcel.dataPosition() + K1(parcel, i));
}
public static void c(Spannable spannable, Object obj, int i, int i2, int i3) {
Object[] spans = spannable.getSpans(i, i2, obj.getClass());
for (Object obj2 : spans) {
if (spannable.getSpanStart(obj2) == i && spannable.getSpanEnd(obj2) == i2 && spannable.getSpanFlags(obj2) == i3) {
spannable.removeSpan(obj2);
}
}
spannable.setSpan(obj, i, i2, i3);
}
public static void c0() {
if (c.i.a.c.f3.e0.a >= 18) {
Trace.endSection();
}
}
public static final void c1(String str, String str2) {
m.checkNotNullParameter(str, "tag");
m.checkNotNullParameter(str2, NotificationCompat.CATEGORY_MESSAGE);
Logger.i$default(LoggingProvider.INSTANCE.get(), str, str2, null, 4, null);
}
public static final <P extends Parcelable> Bundle c2(P p) {
m.checkNotNullParameter(p, "$this$toBundle");
Bundle bundle = new Bundle();
bundle.putParcelable("intent_args_key", p);
return bundle;
}
public static int d(int i, int i2, int i3) {
return Math.min(Math.max(0, i3 - i), i2);
}
public static synchronized void d0() {
synchronized (d.class) {
if (!a) {
c.f.m.n.a.c("native-imagetranscoder");
a = true;
}
}
}
public static final void d1(String str, String str2) {
m.checkNotNullParameter(str, "tag");
m.checkNotNullParameter(str2, NotificationCompat.CATEGORY_MESSAGE);
Logger.v$default(LoggingProvider.INSTANCE.get(), str, str2, null, 4, null);
}
public static String d2(@ColorInt int i) {
return c.i.a.c.f3.e0.k("rgba(%d,%d,%d,%.3f)", Integer.valueOf(Color.red(i)), Integer.valueOf(Color.green(i)), Integer.valueOf(Color.blue(i)), Double.valueOf(((double) Color.alpha(i)) / 255.0d));
}
public static byte[] e(String str) {
try {
return str.getBytes("ASCII");
} catch (UnsupportedEncodingException e2) {
throw new RuntimeException("ASCII not found!", e2);
}
}
public static void e0(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i) {
if (parcel.dataPosition() != i) {
throw new SafeParcelReader$ParseException(c.d.b.a.a.f(37, "Overread allowed size end=", i), parcel);
}
}
public static final void e1(String str, String str2) {
m.checkNotNullParameter(str, "tag");
m.checkNotNullParameter(str2, NotificationCompat.CATEGORY_MESSAGE);
Logger.w$default(LoggingProvider.INSTANCE.get(), str, str2, null, 4, null);
}
public static final <P extends Parcelable> Intent e2(P p) {
m.checkNotNullParameter(p, "$this$toIntent");
Intent putExtra = new Intent().putExtra("intent_args_key", p);
m.checkNotNullExpressionValue(putExtra, "Intent().putExtra(INTENT_ARGS, this)");
return putExtra;
}
public static void f(String str) {
if (c.i.a.c.f3.e0.a >= 18) {
Trace.beginSection(str);
}
}
public static boolean f0(Object obj, Object obj2) {
return obj == obj2 || (obj != null && obj.equals(obj2));
}
public static ParameterizedType f1(Type type) {
if (type instanceof ParameterizedType) {
return (ParameterizedType) type;
}
if (type instanceof WildcardType) {
WildcardType wildcardType = (WildcardType) type;
if (wildcardType.getLowerBounds().length != 0) {
return null;
}
Type[] upperBounds = wildcardType.getUpperBounds();
if (upperBounds.length == 1) {
return f1(upperBounds[0]);
}
}
return null;
}
public static i f2(Object obj) {
return new i(obj.getClass().getSimpleName(), null);
}
public static List<byte[]> g(byte[] bArr) {
ArrayList arrayList = new ArrayList(3);
arrayList.add(bArr);
arrayList.add(h((((long) (((bArr[11] & 255) << 8) | (bArr[10] & 255))) * 1000000000) / 48000));
arrayList.add(h(80000000));
return arrayList;
}
@RecentlyNonNull
public static boolean g0(@Nullable Object obj, @Nullable Object obj2) {
if (obj != obj2) {
return obj != null && obj.equals(obj2);
}
return true;
}
public static TypeVariable<?> g1(Type type) {
if (type instanceof TypeVariable) {
return (TypeVariable) type;
}
if (type instanceof WildcardType) {
WildcardType wildcardType = (WildcardType) type;
if (wildcardType.getLowerBounds().length != 0) {
return null;
}
Type[] upperBounds = wildcardType.getUpperBounds();
if (upperBounds.length == 1) {
return g1(upperBounds[0]);
}
}
return null;
}
public static void g2(Collection<? extends Node> collection, c.a.t.b.c.a aVar) {
for (Node node : collection) {
h2(node, aVar);
}
}
public static byte[] h(long j) {
return ByteBuffer.allocate(8).order(ByteOrder.nativeOrder()).putLong(j).array();
}
public static int h0(float f2, int i, int i2) {
if (i == i2) {
return i;
}
float f3 = ((float) ((i >> 24) & 255)) / 255.0f;
float a2 = a(((float) ((i >> 16) & 255)) / 255.0f);
float a3 = a(((float) ((i >> 8) & 255)) / 255.0f);
float a4 = a(((float) (i & 255)) / 255.0f);
float a5 = a(((float) ((i2 >> 16) & 255)) / 255.0f);
float a6 = a(((float) ((i2 >> 8) & 255)) / 255.0f);
float a7 = a(((float) (i2 & 255)) / 255.0f);
float a8 = c.d.b.a.a.a(((float) ((i2 >> 24) & 255)) / 255.0f, f3, f2, f3);
float a9 = c.d.b.a.a.a(a5, a2, f2, a2);
float a10 = c.d.b.a.a.a(a6, a3, f2, a3);
float a11 = c.d.b.a.a.a(a7, a4, f2, a4);
int round = Math.round(b(a9) * 255.0f) << 16;
return Math.round(b(a11) * 255.0f) | round | (Math.round(a8 * 255.0f) << 24) | (Math.round(b(a10) * 255.0f) << 8);
}
public static void h1(MediaFormat mediaFormat, String str, int i) {
if (i != -1) {
mediaFormat.setInteger(str, i);
}
}
public static void h2(Node node, c.a.t.b.c.a aVar) {
if (node.hasChildren()) {
for (Node node2 : node.getChildren()) {
h2(node2, aVar);
}
}
aVar.processNode(node);
}
public static void i(Boolean bool) {
if (bool != null && !bool.booleanValue()) {
throw new IllegalArgumentException();
}
}
public static String[] i0(FileChannel fileChannel) throws IOException {
long j;
long j2;
long j3;
long j4;
long j5;
long j6;
long j7;
long j8;
long j9;
long j10;
long j11;
long j12;
long j13;
long j14;
int i = 8;
ByteBuffer allocate = ByteBuffer.allocate(8);
allocate.order(ByteOrder.LITTLE_ENDIAN);
if (F0(fileChannel, allocate, 0) == 1179403647) {
A1(fileChannel, allocate, 1, 4);
boolean z2 = ((short) (allocate.get() & 255)) == 1;
A1(fileChannel, allocate, 1, 5);
if (((short) (allocate.get() & 255)) == 2) {
allocate.order(ByteOrder.BIG_ENDIAN);
}
if (z2) {
j = F0(fileChannel, allocate, 28);
} else {
A1(fileChannel, allocate, 8, 32);
j = allocate.getLong();
}
if (z2) {
A1(fileChannel, allocate, 2, 44);
j2 = (long) (allocate.getShort() & 65535);
} else {
A1(fileChannel, allocate, 2, 56);
j2 = (long) (allocate.getShort() & 65535);
}
A1(fileChannel, allocate, 2, z2 ? 42 : 54);
int i2 = allocate.getShort() & 65535;
if (j2 == 65535) {
if (z2) {
j14 = F0(fileChannel, allocate, 32);
} else {
A1(fileChannel, allocate, 8, 40);
j14 = allocate.getLong();
}
j2 = z2 ? F0(fileChannel, allocate, j14 + 28) : F0(fileChannel, allocate, j14 + 44);
}
long j15 = j;
long j16 = 0;
while (true) {
if (j16 >= j2) {
j3 = 0;
break;
}
if ((z2 ? F0(fileChannel, allocate, j15 + 0) : F0(fileChannel, allocate, j15 + 0)) != 2) {
j15 += (long) i2;
j16++;
} else if (z2) {
j3 = F0(fileChannel, allocate, j15 + 4);
} else {
A1(fileChannel, allocate, 8, j15 + 8);
j3 = allocate.getLong();
}
}
long j17 = 0;
if (j3 != 0) {
long j18 = j3;
long j19 = 0;
int i3 = 0;
while (true) {
long j20 = j18 + j17;
if (z2) {
j4 = F0(fileChannel, allocate, j20);
} else {
A1(fileChannel, allocate, i, j20);
j4 = allocate.getLong();
}
if (j4 == 1) {
j5 = j3;
if (i3 != Integer.MAX_VALUE) {
i3++;
} else {
throw new h("malformed DT_NEEDED section");
}
} else {
j5 = j3;
if (j4 == 5) {
if (z2) {
j13 = F0(fileChannel, allocate, j18 + 4);
} else {
A1(fileChannel, allocate, 8, j18 + 8);
j13 = allocate.getLong();
}
j19 = j13;
}
}
long j21 = 16;
j18 += z2 ? 8 : 16;
long j22 = 0;
if (j4 != 0) {
j17 = 0;
j3 = j5;
i = 8;
} else if (j19 != 0) {
int i4 = 0;
while (true) {
if (((long) i4) >= j2) {
j6 = 0;
break;
}
if ((z2 ? F0(fileChannel, allocate, j + j22) : F0(fileChannel, allocate, j + j22)) == 1) {
if (z2) {
j10 = F0(fileChannel, allocate, j + 8);
} else {
A1(fileChannel, allocate, 8, j + j21);
j10 = allocate.getLong();
}
if (z2) {
j9 = j2;
j11 = F0(fileChannel, allocate, j + 20);
} else {
j9 = j2;
A1(fileChannel, allocate, 8, j + 40);
j11 = allocate.getLong();
}
if (j10 <= j19 && j19 < j11 + j10) {
if (z2) {
j12 = F0(fileChannel, allocate, j + 4);
} else {
A1(fileChannel, allocate, 8, j + 8);
j12 = allocate.getLong();
}
j6 = j12 + (j19 - j10);
}
} else {
j9 = j2;
}
j += (long) i2;
i4++;
j2 = j9;
j21 = 16;
j22 = 0;
}
long j23 = 0;
if (j6 != 0) {
String[] strArr = new String[i3];
int i5 = 0;
while (true) {
long j24 = j5 + j23;
if (z2) {
j7 = F0(fileChannel, allocate, j24);
} else {
A1(fileChannel, allocate, 8, j24);
j7 = allocate.getLong();
}
if (j7 == 1) {
if (z2) {
j8 = F0(fileChannel, allocate, j5 + 4);
} else {
A1(fileChannel, allocate, 8, j5 + 8);
j8 = allocate.getLong();
}
long j25 = j8 + j6;
StringBuilder sb = new StringBuilder();
while (true) {
long j26 = j25 + 1;
A1(fileChannel, allocate, 1, j25);
short s2 = (short) (allocate.get() & 255);
if (s2 == 0) {
break;
}
sb.append((char) s2);
j25 = j26;
}
strArr[i5] = sb.toString();
if (i5 != Integer.MAX_VALUE) {
i5++;
} else {
throw new h("malformed DT_NEEDED section");
}
}
j5 += z2 ? 8 : 16;
if (j7 != 0) {
j23 = 0;
} else if (i5 == i3) {
return strArr;
} else {
throw new h("malformed DT_NEEDED section");
}
}
} else {
throw new h("did not find file offset of DT_STRTAB table");
}
} else {
throw new h("Dynamic section string-table not found");
}
}
} else {
throw new h("ELF file does not contain dynamic linking information");
}
} else {
throw new h("file is not ELF");
}
}
public static String i1(String str, String str2) {
int length = str.length() - str2.length();
if (length < 0 || length > 1) {
throw new IllegalArgumentException("Invalid input received");
}
StringBuilder sb = new StringBuilder(str2.length() + str.length());
for (int i = 0; i < str.length(); i++) {
sb.append(str.charAt(i));
if (str2.length() > i) {
sb.append(str2.charAt(i));
}
}
return sb.toString();
}
public static void i2(Node node, c.a.t.b.c.a aVar) {
aVar.processNode(node);
if (node.hasChildren()) {
for (Node node2 : node.getChildren()) {
i2(node2, aVar);
}
}
}
@Pure
public static void j(boolean z2) {
if (!z2) {
throw new IllegalArgumentException();
}
}
public static String j0(String str, Object... objArr) {
int indexOf;
String valueOf = String.valueOf(str);
StringBuilder sb = new StringBuilder((objArr.length * 16) + valueOf.length());
int i = 0;
int i2 = 0;
while (i < objArr.length && (indexOf = valueOf.indexOf("%s", i2)) != -1) {
sb.append(valueOf.substring(i2, indexOf));
sb.append(objArr[i]);
i2 = indexOf + 2;
i++;
}
sb.append(valueOf.substring(i2));
if (i < objArr.length) {
sb.append(" [");
sb.append(objArr[i]);
for (int i3 = i + 1; i3 < objArr.length; i3++) {
sb.append(", ");
sb.append(objArr[i3]);
}
sb.append(']');
}
return sb.toString();
}
public static void j1(File file) throws FileUtils$CreateDirectoryException {
if (file.exists()) {
if (!file.isDirectory()) {
if (!file.delete()) {
throw new FileUtils$CreateDirectoryException(file.getAbsolutePath(), new FileUtils$FileDeleteException(file.getAbsolutePath()));
}
} else {
return;
}
}
if (!file.mkdirs() && !file.isDirectory()) {
throw new FileUtils$CreateDirectoryException(file.getAbsolutePath());
}
}
/* JADX INFO: finally extract failed */
/* JADX WARNING: Code restructure failed: missing block: B:142:0x024a, code lost:
if (r15 != false) goto L_0x0266;
*/
/* JADX WARNING: Code restructure failed: missing block: B:156:0x0264, code lost:
if (r16 != false) goto L_0x0266;
*/
public static c.f.g.f.a j2(c.f.g.f.a aVar, Context context, AttributeSet attributeSet) {
int i;
int i2;
boolean z2;
boolean z3;
boolean z4;
boolean z5;
boolean z6;
boolean z7;
int i3;
boolean z8;
int i4;
boolean z9;
boolean z10;
Context context2 = context;
int i5 = 1;
if (attributeSet != null) {
TypedArray obtainStyledAttributes = context2.obtainStyledAttributes(attributeSet, R.a.GenericDraweeHierarchy);
try {
int indexCount = obtainStyledAttributes.getIndexCount();
int i6 = 0;
int i7 = 0;
i = 0;
boolean z11 = true;
boolean z12 = true;
boolean z13 = true;
boolean z14 = true;
boolean z15 = true;
boolean z16 = true;
boolean z17 = true;
boolean z18 = true;
while (i6 < indexCount) {
int index = obtainStyledAttributes.getIndex(i6);
if (index == R.a.GenericDraweeHierarchy_actualImageScaleType) {
aVar.n = z0(obtainStyledAttributes, index);
} else if (index == R.a.GenericDraweeHierarchy_placeholderImage) {
aVar.f = t0(context2, obtainStyledAttributes, index);
} else {
if (index == R.a.GenericDraweeHierarchy_pressedStateOverlayImage) {
Drawable t0 = t0(context2, obtainStyledAttributes, index);
if (t0 == null) {
aVar.q = null;
} else {
StateListDrawable stateListDrawable = new StateListDrawable();
i3 = indexCount;
int[] iArr = new int[i5];
iArr[0] = 16842919;
stateListDrawable.addState(iArr, t0);
aVar.q = stateListDrawable;
}
} else {
i3 = indexCount;
if (index == R.a.GenericDraweeHierarchy_progressBarImage) {
aVar.l = t0(context2, obtainStyledAttributes, index);
} else if (index == R.a.GenericDraweeHierarchy_fadeDuration) {
aVar.d = obtainStyledAttributes.getInt(index, 0);
} else if (index == R.a.GenericDraweeHierarchy_viewAspectRatio) {
aVar.e = obtainStyledAttributes.getFloat(index, 0.0f);
} else if (index == R.a.GenericDraweeHierarchy_placeholderImageScaleType) {
aVar.g = z0(obtainStyledAttributes, index);
} else if (index == R.a.GenericDraweeHierarchy_retryImage) {
aVar.h = t0(context2, obtainStyledAttributes, index);
} else if (index == R.a.GenericDraweeHierarchy_retryImageScaleType) {
aVar.i = z0(obtainStyledAttributes, index);
} else if (index == R.a.GenericDraweeHierarchy_failureImage) {
aVar.j = t0(context2, obtainStyledAttributes, index);
} else if (index == R.a.GenericDraweeHierarchy_failureImageScaleType) {
aVar.k = z0(obtainStyledAttributes, index);
} else if (index == R.a.GenericDraweeHierarchy_progressBarImageScaleType) {
aVar.m = z0(obtainStyledAttributes, index);
} else {
if (index == R.a.GenericDraweeHierarchy_progressBarAutoRotateInterval) {
i = obtainStyledAttributes.getInteger(index, i);
} else if (index == R.a.GenericDraweeHierarchy_backgroundImage) {
aVar.o = t0(context2, obtainStyledAttributes, index);
} else if (index == R.a.GenericDraweeHierarchy_overlayImage) {
aVar.b(t0(context2, obtainStyledAttributes, index));
} else if (index == R.a.GenericDraweeHierarchy_roundAsCircle) {
if (aVar.r == null) {
aVar.r = new c();
}
aVar.r.b = obtainStyledAttributes.getBoolean(index, false);
} else if (index == R.a.GenericDraweeHierarchy_roundedCornerRadius) {
i7 = obtainStyledAttributes.getDimensionPixelSize(index, i7);
} else if (index == R.a.GenericDraweeHierarchy_roundTopLeft) {
z11 = obtainStyledAttributes.getBoolean(index, z11);
} else if (index == R.a.GenericDraweeHierarchy_roundTopRight) {
z14 = obtainStyledAttributes.getBoolean(index, z14);
} else {
if (index == R.a.GenericDraweeHierarchy_roundBottomLeft) {
z9 = obtainStyledAttributes.getBoolean(index, z18);
} else {
z9 = z18;
if (index == R.a.GenericDraweeHierarchy_roundBottomRight) {
z15 = obtainStyledAttributes.getBoolean(index, z15);
} else if (index == R.a.GenericDraweeHierarchy_roundTopStart) {
z12 = obtainStyledAttributes.getBoolean(index, z12);
} else if (index == R.a.GenericDraweeHierarchy_roundTopEnd) {
z13 = obtainStyledAttributes.getBoolean(index, z13);
} else {
if (index == R.a.GenericDraweeHierarchy_roundBottomStart) {
z8 = obtainStyledAttributes.getBoolean(index, z17);
} else {
z8 = z17;
if (index == R.a.GenericDraweeHierarchy_roundBottomEnd) {
z16 = obtainStyledAttributes.getBoolean(index, z16);
} else if (index == R.a.GenericDraweeHierarchy_roundWithOverlayColor) {
if (aVar.r == null) {
aVar.r = new c();
}
aVar.r.b(obtainStyledAttributes.getColor(index, 0));
} else {
if (index == R.a.GenericDraweeHierarchy_roundingBorderWidth) {
if (aVar.r == null) {
aVar.r = new c();
}
c cVar = aVar.r;
float dimensionPixelSize = (float) obtainStyledAttributes.getDimensionPixelSize(index, 0);
Objects.requireNonNull(cVar);
if (dimensionPixelSize >= 0.0f) {
i4 = i7;
z10 = true;
} else {
i4 = i7;
z10 = false;
}
k(z10, "the border width cannot be < 0");
cVar.e = dimensionPixelSize;
} else {
i4 = i7;
if (index == R.a.GenericDraweeHierarchy_roundingBorderColor) {
if (aVar.r == null) {
aVar.r = new c();
}
aVar.r.f = obtainStyledAttributes.getColor(index, 0);
} else if (index == R.a.GenericDraweeHierarchy_roundingBorderPadding) {
if (aVar.r == null) {
aVar.r = new c();
}
c cVar2 = aVar.r;
float dimensionPixelSize2 = (float) obtainStyledAttributes.getDimensionPixelSize(index, 0);
Objects.requireNonNull(cVar2);
k(dimensionPixelSize2 >= 0.0f, "the padding cannot be < 0");
cVar2.g = dimensionPixelSize2;
}
}
i7 = i4;
z18 = z9;
i6++;
context2 = context;
z17 = z8;
i5 = 1;
indexCount = i3;
}
}
i4 = i7;
i7 = i4;
z18 = z9;
i6++;
context2 = context;
z17 = z8;
i5 = 1;
indexCount = i3;
}
}
i4 = i7;
z8 = z17;
i7 = i4;
z18 = z9;
i6++;
context2 = context;
z17 = z8;
i5 = 1;
indexCount = i3;
}
z8 = z17;
i6++;
context2 = context;
z17 = z8;
i5 = 1;
indexCount = i3;
}
}
z8 = z17;
z9 = z18;
i4 = i7;
i7 = i4;
z18 = z9;
i6++;
context2 = context;
z17 = z8;
i5 = 1;
indexCount = i3;
}
i3 = indexCount;
z8 = z17;
z9 = z18;
i4 = i7;
i7 = i4;
z18 = z9;
i6++;
context2 = context;
z17 = z8;
i5 = 1;
indexCount = i3;
}
obtainStyledAttributes.recycle();
if (context.getResources().getConfiguration().getLayoutDirection() == 1) {
z7 = z11 && z13;
z6 = z14 && z12;
z3 = z15 && z17;
if (z18) {
}
z2 = false;
i2 = i7;
z4 = z7;
z5 = z6;
} else {
z7 = z11 && z12;
z6 = z14 && z13;
z3 = z15 && z16;
if (z18) {
}
z2 = false;
i2 = i7;
z4 = z7;
z5 = z6;
}
z2 = true;
i2 = i7;
z4 = z7;
z5 = z6;
} catch (Throwable th) {
obtainStyledAttributes.recycle();
context.getResources().getConfiguration().getLayoutDirection();
throw th;
}
} else {
z5 = true;
z4 = true;
z3 = true;
z2 = true;
i2 = 0;
i = 0;
}
if (aVar.l != null && i > 0) {
aVar.l = new c.f.g.e.c(aVar.l, i);
}
if (i2 > 0) {
if (aVar.r == null) {
aVar.r = new c();
}
c cVar3 = aVar.r;
float f2 = z4 ? (float) i2 : 0.0f;
float f3 = z5 ? (float) i2 : 0.0f;
float f4 = z3 ? (float) i2 : 0.0f;
float f5 = z2 ? (float) i2 : 0.0f;
if (cVar3.f410c == null) {
cVar3.f410c = new float[8];
}
float[] fArr = cVar3.f410c;
fArr[1] = f2;
fArr[0] = f2;
fArr[3] = f3;
fArr[2] = f3;
fArr[5] = f4;
fArr[4] = f4;
fArr[7] = f5;
fArr[6] = f5;
}
return aVar;
}
public static void k(boolean z2, Object obj) {
if (!z2) {
throw new IllegalArgumentException(String.valueOf(obj));
}
}
@NonNull
public static ApiException k0(@NonNull Status status) {
return status.q != null ? new ResolvableApiException(status) : new ApiException(status);
}
public static int k1(int i, int i2) {
if (i2 == 255) {
return i;
}
if (i2 == 0) {
return i & ViewCompat.MEASURED_SIZE_MASK;
}
int i3 = i2 + (i2 >> 7);
return (i & ViewCompat.MEASURED_SIZE_MASK) | ((((i >>> 24) * i3) >> 8) << 24);
}
@RecentlyNonNull
public static int k2(@RecentlyNonNull Parcel parcel) {
int readInt = parcel.readInt();
int K1 = K1(parcel, readInt);
int dataPosition = parcel.dataPosition();
if ((65535 & readInt) != 20293) {
String valueOf = String.valueOf(Integer.toHexString(readInt));
throw new SafeParcelReader$ParseException(valueOf.length() != 0 ? "Expected object header. Got 0x".concat(valueOf) : new String("Expected object header. Got 0x"), parcel);
}
int i = K1 + dataPosition;
if (i >= dataPosition && i <= parcel.dataSize()) {
return i;
}
throw new SafeParcelReader$ParseException(c.d.b.a.a.g(54, "Size read is invalid start=", dataPosition, " end=", i), parcel);
}
public static void l(@RecentlyNonNull boolean z2) {
if (!z2) {
throw new IllegalArgumentException();
}
}
/* JADX WARNING: Code restructure failed: missing block: B:19:0x0051, code lost:
r1 = move-exception;
*/
/* JADX WARNING: Code restructure failed: missing block: B:21:?, code lost:
r0.close();
*/
/* JADX WARNING: Code restructure failed: missing block: B:22:0x0056, code lost:
r0 = move-exception;
*/
/* JADX WARNING: Code restructure failed: missing block: B:23:0x0057, code lost:
r3.addSuppressed(r0);
*/
/* JADX WARNING: Code restructure failed: missing block: B:24:0x005a, code lost:
throw r1;
*/
public static void l0(File file) throws IOException {
if (file.isDirectory()) {
File[] listFiles = file.listFiles();
if (listFiles != null) {
for (File file2 : listFiles) {
l0(file2);
}
return;
}
throw new IOException("cannot list directory " + file);
} else if (!file.getPath().endsWith("_lock")) {
RandomAccessFile randomAccessFile = new RandomAccessFile(file, "r");
randomAccessFile.getFD().sync();
randomAccessFile.close();
}
}
public static final Integer l1(JsonReader jsonReader) {
m.checkNotNullParameter(jsonReader, "$this$nextIntOrNull");
if (jsonReader.N() != JsonToken.NULL) {
return Integer.valueOf(jsonReader.y());
}
jsonReader.H();
return null;
}
public static boolean l2(int i, x xVar, boolean z2) throws ParserException {
if (xVar.a() < 7) {
if (z2) {
return false;
}
throw c.d.b.a.a.s0(29, "too short header: ", xVar.a(), null);
} else if (xVar.t() != i) {
if (z2) {
return false;
}
String valueOf = String.valueOf(Integer.toHexString(i));
throw ParserException.a(valueOf.length() != 0 ? "expected header type ".concat(valueOf) : new String("expected header type "), null);
} else if (xVar.t() == 118 && xVar.t() == 111 && xVar.t() == 114 && xVar.t() == 98 && xVar.t() == 105 && xVar.t() == 115) {
return true;
} else {
if (z2) {
return false;
}
throw ParserException.a("expected characters 'vorbis'", null);
}
}
@Pure
public static void m(boolean z2, Object obj) {
if (!z2) {
throw new IllegalArgumentException(String.valueOf(obj));
}
}
public static int m0(InputStream inputStream) throws IOException {
return ((((byte) inputStream.read()) << 8) & 65280) | (((byte) inputStream.read()) & 255);
}
@Nullable
public static <T> List<c.c.a.c0.a<T>> m1(c.c.a.a0.i0.c cVar, c.c.a.d dVar, h0<T> h0Var) throws IOException {
return r.a(cVar, dVar, 1.0f, h0Var);
}
public static void m2(File file, c.f.d.c.a aVar) {
aVar.b(file);
File[] listFiles = file.listFiles();
if (listFiles != null) {
for (File file2 : listFiles) {
if (file2.isDirectory()) {
m2(file2, aVar);
} else {
aVar.a(file2);
}
}
}
aVar.c(file);
}
public static void n(@RecentlyNonNull boolean z2, @RecentlyNonNull String str, @RecentlyNonNull Object... objArr) {
if (!z2) {
throw new IllegalArgumentException(String.format(str, objArr));
}
}
public static int n0(int i) {
return (int) (((float) i) * 1.3333334f);
}
public static c.c.a.y.k.a n1(c.c.a.a0.i0.c cVar, c.c.a.d dVar) throws IOException {
return new c.c.a.y.k.a(m1(cVar, dVar, f.a));
}
public static void n2(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i, @RecentlyNonNull Bundle bundle, @RecentlyNonNull boolean z2) {
if (bundle != null) {
int v2 = v2(parcel, i);
parcel.writeBundle(bundle);
A2(parcel, v2);
} else if (z2) {
y2(parcel, i, 0);
}
}
public static void o(@RecentlyNonNull boolean z2, @RecentlyNonNull Object obj) {
if (!z2) {
throw new IllegalArgumentException(String.valueOf(obj));
}
}
public static p o0(Drawable drawable) {
if (drawable == null) {
return null;
}
if (drawable instanceof p) {
return (p) drawable;
}
if (drawable instanceof c.f.g.e.d) {
return o0(((c.f.g.e.d) drawable).l());
}
if (drawable instanceof c.f.g.e.b) {
c.f.g.e.b bVar = (c.f.g.e.b) drawable;
int length = bVar.k.length;
for (int i = 0; i < length; i++) {
p o0 = o0(bVar.a(i));
if (o0 != null) {
return o0;
}
}
}
return null;
}
public static c.c.a.y.k.b o1(c.c.a.a0.i0.c cVar, c.c.a.d dVar) throws IOException {
return p1(cVar, dVar, true);
}
public static void o2(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i, @RecentlyNonNull byte[] bArr, @RecentlyNonNull boolean z2) {
if (bArr != null) {
int v2 = v2(parcel, i);
parcel.writeByteArray(bArr);
A2(parcel, v2);
} else if (z2) {
y2(parcel, i, 0);
}
}
public static void p(int i, int i2, int i3, int i4, int i5) {
boolean z2 = true;
i(Boolean.valueOf(i4 >= 0));
i(Boolean.valueOf(i >= 0));
i(Boolean.valueOf(i3 >= 0));
i(Boolean.valueOf(i + i4 <= i5));
if (i3 + i4 > i2) {
z2 = false;
}
i(Boolean.valueOf(z2));
}
public static Object p0(Object obj) {
return new a(obj.getClass(), Array.getLength(obj), obj);
}
public static c.c.a.y.k.b p1(c.c.a.a0.i0.c cVar, c.c.a.d dVar, boolean z2) throws IOException {
return new c.c.a.y.k.b(r.a(cVar, dVar, z2 ? g.c() : 1.0f, i.a));
}
public static void p2(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i, @RecentlyNonNull IBinder iBinder, @RecentlyNonNull boolean z2) {
if (iBinder != null) {
int v2 = v2(parcel, i);
parcel.writeStrongBinder(iBinder);
A2(parcel, v2);
} else if (z2) {
y2(parcel, i, 0);
}
}
@Pure
public static void q(boolean z2, @Nullable String str) throws ParserException {
if (!z2) {
throw ParserException.a(str, null);
}
}
@Nullable
public static String q0(XmlPullParser xmlPullParser, String str) {
int attributeCount = xmlPullParser.getAttributeCount();
for (int i = 0; i < attributeCount; i++) {
if (xmlPullParser.getAttributeName(i).equals(str)) {
return xmlPullParser.getAttributeValue(i);
}
}
return null;
}
public static c.c.a.y.k.d q1(c.c.a.a0.i0.c cVar, c.c.a.d dVar) throws IOException {
return new c.c.a.y.k.d(m1(cVar, dVar, o.a));
}
public static void q2(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i, @RecentlyNonNull Parcelable parcelable, @RecentlyNonNull int i2, @RecentlyNonNull boolean z2) {
if (parcelable != null) {
int v2 = v2(parcel, i);
parcelable.writeToParcel(parcel, i2);
A2(parcel, v2);
} else if (z2) {
y2(parcel, i, 0);
}
}
public static boolean r(c.i.a.c.x2.i iVar) throws IOException {
x xVar = new x(8);
if (c.i.a.c.x2.l0.d.a(iVar, xVar).a != 1380533830) {
return false;
}
iVar.o(xVar.a, 0, 4);
xVar.E(0);
int f2 = xVar.f();
if (f2 == 1463899717) {
return true;
}
StringBuilder sb = new StringBuilder(34);
sb.append("Unsupported form type: ");
sb.append(f2);
Log.e("WavHeaderReader", sb.toString());
return false;
}
public static int r0(int i) {
if (i == 3) {
return BaseTransientBottomBar.ANIMATION_FADE_DURATION;
}
if (i != 6) {
return i != 8 ? 0 : 270;
}
return 90;
}
/* JADX WARNING: Removed duplicated region for block: B:58:0x01a5 */
/* JADX WARNING: Removed duplicated region for block: B:66:0x01bc A[SYNTHETIC] */
@Nullable
public static ArrayList<h.a> r1(x xVar) {
int i;
ArrayList<h.a> arrayList;
ArrayList<h.a> arrayList2;
h.a aVar;
x xVar2 = xVar;
if (xVar.t() != 0) {
return null;
}
xVar2.F(7);
int f2 = xVar.f();
if (f2 == 1684433976) {
x xVar3 = new x();
Inflater inflater = new Inflater(true);
try {
if (!c.i.a.c.f3.e0.x(xVar2, xVar3, inflater)) {
return null;
}
inflater.end();
xVar2 = xVar3;
} finally {
inflater.end();
}
} else if (f2 != 1918990112) {
return null;
}
ArrayList<h.a> arrayList3 = new ArrayList<>();
int i2 = xVar2.b;
int i3 = xVar2.f793c;
while (i2 < i3) {
int f3 = xVar2.f() + i2;
if (f3 > i2 && f3 <= i3) {
if (xVar2.f() == 1835365224) {
int f4 = xVar2.f();
if (f4 <= 10000) {
float[] fArr = new float[f4];
for (int i4 = 0; i4 < f4; i4++) {
fArr[i4] = Float.intBitsToFloat(xVar2.f());
}
int f5 = xVar2.f();
if (f5 <= 32000) {
double log = Math.log(2.0d);
arrayList2 = arrayList3;
int ceil = (int) Math.ceil(Math.log(((double) f4) * 2.0d) / log);
c.i.a.c.f3.w wVar = new c.i.a.c.f3.w(xVar2.a);
wVar.k(xVar2.b * 8);
float[] fArr2 = new float[(f5 * 5)];
int i5 = 5;
int[] iArr = new int[5];
int i6 = 0;
int i7 = 0;
while (true) {
if (i6 >= f5) {
wVar.k((wVar.e() + 7) & -8);
int i8 = 32;
int g = wVar.g(32);
h.b[] bVarArr = new h.b[g];
int i9 = 0;
while (true) {
if (i9 >= g) {
i = i3;
aVar = new h.a(bVarArr);
break;
}
int g2 = wVar.g(8);
int g3 = wVar.g(8);
int g4 = wVar.g(i8);
if (g4 > 128000) {
break;
}
i = i3;
int ceil2 = (int) Math.ceil(Math.log(((double) f5) * 2.0d) / log);
float[] fArr3 = new float[(g4 * 3)];
float[] fArr4 = new float[(g4 * 2)];
int i10 = 0;
int i11 = 0;
while (i10 < g4) {
int g5 = wVar.g(ceil2);
int i12 = i11 + ((-(g5 & 1)) ^ (g5 >> 1));
if (i12 < 0 || i12 >= f5) {
break;
}
int i13 = i10 * 3;
int i14 = i12 * 5;
fArr3[i13] = fArr2[i14];
fArr3[i13 + 1] = fArr2[i14 + 1];
fArr3[i13 + 2] = fArr2[i14 + 2];
int i15 = i10 * 2;
fArr4[i15] = fArr2[i14 + 3];
fArr4[i15 + 1] = fArr2[i14 + 4];
i10++;
i11 = i12;
fArr4 = fArr4;
g = g;
wVar = wVar;
}
bVarArr[i9] = new h.b(g2, fArr3, fArr4, g3);
i9++;
i3 = i;
g = g;
i8 = 32;
}
} else {
int i16 = 0;
while (i16 < i5) {
int i17 = iArr[i16];
int g6 = wVar.g(ceil);
int i18 = i17 + ((-(g6 & 1)) ^ (g6 >> 1));
if (i18 >= f4 || i18 < 0) {
break;
}
fArr2[i7] = fArr[i18];
iArr[i16] = i18;
i16++;
i7++;
i5 = 5;
}
i6++;
i5 = 5;
}
}
i = i3;
aVar = null;
if (aVar == null) {
arrayList = arrayList2;
arrayList.add(aVar);
}
}
}
arrayList2 = arrayList3;
i = i3;
aVar = null;
if (aVar == null) {
}
} else {
arrayList = arrayList3;
i = i3;
}
xVar2.E(f3);
arrayList3 = arrayList;
i2 = f3;
i3 = i;
}
return null;
}
return arrayList3;
}
public static void r2(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i, @RecentlyNonNull String str, @RecentlyNonNull boolean z2) {
if (str != null) {
int v2 = v2(parcel, i);
parcel.writeString(str);
A2(parcel, v2);
} else if (z2) {
y2(parcel, i, 0);
}
}
public static void s(@RecentlyNonNull Handler handler) {
Looper myLooper = Looper.myLooper();
if (myLooper != handler.getLooper()) {
String name = myLooper != null ? myLooper.getThread().getName() : "null current looper";
String name2 = handler.getLooper().getThread().getName();
StringBuilder Q = c.d.b.a.a.Q(c.d.b.a.a.b(name, c.d.b.a.a.b(name2, 36)), "Must be called on ", name2, " thread, but got ", name);
Q.append(".");
throw new IllegalStateException(Q.toString());
}
}
public static Object s0(j jVar) {
Class<?> cls = jVar._class;
Class<?> v = c.g.a.c.i0.d.v(cls);
if (v != null) {
if (v == Integer.TYPE) {
return 0;
}
if (v == Long.TYPE) {
return 0L;
}
if (v == Boolean.TYPE) {
return Boolean.FALSE;
}
if (v == Double.TYPE) {
return Double.valueOf((double) ShadowDrawableWrapper.COS_45);
}
if (v == Float.TYPE) {
return Float.valueOf(0.0f);
}
if (v == Byte.TYPE) {
return (byte) 0;
}
if (v == Short.TYPE) {
return (short) 0;
}
if (v == Character.TYPE) {
return (char) 0;
}
throw new IllegalArgumentException(c.d.b.a.a.n(v, c.d.b.a.a.R("Class "), " is not a primitive type"));
} else if (jVar.v() || jVar.b()) {
return p.a.NON_EMPTY;
} else {
if (cls == String.class) {
return "";
}
if (jVar.B(Date.class)) {
return new Date(0);
}
if (!jVar.B(Calendar.class)) {
return null;
}
GregorianCalendar gregorianCalendar = new GregorianCalendar();
gregorianCalendar.setTimeInMillis(0);
return gregorianCalendar;
}
}
public static c.c.a.y.k.f s1(c.c.a.a0.i0.c cVar, c.c.a.d dVar) throws IOException {
return new c.c.a.y.k.f(r.a(cVar, dVar, g.c(), w.a));
}
public static void s2(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i, @RecentlyNonNull String[] strArr, @RecentlyNonNull boolean z2) {
if (strArr != null) {
int v2 = v2(parcel, i);
parcel.writeStringArray(strArr);
A2(parcel, v2);
} else if (z2) {
y2(parcel, i, 0);
}
}
@Pure
public static int t(int i, int i2, int i3) {
if (i >= i2 && i < i3) {
return i;
}
throw new IndexOutOfBoundsException();
}
public static Drawable t0(Context context, TypedArray typedArray, int i) {
int resourceId = typedArray.getResourceId(i, 0);
if (resourceId == 0) {
return null;
}
return context.getResources().getDrawable(resourceId);
}
@Nullable
public static c.i.a.c.x2.i0.j t1(byte[] bArr) {
x xVar = new x(bArr);
if (xVar.f793c < 32) {
return null;
}
xVar.E(0);
if (xVar.f() != xVar.a() + 4 || xVar.f() != 1886614376) {
return null;
}
int f2 = (xVar.f() >> 24) & 255;
if (f2 > 1) {
c.d.b.a.a.d0(37, "Unsupported pssh version: ", f2, "PsshAtomUtil");
return null;
}
UUID uuid = new UUID(xVar.m(), xVar.m());
if (f2 == 1) {
xVar.F(xVar.w() * 16);
}
int w = xVar.w();
if (w != xVar.a()) {
return null;
}
byte[] bArr2 = new byte[w];
System.arraycopy(xVar.a, xVar.b, bArr2, 0, w);
xVar.b += w;
return new c.i.a.c.x2.i0.j(uuid, f2, bArr2);
}
public static <T extends Parcelable> void t2(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i, @RecentlyNonNull T[] tArr, @RecentlyNonNull int i2, @RecentlyNonNull boolean z2) {
if (tArr != null) {
int v2 = v2(parcel, i);
int length = tArr.length;
parcel.writeInt(length);
for (T t : tArr) {
if (t == null) {
parcel.writeInt(0);
} else {
x2(parcel, t, i2);
}
}
A2(parcel, v2);
} else if (z2) {
y2(parcel, i, 0);
}
}
public static void u(@RecentlyNonNull String str) {
if (!(Looper.getMainLooper() == Looper.myLooper())) {
throw new IllegalStateException(str);
}
}
@RecentlyNonNull
public static String u0(@RecentlyNonNull PowerManager.WakeLock wakeLock, @RecentlyNonNull String str) {
String valueOf = String.valueOf(String.valueOf(((long) System.identityHashCode(wakeLock)) | (((long) Process.myPid()) << 32)));
String str2 = null;
if (TextUtils.isEmpty(null)) {
str2 = "";
}
String valueOf2 = String.valueOf(str2);
return valueOf2.length() != 0 ? valueOf.concat(valueOf2) : new String(valueOf);
}
@Nullable
public static byte[] u1(byte[] bArr, UUID uuid) {
c.i.a.c.x2.i0.j t1 = t1(bArr);
if (t1 == null) {
return null;
}
if (uuid.equals(t1.a)) {
return t1.f979c;
}
String valueOf = String.valueOf(uuid);
String valueOf2 = String.valueOf(t1.a);
c.d.b.a.a.n0(c.d.b.a.a.Q(valueOf2.length() + valueOf.length() + 33, "UUID mismatch. Expected: ", valueOf, ", got: ", valueOf2), ".", "PsshAtomUtil");
return null;
}
public static <T extends Parcelable> void u2(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i, @RecentlyNonNull List<T> list, @RecentlyNonNull boolean z2) {
if (list != null) {
int v2 = v2(parcel, i);
int size = list.size();
parcel.writeInt(size);
for (int i2 = 0; i2 < size; i2++) {
T t = list.get(i2);
if (t == null) {
parcel.writeInt(0);
} else {
x2(parcel, t, 0);
}
}
A2(parcel, v2);
} else if (z2) {
y2(parcel, i, 0);
}
}
@RecentlyNonNull
public static String v(@RecentlyNonNull String str, @RecentlyNonNull Object obj) {
if (!TextUtils.isEmpty(str)) {
return str;
}
throw new IllegalArgumentException(String.valueOf(obj));
}
public static int v0(InputStream inputStream) throws IOException {
return ((((byte) inputStream.read()) << 24) & ViewCompat.MEASURED_STATE_MASK) | ((((byte) inputStream.read()) << 16) & ItemTouchHelper.ACTION_MODE_DRAG_MASK) | ((((byte) inputStream.read()) << 8) & 65280) | (((byte) inputStream.read()) & 255);
}
public static boolean v1(c.i.a.c.x2.i iVar, byte[] bArr, int i, int i2, boolean z2) throws IOException {
try {
return iVar.e(bArr, i, i2, z2);
} catch (EOFException e2) {
if (z2) {
return false;
}
throw e2;
}
}
public static int v2(Parcel parcel, int i) {
parcel.writeInt(i | SupportMenu.CATEGORY_MASK);
parcel.writeInt(0);
return parcel.dataPosition();
}
@RecentlyNonNull
public static String w(@RecentlyNonNull String str) {
if (!TextUtils.isEmpty(str)) {
return str;
}
throw new IllegalArgumentException("Given String is empty or null");
}
public static final Integer w0(Intent intent, String str) {
m.checkNotNullParameter(intent, "$this$getIntExtraOrNull");
m.checkNotNullParameter(str, "key");
Integer valueOf = Integer.valueOf(intent.getIntExtra(str, Integer.MIN_VALUE));
if (!(valueOf.intValue() == Integer.MIN_VALUE)) {
return valueOf;
}
return null;
}
@Nullable
public static Metadata w1(c.i.a.c.x2.i iVar, boolean z2) throws IOException {
c.i.a.c.z2.k.a aVar;
if (z2) {
aVar = null;
} else {
int i = c.i.a.c.z2.k.b.a;
aVar = c.i.a.c.z2.k.a.a;
}
x xVar = new x(10);
Metadata metadata = null;
int i2 = 0;
while (true) {
try {
iVar.o(xVar.a, 0, 10);
xVar.E(0);
if (xVar.v() != 4801587) {
break;
}
xVar.F(3);
int s2 = xVar.s();
int i3 = s2 + 10;
if (metadata == null) {
byte[] bArr = new byte[i3];
System.arraycopy(xVar.a, 0, bArr, 0, 10);
iVar.o(bArr, 10, s2);
metadata = new c.i.a.c.z2.k.b(aVar).d(bArr, i3);
} else {
iVar.g(s2);
}
i2 += i3;
} catch (EOFException unused) {
}
}
iVar.k();
iVar.g(i2);
if (metadata == null || metadata.i.length == 0) {
return null;
}
return metadata;
}
public static void w2(Parcel parcel, int i, int i2) {
int K1 = K1(parcel, i);
if (K1 != i2) {
String hexString = Integer.toHexString(K1);
StringBuilder O = c.d.b.a.a.O(c.d.b.a.a.b(hexString, 46), "Expected size ", i2, " got ", K1);
O.append(" (0x");
O.append(hexString);
O.append(")");
throw new SafeParcelReader$ParseException(O.toString(), parcel);
}
}
public static void x(@RecentlyNonNull String str) {
if (Looper.getMainLooper() == Looper.myLooper()) {
throw new IllegalStateException(str);
}
}
public static final StageRequestToSpeakState x0(VoiceState voiceState) {
return voiceState == null ? StageRequestToSpeakState.NONE : (!voiceState.l() || voiceState.f() == null) ? (voiceState.l() || voiceState.f() == null) ? !voiceState.l() ? StageRequestToSpeakState.ON_STAGE : StageRequestToSpeakState.NONE : StageRequestToSpeakState.REQUESTED_TO_SPEAK_AND_AWAITING_USER_ACK : StageRequestToSpeakState.REQUESTED_TO_SPEAK;
}
public static int x1(c.i.a.c.x2.i iVar, byte[] bArr, int i, int i2) throws IOException {
int i3 = 0;
while (i3 < i2) {
int i4 = iVar.i(bArr, i + i3, i2 - i3);
if (i4 == -1) {
break;
}
i3 += i4;
}
return i3;
}
public static <T extends Parcelable> void x2(Parcel parcel, T t, int i) {
int dataPosition = parcel.dataPosition();
parcel.writeInt(1);
int dataPosition2 = parcel.dataPosition();
t.writeToParcel(parcel, i);
int dataPosition3 = parcel.dataPosition();
parcel.setDataPosition(dataPosition);
parcel.writeInt(dataPosition3 - dataPosition2);
parcel.setDataPosition(dataPosition3);
}
public static <T> T y(T t, Object obj) {
if (t != null) {
return t;
}
throw new NullPointerException(String.valueOf(obj));
}
public static List<String> y0(CacheKey cacheKey) {
try {
if (!(cacheKey instanceof c.f.b.a.c)) {
ArrayList arrayList = new ArrayList(1);
arrayList.add(cacheKey.a() ? cacheKey.b() : U1(cacheKey));
return arrayList;
}
Objects.requireNonNull((c.f.b.a.c) cacheKey);
throw null;
} catch (UnsupportedEncodingException e2) {
throw new RuntimeException(e2);
}
}
public static boolean y1(c.g.a.c.c0.e0 e0Var, j jVar, Type type) {
if (!jVar.B(e0Var.a(type)._class)) {
return false;
}
ParameterizedType f1 = f1(type);
if (f1 == null || !Objects.equals(jVar._class, f1.getRawType())) {
return true;
}
Type[] actualTypeArguments = f1.getActualTypeArguments();
c.g.a.c.h0.m j = jVar.j();
if (j.j() != actualTypeArguments.length) {
return false;
}
for (int i = 0; i < j.j(); i++) {
if (!y1(e0Var, j.f(i), actualTypeArguments[i])) {
return false;
}
}
return true;
}
public static void y2(Parcel parcel, int i, int i2) {
if (i2 >= 65535) {
parcel.writeInt(i | SupportMenu.CATEGORY_MASK);
parcel.writeInt(i2);
return;
}
parcel.writeInt(i | (i2 << 16));
}
@NonNull
@EnsuresNonNull({"#1"})
public static <T> T z(@RecentlyNonNull T t, @RecentlyNonNull Object obj) {
if (t != null) {
return t;
}
throw new NullPointerException(String.valueOf(obj));
}
public static ScalingUtils$ScaleType z0(TypedArray typedArray, int i) {
switch (typedArray.getInt(i, -2)) {
case -1:
return null;
case 0:
ScalingUtils$ScaleType scalingUtils$ScaleType = ScalingUtils$ScaleType.a;
return c.f.g.e.z.l;
case 1:
ScalingUtils$ScaleType scalingUtils$ScaleType2 = ScalingUtils$ScaleType.a;
return c.f.g.e.x.l;
case 2:
ScalingUtils$ScaleType scalingUtils$ScaleType3 = ScalingUtils$ScaleType.a;
return v.l;
case 3:
ScalingUtils$ScaleType scalingUtils$ScaleType4 = ScalingUtils$ScaleType.a;
return c.f.g.e.w.l;
case 4:
ScalingUtils$ScaleType scalingUtils$ScaleType5 = ScalingUtils$ScaleType.a;
return r.l;
case 5:
ScalingUtils$ScaleType scalingUtils$ScaleType6 = ScalingUtils$ScaleType.a;
return c.f.g.e.t.l;
case 6:
ScalingUtils$ScaleType scalingUtils$ScaleType7 = ScalingUtils$ScaleType.a;
return s.l;
case 7:
ScalingUtils$ScaleType scalingUtils$ScaleType8 = ScalingUtils$ScaleType.a;
return b0.l;
case 8:
ScalingUtils$ScaleType scalingUtils$ScaleType9 = ScalingUtils$ScaleType.a;
return u.l;
default:
throw new RuntimeException("XML attribute not specified!");
}
}
public static int z1(InputStream inputStream, byte[] bArr, int i, int i2) throws IOException {
if (i2 >= 0) {
int i3 = 0;
while (i3 < i2) {
int read = inputStream.read(bArr, i + i3, i2 - i3);
if (read == -1) {
break;
}
i3 += read;
}
return i3;
}
throw new IndexOutOfBoundsException("len is negative");
}
public static void z2(Parcel parcel, int i, int i2) {
if (i != i2) {
String hexString = Integer.toHexString(i);
StringBuilder O = c.d.b.a.a.O(c.d.b.a.a.b(hexString, 46), "Expected size ", i2, " got ", i);
O.append(" (0x");
O.append(hexString);
O.append(")");
throw new SafeParcelReader$ParseException(O.toString(), parcel);
}
}
}