3393 lines
127 KiB
Java
3393 lines
127 KiB
Java
package c.c.a.a0;
|
|
|
|
import android.content.ContentValues;
|
|
import android.content.Context;
|
|
import android.content.Intent;
|
|
import android.content.res.TypedArray;
|
|
import android.database.Cursor;
|
|
import android.database.SQLException;
|
|
import android.database.sqlite.SQLiteDatabase;
|
|
import android.graphics.Color;
|
|
import android.graphics.drawable.Drawable;
|
|
import android.graphics.drawable.StateListDrawable;
|
|
import android.media.MediaFormat;
|
|
import android.net.Uri;
|
|
import android.opengl.GLES20;
|
|
import android.opengl.GLU;
|
|
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.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.b.a.c;
|
|
import c.f.d.d.i;
|
|
import c.f.g.e.b0;
|
|
import c.f.g.e.d0;
|
|
import c.f.g.e.p;
|
|
import c.f.g.e.r;
|
|
import c.f.g.e.s;
|
|
import c.f.g.e.t;
|
|
import c.f.g.e.u;
|
|
import c.f.g.e.v;
|
|
import c.f.g.e.w;
|
|
import c.f.g.e.x;
|
|
import c.f.g.e.z;
|
|
import c.f.j.d.e;
|
|
import c.f.m.h;
|
|
import c.g.a.a.p;
|
|
import c.g.a.c.c0.e0;
|
|
import c.g.a.c.h0.m;
|
|
import c.g.a.c.j;
|
|
import c.i.a.b.i.b;
|
|
import c.i.a.b.i.d;
|
|
import c.i.a.c.a2.o;
|
|
import c.i.a.c.a2.y;
|
|
import c.i.a.c.e2.s.f;
|
|
import c.i.a.c.i2.f0;
|
|
import c.i.a.c.i2.s;
|
|
import c.i.a.c.j2.x.d;
|
|
import c0.t.k;
|
|
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.database.DatabaseIOException;
|
|
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 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.FloatBuffer;
|
|
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;
|
|
|
|
/* 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 f262c;
|
|
|
|
public a(Class cls, int i, Object obj) {
|
|
this.a = cls;
|
|
this.b = i;
|
|
this.f262c = 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.f262c, 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;
|
|
}
|
|
|
|
public static final StageRequestToSpeakState A0(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 boolean A1(e0 e0Var, j jVar, Type type) {
|
|
if (!jVar.B(e0Var.a(type)._class)) {
|
|
return false;
|
|
}
|
|
ParameterizedType h1 = h1(type);
|
|
if (h1 == null || !Objects.equals(jVar._class, h1.getRawType())) {
|
|
return true;
|
|
}
|
|
Type[] actualTypeArguments = h1.getActualTypeArguments();
|
|
m j = jVar.j();
|
|
if (j.j() != actualTypeArguments.length) {
|
|
return false;
|
|
}
|
|
for (int i = 0; i < j.j(); i++) {
|
|
if (!A1(e0Var, j.f(i), actualTypeArguments[i])) {
|
|
return false;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
public static void A2(Parcel parcel, int i, int i2) {
|
|
if (i != i2) {
|
|
String hexString = Integer.toHexString(i);
|
|
StringBuilder sb = new StringBuilder(String.valueOf(hexString).length() + 46);
|
|
sb.append("Expected size ");
|
|
sb.append(i2);
|
|
sb.append(" got ");
|
|
sb.append(i);
|
|
sb.append(" (0x");
|
|
sb.append(hexString);
|
|
sb.append(")");
|
|
throw new SafeParcelReader$ParseException(sb.toString(), parcel);
|
|
}
|
|
}
|
|
|
|
public static void B(boolean z2) {
|
|
if (!z2) {
|
|
throw new IllegalStateException();
|
|
}
|
|
}
|
|
|
|
public static List<String> B0(CacheKey cacheKey) {
|
|
try {
|
|
if (!(cacheKey instanceof c)) {
|
|
ArrayList arrayList = new ArrayList(1);
|
|
arrayList.add(cacheKey.a() ? cacheKey.b() : U1(cacheKey));
|
|
return arrayList;
|
|
}
|
|
Objects.requireNonNull((c) cacheKey);
|
|
throw null;
|
|
} catch (UnsupportedEncodingException e) {
|
|
throw new RuntimeException(e);
|
|
}
|
|
}
|
|
|
|
public static int B1(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 B2(Parcel parcel, int i) {
|
|
int dataPosition = parcel.dataPosition();
|
|
parcel.setDataPosition(i - 4);
|
|
parcel.writeInt(dataPosition - i);
|
|
parcel.setDataPosition(dataPosition);
|
|
}
|
|
|
|
public static void C(boolean z2, Object obj) {
|
|
if (!z2) {
|
|
throw new IllegalStateException(String.valueOf(obj));
|
|
}
|
|
}
|
|
|
|
public static ScalingUtils$ScaleType C0(TypedArray typedArray, int i) {
|
|
switch (typedArray.getInt(i, -2)) {
|
|
case -1:
|
|
return null;
|
|
case 0:
|
|
ScalingUtils$ScaleType scalingUtils$ScaleType = ScalingUtils$ScaleType.a;
|
|
return z.l;
|
|
case 1:
|
|
ScalingUtils$ScaleType scalingUtils$ScaleType2 = ScalingUtils$ScaleType.a;
|
|
return x.l;
|
|
case 2:
|
|
ScalingUtils$ScaleType scalingUtils$ScaleType3 = ScalingUtils$ScaleType.a;
|
|
return v.l;
|
|
case 3:
|
|
ScalingUtils$ScaleType scalingUtils$ScaleType4 = ScalingUtils$ScaleType.a;
|
|
return w.l;
|
|
case 4:
|
|
ScalingUtils$ScaleType scalingUtils$ScaleType5 = ScalingUtils$ScaleType.a;
|
|
return r.l;
|
|
case 5:
|
|
ScalingUtils$ScaleType scalingUtils$ScaleType6 = ScalingUtils$ScaleType.a;
|
|
return 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 void C1(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");
|
|
}
|
|
|
|
@Pure
|
|
public static void D(boolean z2) {
|
|
if (!z2) {
|
|
throw new IllegalStateException();
|
|
}
|
|
}
|
|
|
|
@NonNull
|
|
public static String D0(@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 int D1(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);
|
|
}
|
|
|
|
@Pure
|
|
public static void E(boolean z2, Object obj) {
|
|
if (!z2) {
|
|
throw new IllegalStateException(String.valueOf(obj));
|
|
}
|
|
}
|
|
|
|
public static String[] E0() {
|
|
return Build.VERSION.SDK_INT >= 23 ? SysUtil$MarshmallowSysdeps.getSupportedAbis() : SysUtil$LollipopSysdeps.getSupportedAbis();
|
|
}
|
|
|
|
@RecentlyNonNull
|
|
public static boolean E1(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i) {
|
|
x2(parcel, i, 4);
|
|
return parcel.readInt() != 0;
|
|
}
|
|
|
|
public static void F(@RecentlyNonNull boolean z2) {
|
|
if (!z2) {
|
|
throw new IllegalStateException();
|
|
}
|
|
}
|
|
|
|
public static String F0(String str) {
|
|
return c.d.b.a.a.u("TransportRuntime.", str);
|
|
}
|
|
|
|
@RecentlyNonNull
|
|
public static IBinder F1(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i) {
|
|
int M1 = M1(parcel, i);
|
|
int dataPosition = parcel.dataPosition();
|
|
if (M1 == 0) {
|
|
return null;
|
|
}
|
|
IBinder readStrongBinder = parcel.readStrongBinder();
|
|
parcel.setDataPosition(dataPosition + M1);
|
|
return readStrongBinder;
|
|
}
|
|
|
|
public static void G(@RecentlyNonNull boolean z2, @RecentlyNonNull Object obj) {
|
|
if (!z2) {
|
|
throw new IllegalStateException(String.valueOf(obj));
|
|
}
|
|
}
|
|
|
|
public static Pair<Integer, Integer> G0(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(p0(inputStream)), Integer.valueOf(p0(inputStream)));
|
|
}
|
|
return null;
|
|
}
|
|
|
|
@RecentlyNonNull
|
|
public static int G1(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i) {
|
|
x2(parcel, i, 4);
|
|
return parcel.readInt();
|
|
}
|
|
|
|
@EnsuresNonNull({"#1"})
|
|
@Pure
|
|
public static <T> T H(@Nullable T t) {
|
|
if (t != null) {
|
|
return t;
|
|
}
|
|
throw new IllegalStateException();
|
|
}
|
|
|
|
public static Pair<Integer, Integer> H0(InputStream inputStream) throws IOException {
|
|
y0(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 long H1(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i) {
|
|
x2(parcel, i, 8);
|
|
return parcel.readLong();
|
|
}
|
|
|
|
@EnsuresNonNull({"#1"})
|
|
@Pure
|
|
public static <T> T I(@Nullable T t, Object obj) {
|
|
if (t != null) {
|
|
return t;
|
|
}
|
|
throw new IllegalStateException(String.valueOf(obj));
|
|
}
|
|
|
|
/* JADX WARNING: Code restructure failed: missing block: B:16:0x0041, code lost:
|
|
r12 = move-exception;
|
|
*/
|
|
/* JADX WARNING: Code restructure failed: missing block: B:17:0x0042, code lost:
|
|
if (r10 != null) goto L_0x0044;
|
|
*/
|
|
/* JADX WARNING: Code restructure failed: missing block: B:19:?, code lost:
|
|
r10.close();
|
|
*/
|
|
/* JADX WARNING: Code restructure failed: missing block: B:20:0x0048, code lost:
|
|
r10 = move-exception;
|
|
*/
|
|
/* JADX WARNING: Code restructure failed: missing block: B:21:0x0049, code lost:
|
|
r11.addSuppressed(r10);
|
|
*/
|
|
/* JADX WARNING: Code restructure failed: missing block: B:22:0x004c, code lost:
|
|
throw r12;
|
|
*/
|
|
public static int I0(SQLiteDatabase sQLiteDatabase, int i, String str) throws DatabaseIOException {
|
|
try {
|
|
if (!f0.I(sQLiteDatabase, "ExoPlayerVersions")) {
|
|
return -1;
|
|
}
|
|
Cursor query = sQLiteDatabase.query("ExoPlayerVersions", new String[]{"version"}, "feature = ? AND instance_uid = ?", new String[]{Integer.toString(i), str}, null, null, null);
|
|
if (query.getCount() == 0) {
|
|
query.close();
|
|
return -1;
|
|
}
|
|
query.moveToNext();
|
|
int i2 = query.getInt(0);
|
|
query.close();
|
|
return i2;
|
|
} catch (SQLException e) {
|
|
throw new DatabaseIOException(e);
|
|
}
|
|
}
|
|
|
|
public static int I1(c.i.a.c.i2.w wVar) {
|
|
int i = 0;
|
|
while (wVar.a() != 0) {
|
|
int s = wVar.s();
|
|
i += s;
|
|
if (s != 255) {
|
|
return i;
|
|
}
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
public static boolean J(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 long J0(FileChannel fileChannel, ByteBuffer byteBuffer, long j) throws IOException {
|
|
C1(fileChannel, byteBuffer, 4, j);
|
|
return ((long) byteBuffer.getInt()) & 4294967295L;
|
|
}
|
|
|
|
public static int J1(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 int K(String str, String str2) {
|
|
int glCreateProgram = GLES20.glCreateProgram();
|
|
r();
|
|
d(35633, str, glCreateProgram);
|
|
d(35632, str2, glCreateProgram);
|
|
GLES20.glLinkProgram(glCreateProgram);
|
|
int[] iArr = {0};
|
|
GLES20.glGetProgramiv(glCreateProgram, 35714, iArr, 0);
|
|
if (iArr[0] != 1) {
|
|
StringBuilder O = c.d.b.a.a.O("Unable to link shader program: \n");
|
|
O.append(GLES20.glGetProgramInfoLog(glCreateProgram));
|
|
Log.e("GlUtil", O.toString());
|
|
}
|
|
r();
|
|
return glCreateProgram;
|
|
}
|
|
|
|
public static final boolean K0(Long l, long j) {
|
|
return l != null && (l.longValue() & j) == j;
|
|
}
|
|
|
|
public static long K1(c.i.a.c.i2.w wVar, int i, int i2) {
|
|
wVar.D(i);
|
|
if (wVar.a() < 5) {
|
|
return -9223372036854775807L;
|
|
}
|
|
int f = wVar.f();
|
|
if ((8388608 & f) != 0 || ((2096896 & f) >> 8) != i2) {
|
|
return -9223372036854775807L;
|
|
}
|
|
if (((f & 32) != 0) && wVar.s() >= 7 && wVar.a() >= 7) {
|
|
if ((wVar.s() & 16) == 16) {
|
|
byte[] bArr = new byte[6];
|
|
System.arraycopy(wVar.a, wVar.b, bArr, 0, 6);
|
|
wVar.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 L(long j, c.i.a.c.i2.w wVar, c.i.a.c.a2.w[] wVarArr) {
|
|
while (true) {
|
|
boolean z2 = true;
|
|
if (wVar.a() > 1) {
|
|
int I1 = I1(wVar);
|
|
int I12 = I1(wVar);
|
|
int i = wVar.b + I12;
|
|
if (I12 == -1 || I12 > wVar.a()) {
|
|
Log.w("CeaUtil", "Skipping remainder of malformed SEI NAL unit.");
|
|
i = wVar.f973c;
|
|
} else if (I1 == 4 && I12 >= 8) {
|
|
int s = wVar.s();
|
|
int x2 = wVar.x();
|
|
int f = x2 == 49 ? wVar.f() : 0;
|
|
int s2 = wVar.s();
|
|
if (x2 == 47) {
|
|
wVar.E(1);
|
|
}
|
|
boolean z3 = s == 181 && (x2 == 49 || x2 == 47) && s2 == 3;
|
|
if (x2 == 49) {
|
|
if (f != 1195456820) {
|
|
z2 = false;
|
|
}
|
|
z3 &= z2;
|
|
}
|
|
if (z3) {
|
|
M(j, wVar, wVarArr);
|
|
}
|
|
}
|
|
wVar.D(i);
|
|
} else {
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
|
|
public static boolean L0(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 o.a L1(c.i.a.c.i2.w wVar) {
|
|
wVar.E(1);
|
|
int u = wVar.u();
|
|
long j = ((long) wVar.b) + ((long) u);
|
|
int i = u / 18;
|
|
long[] jArr = new long[i];
|
|
long[] jArr2 = new long[i];
|
|
int i2 = 0;
|
|
while (true) {
|
|
if (i2 >= i) {
|
|
break;
|
|
}
|
|
long m = wVar.m();
|
|
if (m == -1) {
|
|
jArr = Arrays.copyOf(jArr, i2);
|
|
jArr2 = Arrays.copyOf(jArr2, i2);
|
|
break;
|
|
}
|
|
jArr[i2] = m;
|
|
jArr2[i2] = wVar.m();
|
|
wVar.E(2);
|
|
i2++;
|
|
}
|
|
wVar.E((int) (j - ((long) wVar.b)));
|
|
return new o.a(jArr, jArr2);
|
|
}
|
|
|
|
public static void M(long j, c.i.a.c.i2.w wVar, c.i.a.c.a2.w[] wVarArr) {
|
|
int s = wVar.s();
|
|
if ((s & 64) != 0) {
|
|
wVar.E(1);
|
|
int i = (s & 31) * 3;
|
|
int i2 = wVar.b;
|
|
for (c.i.a.c.a2.w wVar2 : wVarArr) {
|
|
wVar.D(i2);
|
|
wVar2.c(wVar, i);
|
|
wVar2.d(j, 1, i, 0, null);
|
|
}
|
|
}
|
|
}
|
|
|
|
public static int M0(int i, int i2) {
|
|
return ((i + 31) * 31) + i2;
|
|
}
|
|
|
|
@RecentlyNonNull
|
|
public static int M1(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i) {
|
|
return (i & SupportMenu.CATEGORY_MASK) != -65536 ? (i >> 16) & 65535 : parcel.readInt();
|
|
}
|
|
|
|
public static void N(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 N0(Object obj, Object obj2) {
|
|
int i = 0;
|
|
int hashCode = obj == null ? 0 : obj.hashCode();
|
|
if (obj2 != null) {
|
|
i = obj2.hashCode();
|
|
}
|
|
return M0(hashCode, i);
|
|
}
|
|
|
|
public static y N1(c.i.a.c.i2.w wVar, boolean z2, boolean z3) throws ParserException {
|
|
if (z2) {
|
|
m2(3, wVar, false);
|
|
}
|
|
String p = wVar.p((int) wVar.j());
|
|
long j = wVar.j();
|
|
String[] strArr = new String[((int) j)];
|
|
int length = p.length() + 11 + 4;
|
|
for (int i = 0; ((long) i) < j; i++) {
|
|
strArr[i] = wVar.p((int) wVar.j());
|
|
length = length + 4 + strArr[i].length();
|
|
}
|
|
if (!z3 || (wVar.s() & 1) != 0) {
|
|
return new y(p, strArr, length + 1);
|
|
}
|
|
throw new ParserException("framing bit expected to be set");
|
|
}
|
|
|
|
public static FloatBuffer O(float[] fArr) {
|
|
return (FloatBuffer) ByteBuffer.allocateDirect(fArr.length * 4).order(ByteOrder.nativeOrder()).asFloatBuffer().put(fArr).flip();
|
|
}
|
|
|
|
public static void O0(String str, String str2) {
|
|
Log.i(F0(str), str2);
|
|
}
|
|
|
|
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 O = c.d.b.a.a.O("Unknown error renaming ");
|
|
O.append(file.getAbsolutePath());
|
|
O.append(" to ");
|
|
O.append(file2.getAbsolutePath());
|
|
throw new FileUtils$RenameException(O.toString(), th);
|
|
}
|
|
}
|
|
|
|
@RecentlyNonNull
|
|
public static Bundle P(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i) {
|
|
int M1 = M1(parcel, i);
|
|
int dataPosition = parcel.dataPosition();
|
|
if (M1 == 0) {
|
|
return null;
|
|
}
|
|
Bundle readBundle = parcel.readBundle();
|
|
parcel.setDataPosition(dataPosition + M1);
|
|
return readBundle;
|
|
}
|
|
|
|
public static int P0(int i) {
|
|
int i2 = 0;
|
|
while (i > 0) {
|
|
i2++;
|
|
i >>>= 1;
|
|
}
|
|
return i2;
|
|
}
|
|
|
|
public static final RenderContext P1(Function1<? super RenderContext, Unit> function1, Object... objArr) {
|
|
c0.z.d.m.checkNotNullParameter(function1, "init");
|
|
c0.z.d.m.checkNotNullParameter(objArr, "orderedArguments");
|
|
RenderContext renderContext = new RenderContext();
|
|
function1.invoke(renderContext);
|
|
if (!(objArr.length == 0)) {
|
|
if (!(!renderContext.a.isEmpty())) {
|
|
renderContext.f2504c = k.toList(objArr);
|
|
} else {
|
|
throw new IllegalArgumentException("must provide named arguments OR formatArgs, not both.");
|
|
}
|
|
}
|
|
return renderContext;
|
|
}
|
|
|
|
@RecentlyNonNull
|
|
public static byte[] Q(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i) {
|
|
int M1 = M1(parcel, i);
|
|
int dataPosition = parcel.dataPosition();
|
|
if (M1 == 0) {
|
|
return null;
|
|
}
|
|
byte[] createByteArray = parcel.createByteArray();
|
|
parcel.setDataPosition(dataPosition + M1);
|
|
return createByteArray;
|
|
}
|
|
|
|
public static <T> DataSource<T> Q0(Throwable th) {
|
|
c.f.e.h hVar = new c.f.e.h();
|
|
Objects.requireNonNull(th);
|
|
hVar.k(th, null);
|
|
return hVar;
|
|
}
|
|
|
|
public static /* synthetic */ void Q1(AppPermissionsRequests appPermissionsRequests, Function0 function0, Function0 function02, int i, Object obj) {
|
|
int i2 = i & 1;
|
|
appPermissionsRequests.requestMicrophone(null, function02);
|
|
}
|
|
|
|
public static final MediaSource R(MediaType mediaType, String str, String str2) {
|
|
c0.z.d.m.checkNotNullParameter(mediaType, "mediaType");
|
|
c0.z.d.m.checkNotNullParameter(str, "progressiveMediaUri");
|
|
c0.z.d.m.checkNotNullParameter(str2, "featureTag");
|
|
Uri parse = Uri.parse(str);
|
|
c0.z.d.m.checkNotNullExpressionValue(parse, "Uri.parse(progressiveMediaUri)");
|
|
return new MediaSource(parse, str2, mediaType);
|
|
}
|
|
|
|
/* 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 R0(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<s.a> arrayList = c.i.a.c.i2.s.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;
|
|
}
|
|
|
|
@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 <T extends Parcelable> T S(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i, @RecentlyNonNull Parcelable.Creator<T> creator) {
|
|
int M1 = M1(parcel, i);
|
|
int dataPosition = parcel.dataPosition();
|
|
if (M1 == 0) {
|
|
return null;
|
|
}
|
|
T createFromParcel = creator.createFromParcel(parcel);
|
|
parcel.setDataPosition(dataPosition + M1);
|
|
return createFromParcel;
|
|
}
|
|
|
|
public static int S0(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 float S1(int i, float f, int i2, int i3) {
|
|
float f2;
|
|
if (f == -3.4028235E38f) {
|
|
return -3.4028235E38f;
|
|
}
|
|
if (i == 0) {
|
|
f2 = (float) i3;
|
|
} else if (i == 1) {
|
|
f2 = (float) i2;
|
|
} else if (i != 2) {
|
|
return -3.4028235E38f;
|
|
} else {
|
|
return f;
|
|
}
|
|
return f * f2;
|
|
}
|
|
|
|
@RecentlyNonNull
|
|
public static String T(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i) {
|
|
int M1 = M1(parcel, i);
|
|
int dataPosition = parcel.dataPosition();
|
|
if (M1 == 0) {
|
|
return null;
|
|
}
|
|
String readString = parcel.readString();
|
|
parcel.setDataPosition(dataPosition + M1);
|
|
return readString;
|
|
}
|
|
|
|
public static void T0(String str) {
|
|
throw new IllegalArgumentException(c.d.b.a.a.u("Unknown library: ", str));
|
|
}
|
|
|
|
/* 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, 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) {
|
|
Z("CctTransportBackend", "Following redirect to: %s", url);
|
|
tinput = new d.a(tresult2.b, tinput2.b, tinput2.f633c);
|
|
} else {
|
|
tinput = null;
|
|
}
|
|
if (tinput == null) {
|
|
break;
|
|
}
|
|
i--;
|
|
} while (i >= 1);
|
|
return tresult;
|
|
}
|
|
|
|
@RecentlyNonNull
|
|
public static String[] U(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i) {
|
|
int M1 = M1(parcel, i);
|
|
int dataPosition = parcel.dataPosition();
|
|
if (M1 == 0) {
|
|
return null;
|
|
}
|
|
String[] createStringArray = parcel.createStringArray();
|
|
parcel.setDataPosition(dataPosition + M1);
|
|
return createStringArray;
|
|
}
|
|
|
|
public static boolean U0(XmlPullParser xmlPullParser, String str) throws XmlPullParserException {
|
|
return (xmlPullParser.getEventType() == 3) && xmlPullParser.getName().equals(str);
|
|
}
|
|
|
|
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 e) {
|
|
throw new RuntimeException(e);
|
|
}
|
|
}
|
|
|
|
@RecentlyNonNull
|
|
public static ArrayList<String> V(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i) {
|
|
int M1 = M1(parcel, i);
|
|
int dataPosition = parcel.dataPosition();
|
|
if (M1 == 0) {
|
|
return null;
|
|
}
|
|
ArrayList<String> createStringArrayList = parcel.createStringArrayList();
|
|
parcel.setDataPosition(dataPosition + M1);
|
|
return createStringArrayList;
|
|
}
|
|
|
|
public static boolean V0(int i, int i2, e eVar) {
|
|
return eVar == null ? ((float) q0(i)) >= 2048.0f && q0(i2) >= 2048 : q0(i) >= eVar.a && q0(i2) >= eVar.b;
|
|
}
|
|
|
|
public static void V1(Drawable drawable, Drawable.Callback callback, c.f.g.e.e0 e0Var) {
|
|
if (drawable != null) {
|
|
drawable.setCallback(callback);
|
|
if (drawable instanceof d0) {
|
|
((d0) drawable).b(e0Var);
|
|
}
|
|
}
|
|
}
|
|
|
|
@RecentlyNonNull
|
|
public static <T> T[] W(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i, @RecentlyNonNull Parcelable.Creator<T> creator) {
|
|
int M1 = M1(parcel, i);
|
|
int dataPosition = parcel.dataPosition();
|
|
if (M1 == 0) {
|
|
return null;
|
|
}
|
|
T[] tArr = (T[]) parcel.createTypedArray(creator);
|
|
parcel.setDataPosition(dataPosition + M1);
|
|
return tArr;
|
|
}
|
|
|
|
public static boolean W0(c.f.j.j.e eVar, e eVar2) {
|
|
if (eVar == null) {
|
|
return false;
|
|
}
|
|
eVar.w();
|
|
int i = eVar.l;
|
|
if (i == 90 || i == 270) {
|
|
eVar.w();
|
|
int i2 = eVar.o;
|
|
eVar.w();
|
|
return V0(i2, eVar.n, eVar2);
|
|
}
|
|
eVar.w();
|
|
int i3 = eVar.n;
|
|
eVar.w();
|
|
return V0(i3, eVar.o, eVar2);
|
|
}
|
|
|
|
public static void W1(MediaFormat mediaFormat, List<byte[]> list) {
|
|
for (int i = 0; i < list.size(); i++) {
|
|
mediaFormat.setByteBuffer(c.d.b.a.a.l("csd-", i), ByteBuffer.wrap(list.get(i)));
|
|
}
|
|
}
|
|
|
|
@RecentlyNonNull
|
|
public static <T> ArrayList<T> X(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i, @RecentlyNonNull Parcelable.Creator<T> creator) {
|
|
int M1 = M1(parcel, i);
|
|
int dataPosition = parcel.dataPosition();
|
|
if (M1 == 0) {
|
|
return null;
|
|
}
|
|
ArrayList<T> createTypedArrayList = parcel.createTypedArrayList(creator);
|
|
parcel.setDataPosition(dataPosition + M1);
|
|
return createTypedArrayList;
|
|
}
|
|
|
|
public static final boolean X0(Context context) {
|
|
c0.z.d.m.checkNotNullParameter(context, "$this$isLtr");
|
|
return TextUtilsCompat.getLayoutDirectionFromLocale(Locale.getDefault()) == 0;
|
|
}
|
|
|
|
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.f409c);
|
|
}
|
|
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 String Y(String str) {
|
|
return "." + str + ",." + str + " *";
|
|
}
|
|
|
|
public static final boolean Y0(VoiceState voiceState) {
|
|
c0.z.d.m.checkNotNullParameter(voiceState, "$this$isMutedByAnySource");
|
|
return voiceState.h() || voiceState.e() || voiceState.l();
|
|
}
|
|
|
|
public static <TResult> void Y1(Status status, @Nullable TResult tresult, TaskCompletionSource<TResult> taskCompletionSource) {
|
|
if (status.v0()) {
|
|
taskCompletionSource.a.t(tresult);
|
|
return;
|
|
}
|
|
taskCompletionSource.a.s(new ApiException(status));
|
|
}
|
|
|
|
public static void Z(String str, String str2, Object obj) {
|
|
Log.d(F0(str), String.format(str2, obj));
|
|
}
|
|
|
|
public static final boolean Z0(StageInstance stageInstance) {
|
|
c0.z.d.m.checkNotNullParameter(stageInstance, "$this$isPublic");
|
|
return stageInstance.e() == StageInstancePrivacyLevel.PUBLIC;
|
|
}
|
|
|
|
public static void Z1(SQLiteDatabase sQLiteDatabase, int i, String str, int i2) throws DatabaseIOException {
|
|
try {
|
|
sQLiteDatabase.execSQL("CREATE TABLE IF NOT EXISTS ExoPlayerVersions (feature INTEGER NOT NULL,instance_uid TEXT NOT NULL,version INTEGER NOT NULL,PRIMARY KEY (feature, instance_uid))");
|
|
ContentValues contentValues = new ContentValues();
|
|
contentValues.put("feature", Integer.valueOf(i));
|
|
contentValues.put("instance_uid", str);
|
|
contentValues.put("version", Integer.valueOf(i2));
|
|
sQLiteDatabase.replaceOrThrow("ExoPlayerVersions", null, contentValues);
|
|
} catch (SQLException e) {
|
|
throw new DatabaseIOException(e);
|
|
}
|
|
}
|
|
|
|
public static float a(float f) {
|
|
return f <= 0.04045f ? f / 12.92f : (float) Math.pow((double) ((f + 0.055f) / 1.055f), 2.4000000953674316d);
|
|
}
|
|
|
|
public static void a0(String str, String str2, Object... objArr) {
|
|
Log.d(F0(str), String.format(str2, objArr));
|
|
}
|
|
|
|
public static final boolean a1(VoiceState voiceState) {
|
|
c0.z.d.m.checkNotNullParameter(voiceState, "$this$isRemoveSignal");
|
|
return voiceState.a() == null;
|
|
}
|
|
|
|
public static boolean a2(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 b(float f) {
|
|
return f <= 0.0031308f ? f * 12.92f : (float) ((Math.pow((double) f, 0.4166666567325592d) * 1.0549999475479126d) - 0.054999999701976776d);
|
|
}
|
|
|
|
public static boolean b0(File file) {
|
|
File[] listFiles;
|
|
if (file.isDirectory() && (listFiles = file.listFiles()) != null) {
|
|
for (File file2 : listFiles) {
|
|
b0(file2);
|
|
}
|
|
}
|
|
return file.delete();
|
|
}
|
|
|
|
public static boolean b1(XmlPullParser xmlPullParser, String str) throws XmlPullParserException {
|
|
return (xmlPullParser.getEventType() == 2) && xmlPullParser.getName().equals(str);
|
|
}
|
|
|
|
public static long b2(InputStream inputStream, long j) throws IOException {
|
|
j(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 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);
|
|
}
|
|
|
|
/* 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 c0(c.f.j.d.f fVar, e eVar, c.f.j.j.e eVar2, int i) {
|
|
float f;
|
|
int max;
|
|
float f2;
|
|
int i2;
|
|
int i3;
|
|
int i4;
|
|
int i5 = 1;
|
|
if (!c.f.j.j.e.r(eVar2)) {
|
|
return 1;
|
|
}
|
|
j(Boolean.valueOf(c.f.j.j.e.r(eVar2)));
|
|
if (eVar != null && eVar.b > 0 && eVar.a > 0) {
|
|
eVar2.w();
|
|
if (eVar2.n != 0) {
|
|
eVar2.w();
|
|
if (eVar2.o != 0) {
|
|
boolean z2 = false;
|
|
if (!fVar.c()) {
|
|
i2 = 0;
|
|
} else {
|
|
eVar2.w();
|
|
i2 = eVar2.l;
|
|
j(Boolean.valueOf(i2 == 0 || i2 == 90 || i2 == 180 || i2 == 270));
|
|
}
|
|
if (i2 == 90 || i2 == 270) {
|
|
z2 = true;
|
|
}
|
|
if (z2) {
|
|
eVar2.w();
|
|
i3 = eVar2.o;
|
|
} else {
|
|
eVar2.w();
|
|
i3 = eVar2.n;
|
|
}
|
|
if (z2) {
|
|
eVar2.w();
|
|
i4 = eVar2.n;
|
|
} else {
|
|
eVar2.w();
|
|
i4 = eVar2.o;
|
|
}
|
|
f = Math.max(((float) eVar.a) / ((float) i3), ((float) eVar.b) / ((float) i4));
|
|
int i6 = c.f.d.e.a.a;
|
|
eVar2.w();
|
|
int i7 = 2;
|
|
if (eVar2.k != c.f.i.b.a) {
|
|
if (f <= 0.6666667f) {
|
|
i5 = 2;
|
|
while (true) {
|
|
int i8 = i5 * 2;
|
|
double d = 1.0d / ((double) i8);
|
|
if ((d * 0.3333333432674408d) + d <= ((double) f)) {
|
|
break;
|
|
}
|
|
i5 = i8;
|
|
}
|
|
}
|
|
} else if (f <= 0.6666667f) {
|
|
while (true) {
|
|
double d2 = (double) i7;
|
|
if (((1.0d / (Math.pow(d2, 2.0d) - d2)) * 0.3333333432674408d) + (1.0d / d2) <= ((double) f)) {
|
|
break;
|
|
}
|
|
i7++;
|
|
}
|
|
i5 = i7 - 1;
|
|
}
|
|
eVar2.w();
|
|
int i9 = eVar2.o;
|
|
eVar2.w();
|
|
max = Math.max(i9, eVar2.n);
|
|
f2 = eVar == null ? eVar.f459c : (float) i;
|
|
while (((float) (max / i5)) > f2) {
|
|
eVar2.w();
|
|
i5 = eVar2.k == c.f.i.b.a ? i5 * 2 : i5 + 1;
|
|
}
|
|
return i5;
|
|
}
|
|
}
|
|
}
|
|
f = 1.0f;
|
|
eVar2.w();
|
|
int i7 = 2;
|
|
if (eVar2.k != c.f.i.b.a) {
|
|
}
|
|
eVar2.w();
|
|
int i9 = eVar2.o;
|
|
eVar2.w();
|
|
max = Math.max(i9, eVar2.n);
|
|
if (eVar == null) {
|
|
}
|
|
while (((float) (max / i5)) > f2) {
|
|
}
|
|
return i5;
|
|
}
|
|
|
|
public static final void c1(String str, String str2) {
|
|
c0.z.d.m.checkNotNullParameter(str, "tag");
|
|
c0.z.d.m.checkNotNullParameter(str2, NotificationCompat.CATEGORY_MESSAGE);
|
|
Logger.d$default(LoggingProvider.INSTANCE.get(), str, str2, null, 4, null);
|
|
}
|
|
|
|
public static void c2(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i) {
|
|
parcel.setDataPosition(parcel.dataPosition() + M1(parcel, i));
|
|
}
|
|
|
|
public static void d(int i, String str, int i2) {
|
|
int glCreateShader = GLES20.glCreateShader(i);
|
|
GLES20.glShaderSource(glCreateShader, str);
|
|
GLES20.glCompileShader(glCreateShader);
|
|
int[] iArr = {0};
|
|
GLES20.glGetShaderiv(glCreateShader, 35713, iArr, 0);
|
|
if (iArr[0] != 1) {
|
|
Log.e("GlUtil", GLES20.glGetShaderInfoLog(glCreateShader) + ", source: " + str);
|
|
}
|
|
GLES20.glAttachShader(i2, glCreateShader);
|
|
GLES20.glDeleteShader(glCreateShader);
|
|
r();
|
|
}
|
|
|
|
public static void d0(File file) throws IOException {
|
|
if (file.isDirectory()) {
|
|
File[] listFiles = file.listFiles();
|
|
if (listFiles != null) {
|
|
for (File file2 : listFiles) {
|
|
d0(file2);
|
|
}
|
|
} else {
|
|
return;
|
|
}
|
|
}
|
|
if (!file.delete() && file.exists()) {
|
|
throw new IOException("could not delete: " + file);
|
|
}
|
|
}
|
|
|
|
public static final void d1(String str, String str2, Throwable th) {
|
|
c0.z.d.m.checkNotNullParameter(str, "tag");
|
|
c0.z.d.m.checkNotNullParameter(str2, NotificationCompat.CATEGORY_MESSAGE);
|
|
Logger.e$default(LoggingProvider.INSTANCE.get(), str, str2, th, null, 8, null);
|
|
}
|
|
|
|
public static final <P extends Parcelable> Bundle d2(P p) {
|
|
c0.z.d.m.checkNotNullParameter(p, "$this$toBundle");
|
|
Bundle bundle = new Bundle();
|
|
bundle.putParcelable("intent_args_key", p);
|
|
return bundle;
|
|
}
|
|
|
|
public static int e(int i, int i2, int i3) {
|
|
return Math.min(Math.max(0, i3 - i), i2);
|
|
}
|
|
|
|
public static void e0(String str, String str2, Throwable th) {
|
|
Log.e(F0(str), str2, th);
|
|
}
|
|
|
|
public static final void e1(String str, String str2) {
|
|
c0.z.d.m.checkNotNullParameter(str, "tag");
|
|
c0.z.d.m.checkNotNullParameter(str2, NotificationCompat.CATEGORY_MESSAGE);
|
|
Logger.i$default(LoggingProvider.INSTANCE.get(), str, str2, null, 4, null);
|
|
}
|
|
|
|
public static String e2(@ColorInt int i) {
|
|
return f0.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[] f(String str) {
|
|
try {
|
|
return str.getBytes("ASCII");
|
|
} catch (UnsupportedEncodingException e) {
|
|
throw new RuntimeException("ASCII not found!", e);
|
|
}
|
|
}
|
|
|
|
public static void f0() {
|
|
if (f0.a >= 18) {
|
|
Trace.endSection();
|
|
}
|
|
}
|
|
|
|
public static final void f1(String str, String str2) {
|
|
c0.z.d.m.checkNotNullParameter(str, "tag");
|
|
c0.z.d.m.checkNotNullParameter(str2, NotificationCompat.CATEGORY_MESSAGE);
|
|
Logger.v$default(LoggingProvider.INSTANCE.get(), str, str2, null, 4, null);
|
|
}
|
|
|
|
public static final <P extends Parcelable> Intent f2(P p) {
|
|
c0.z.d.m.checkNotNullParameter(p, "$this$toIntent");
|
|
Intent putExtra = new Intent().putExtra("intent_args_key", p);
|
|
c0.z.d.m.checkNotNullExpressionValue(putExtra, "Intent().putExtra(INTENT_ARGS, this)");
|
|
return putExtra;
|
|
}
|
|
|
|
public static void g(String str) {
|
|
if (f0.a >= 18) {
|
|
Trace.beginSection(str);
|
|
}
|
|
}
|
|
|
|
public static synchronized void g0() {
|
|
synchronized (d.class) {
|
|
if (!a) {
|
|
c.f.m.n.a.c("native-imagetranscoder");
|
|
a = true;
|
|
}
|
|
}
|
|
}
|
|
|
|
public static final void g1(String str, String str2) {
|
|
c0.z.d.m.checkNotNullParameter(str, "tag");
|
|
c0.z.d.m.checkNotNullParameter(str2, NotificationCompat.CATEGORY_MESSAGE);
|
|
Logger.w$default(LoggingProvider.INSTANCE.get(), str, str2, null, 4, null);
|
|
}
|
|
|
|
public static i g2(Object obj) {
|
|
return new i(obj.getClass().getSimpleName(), null);
|
|
}
|
|
|
|
public static List<byte[]> h(byte[] bArr) {
|
|
ArrayList arrayList = new ArrayList(3);
|
|
arrayList.add(bArr);
|
|
arrayList.add(i((((long) (((bArr[11] & 255) << 8) | (bArr[10] & 255))) * 1000000000) / 48000));
|
|
arrayList.add(i(80000000));
|
|
return arrayList;
|
|
}
|
|
|
|
public static void h0(@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 ParameterizedType h1(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 h1(upperBounds[0]);
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public static void h2(Collection<? extends Node> collection, c.a.t.b.c.a aVar) {
|
|
for (Node node : collection) {
|
|
i2(node, aVar);
|
|
}
|
|
}
|
|
|
|
public static byte[] i(long j) {
|
|
return ByteBuffer.allocate(8).order(ByteOrder.nativeOrder()).putLong(j).array();
|
|
}
|
|
|
|
public static boolean i0(Object obj, Object obj2) {
|
|
return obj == obj2 || (obj != null && obj.equals(obj2));
|
|
}
|
|
|
|
public static TypeVariable<?> i1(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 i1(upperBounds[0]);
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public static void i2(Node node, c.a.t.b.c.a aVar) {
|
|
if (node.hasChildren()) {
|
|
for (Node node2 : node.getChildren()) {
|
|
i2(node2, aVar);
|
|
}
|
|
}
|
|
aVar.processNode(node);
|
|
}
|
|
|
|
public static void j(Boolean bool) {
|
|
if (bool != null && !bool.booleanValue()) {
|
|
throw new IllegalArgumentException();
|
|
}
|
|
}
|
|
|
|
@RecentlyNonNull
|
|
public static boolean j0(@Nullable Object obj, @Nullable Object obj2) {
|
|
if (obj != obj2) {
|
|
return obj != null && obj.equals(obj2);
|
|
}
|
|
return true;
|
|
}
|
|
|
|
public static void j1(MediaFormat mediaFormat, String str, int i) {
|
|
if (i != -1) {
|
|
mediaFormat.setInteger(str, i);
|
|
}
|
|
}
|
|
|
|
public static void j2(Node node, c.a.t.b.c.a aVar) {
|
|
aVar.processNode(node);
|
|
if (node.hasChildren()) {
|
|
for (Node node2 : node.getChildren()) {
|
|
j2(node2, aVar);
|
|
}
|
|
}
|
|
}
|
|
|
|
@Pure
|
|
public static void k(boolean z2) {
|
|
if (!z2) {
|
|
throw new IllegalArgumentException();
|
|
}
|
|
}
|
|
|
|
public static int k0(float f, int i, int i2) {
|
|
if (i == i2) {
|
|
return i;
|
|
}
|
|
float f2 = ((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, f2, f, f2);
|
|
float a9 = c.d.b.a.a.a(a5, a2, f, a2);
|
|
float a10 = c.d.b.a.a.a(a6, a3, f, a3);
|
|
float a11 = c.d.b.a.a.a(a7, a4, f, 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 String k1(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();
|
|
}
|
|
|
|
/* 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 k2(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 = C0(obtainStyledAttributes, index);
|
|
} else if (index == R.a.GenericDraweeHierarchy_placeholderImage) {
|
|
aVar.f = w0(context2, obtainStyledAttributes, index);
|
|
} else {
|
|
if (index == R.a.GenericDraweeHierarchy_pressedStateOverlayImage) {
|
|
Drawable w0 = w0(context2, obtainStyledAttributes, index);
|
|
if (w0 == null) {
|
|
aVar.q = null;
|
|
} else {
|
|
StateListDrawable stateListDrawable = new StateListDrawable();
|
|
i3 = indexCount;
|
|
int[] iArr = new int[i5];
|
|
iArr[0] = 16842919;
|
|
stateListDrawable.addState(iArr, w0);
|
|
aVar.q = stateListDrawable;
|
|
}
|
|
} else {
|
|
i3 = indexCount;
|
|
if (index == R.a.GenericDraweeHierarchy_progressBarImage) {
|
|
aVar.l = w0(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 = C0(obtainStyledAttributes, index);
|
|
} else if (index == R.a.GenericDraweeHierarchy_retryImage) {
|
|
aVar.h = w0(context2, obtainStyledAttributes, index);
|
|
} else if (index == R.a.GenericDraweeHierarchy_retryImageScaleType) {
|
|
aVar.i = C0(obtainStyledAttributes, index);
|
|
} else if (index == R.a.GenericDraweeHierarchy_failureImage) {
|
|
aVar.j = w0(context2, obtainStyledAttributes, index);
|
|
} else if (index == R.a.GenericDraweeHierarchy_failureImageScaleType) {
|
|
aVar.k = C0(obtainStyledAttributes, index);
|
|
} else if (index == R.a.GenericDraweeHierarchy_progressBarImageScaleType) {
|
|
aVar.m = C0(obtainStyledAttributes, index);
|
|
} else {
|
|
if (index == R.a.GenericDraweeHierarchy_progressBarAutoRotateInterval) {
|
|
i = obtainStyledAttributes.getInteger(index, i);
|
|
} else if (index == R.a.GenericDraweeHierarchy_backgroundImage) {
|
|
aVar.o = w0(context2, obtainStyledAttributes, index);
|
|
} else if (index == R.a.GenericDraweeHierarchy_overlayImage) {
|
|
aVar.b(w0(context2, obtainStyledAttributes, index));
|
|
} else if (index == R.a.GenericDraweeHierarchy_roundAsCircle) {
|
|
if (aVar.f429r == null) {
|
|
aVar.f429r = new c.f.g.f.c();
|
|
}
|
|
aVar.f429r.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.f429r == null) {
|
|
aVar.f429r = new c.f.g.f.c();
|
|
}
|
|
aVar.f429r.b(obtainStyledAttributes.getColor(index, 0));
|
|
} else {
|
|
if (index == R.a.GenericDraweeHierarchy_roundingBorderWidth) {
|
|
if (aVar.f429r == null) {
|
|
aVar.f429r = new c.f.g.f.c();
|
|
}
|
|
c.f.g.f.c cVar = aVar.f429r;
|
|
float dimensionPixelSize = (float) obtainStyledAttributes.getDimensionPixelSize(index, 0);
|
|
Objects.requireNonNull(cVar);
|
|
if (dimensionPixelSize >= 0.0f) {
|
|
i4 = i7;
|
|
z10 = true;
|
|
} else {
|
|
i4 = i7;
|
|
z10 = false;
|
|
}
|
|
l(z10, "the border width cannot be < 0");
|
|
cVar.e = dimensionPixelSize;
|
|
} else {
|
|
i4 = i7;
|
|
if (index == R.a.GenericDraweeHierarchy_roundingBorderColor) {
|
|
if (aVar.f429r == null) {
|
|
aVar.f429r = new c.f.g.f.c();
|
|
}
|
|
aVar.f429r.f = obtainStyledAttributes.getColor(index, 0);
|
|
} else if (index == R.a.GenericDraweeHierarchy_roundingBorderPadding) {
|
|
if (aVar.f429r == null) {
|
|
aVar.f429r = new c.f.g.f.c();
|
|
}
|
|
c.f.g.f.c cVar2 = aVar.f429r;
|
|
float dimensionPixelSize2 = (float) obtainStyledAttributes.getDimensionPixelSize(index, 0);
|
|
Objects.requireNonNull(cVar2);
|
|
l(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.f429r == null) {
|
|
aVar.f429r = new c.f.g.f.c();
|
|
}
|
|
c.f.g.f.c cVar3 = aVar.f429r;
|
|
float f = z4 ? (float) i2 : 0.0f;
|
|
float f2 = z5 ? (float) i2 : 0.0f;
|
|
float f3 = z3 ? (float) i2 : 0.0f;
|
|
float f4 = z2 ? (float) i2 : 0.0f;
|
|
if (cVar3.f430c == null) {
|
|
cVar3.f430c = new float[8];
|
|
}
|
|
float[] fArr = cVar3.f430c;
|
|
fArr[1] = f;
|
|
fArr[0] = f;
|
|
fArr[3] = f2;
|
|
fArr[2] = f2;
|
|
fArr[5] = f3;
|
|
fArr[4] = f3;
|
|
fArr[7] = f4;
|
|
fArr[6] = f4;
|
|
}
|
|
return aVar;
|
|
}
|
|
|
|
public static void l(boolean z2, Object obj) {
|
|
if (!z2) {
|
|
throw new IllegalArgumentException(String.valueOf(obj));
|
|
}
|
|
}
|
|
|
|
public static String[] l0(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 (J0(fileChannel, allocate, 0) == 1179403647) {
|
|
C1(fileChannel, allocate, 1, 4);
|
|
boolean z2 = ((short) (allocate.get() & 255)) == 1;
|
|
C1(fileChannel, allocate, 1, 5);
|
|
if (((short) (allocate.get() & 255)) == 2) {
|
|
allocate.order(ByteOrder.BIG_ENDIAN);
|
|
}
|
|
if (z2) {
|
|
j = J0(fileChannel, allocate, 28);
|
|
} else {
|
|
C1(fileChannel, allocate, 8, 32);
|
|
j = allocate.getLong();
|
|
}
|
|
if (z2) {
|
|
C1(fileChannel, allocate, 2, 44);
|
|
j2 = (long) (allocate.getShort() & 65535);
|
|
} else {
|
|
C1(fileChannel, allocate, 2, 56);
|
|
j2 = (long) (allocate.getShort() & 65535);
|
|
}
|
|
C1(fileChannel, allocate, 2, z2 ? 42 : 54);
|
|
int i2 = allocate.getShort() & 65535;
|
|
if (j2 == 65535) {
|
|
if (z2) {
|
|
j14 = J0(fileChannel, allocate, 32);
|
|
} else {
|
|
C1(fileChannel, allocate, 8, 40);
|
|
j14 = allocate.getLong();
|
|
}
|
|
j2 = z2 ? J0(fileChannel, allocate, j14 + 28) : J0(fileChannel, allocate, j14 + 44);
|
|
}
|
|
long j15 = j;
|
|
long j16 = 0;
|
|
while (true) {
|
|
if (j16 >= j2) {
|
|
j3 = 0;
|
|
break;
|
|
}
|
|
if ((z2 ? J0(fileChannel, allocate, j15 + 0) : J0(fileChannel, allocate, j15 + 0)) != 2) {
|
|
j15 += (long) i2;
|
|
j16++;
|
|
} else if (z2) {
|
|
j3 = J0(fileChannel, allocate, j15 + 4);
|
|
} else {
|
|
C1(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 = J0(fileChannel, allocate, j20);
|
|
} else {
|
|
C1(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 = J0(fileChannel, allocate, j18 + 4);
|
|
} else {
|
|
C1(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 ? J0(fileChannel, allocate, j + j22) : J0(fileChannel, allocate, j + j22)) == 1) {
|
|
if (z2) {
|
|
j10 = J0(fileChannel, allocate, j + 8);
|
|
} else {
|
|
C1(fileChannel, allocate, 8, j + j21);
|
|
j10 = allocate.getLong();
|
|
}
|
|
if (z2) {
|
|
j9 = j2;
|
|
j11 = J0(fileChannel, allocate, j + 20);
|
|
} else {
|
|
j9 = j2;
|
|
C1(fileChannel, allocate, 8, j + 40);
|
|
j11 = allocate.getLong();
|
|
}
|
|
if (j10 <= j19 && j19 < j11 + j10) {
|
|
if (z2) {
|
|
j12 = J0(fileChannel, allocate, j + 4);
|
|
} else {
|
|
C1(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 = J0(fileChannel, allocate, j24);
|
|
} else {
|
|
C1(fileChannel, allocate, 8, j24);
|
|
j7 = allocate.getLong();
|
|
}
|
|
if (j7 == 1) {
|
|
if (z2) {
|
|
j8 = J0(fileChannel, allocate, j5 + 4);
|
|
} else {
|
|
C1(fileChannel, allocate, 8, j5 + 8);
|
|
j8 = allocate.getLong();
|
|
}
|
|
long j25 = j8 + j6;
|
|
StringBuilder sb = new StringBuilder();
|
|
while (true) {
|
|
long j26 = j25 + 1;
|
|
C1(fileChannel, allocate, 1, j25);
|
|
short s = (short) (allocate.get() & 255);
|
|
if (s == 0) {
|
|
break;
|
|
}
|
|
sb.append((char) s);
|
|
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 void l1(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());
|
|
}
|
|
}
|
|
|
|
@RecentlyNonNull
|
|
public static int l2(@RecentlyNonNull Parcel parcel) {
|
|
int readInt = parcel.readInt();
|
|
int M1 = M1(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 = M1 + dataPosition;
|
|
if (i >= dataPosition && i <= parcel.dataSize()) {
|
|
return i;
|
|
}
|
|
StringBuilder sb = new StringBuilder(54);
|
|
sb.append("Size read is invalid start=");
|
|
sb.append(dataPosition);
|
|
sb.append(" end=");
|
|
sb.append(i);
|
|
throw new SafeParcelReader$ParseException(sb.toString(), parcel);
|
|
}
|
|
|
|
public static void m(@RecentlyNonNull boolean z2) {
|
|
if (!z2) {
|
|
throw new IllegalArgumentException();
|
|
}
|
|
}
|
|
|
|
public static String m0(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 int m1(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);
|
|
}
|
|
|
|
public static boolean m2(int i, c.i.a.c.i2.w wVar, boolean z2) throws ParserException {
|
|
if (wVar.a() < 7) {
|
|
if (z2) {
|
|
return false;
|
|
}
|
|
StringBuilder O = c.d.b.a.a.O("too short header: ");
|
|
O.append(wVar.a());
|
|
throw new ParserException(O.toString());
|
|
} else if (wVar.s() != i) {
|
|
if (z2) {
|
|
return false;
|
|
}
|
|
StringBuilder O2 = c.d.b.a.a.O("expected header type ");
|
|
O2.append(Integer.toHexString(i));
|
|
throw new ParserException(O2.toString());
|
|
} else if (wVar.s() == 118 && wVar.s() == 111 && wVar.s() == 114 && wVar.s() == 98 && wVar.s() == 105 && wVar.s() == 115) {
|
|
return true;
|
|
} else {
|
|
if (z2) {
|
|
return false;
|
|
}
|
|
throw new ParserException("expected characters 'vorbis'");
|
|
}
|
|
}
|
|
|
|
@Pure
|
|
public static void n(boolean z2, Object obj) {
|
|
if (!z2) {
|
|
throw new IllegalArgumentException(String.valueOf(obj));
|
|
}
|
|
}
|
|
|
|
@NonNull
|
|
public static ApiException n0(@NonNull Status status) {
|
|
return status.q != null ? new ResolvableApiException(status) : new ApiException(status);
|
|
}
|
|
|
|
public static final Integer n1(JsonReader jsonReader) {
|
|
c0.z.d.m.checkNotNullParameter(jsonReader, "$this$nextIntOrNull");
|
|
if (jsonReader.N() != JsonToken.NULL) {
|
|
return Integer.valueOf(jsonReader.z());
|
|
}
|
|
jsonReader.H();
|
|
return null;
|
|
}
|
|
|
|
public static void n2(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()) {
|
|
n2(file2, aVar);
|
|
} else {
|
|
aVar.a(file2);
|
|
}
|
|
}
|
|
}
|
|
aVar.c(file);
|
|
}
|
|
|
|
public static void o(@RecentlyNonNull boolean z2, @RecentlyNonNull String str, @RecentlyNonNull Object... objArr) {
|
|
if (!z2) {
|
|
throw new IllegalArgumentException(String.format(str, objArr));
|
|
}
|
|
}
|
|
|
|
/* 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 o0(File file) throws IOException {
|
|
if (file.isDirectory()) {
|
|
File[] listFiles = file.listFiles();
|
|
if (listFiles != null) {
|
|
for (File file2 : listFiles) {
|
|
o0(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();
|
|
}
|
|
}
|
|
|
|
@Nullable
|
|
public static <T> List<c.c.a.c0.a<T>> o1(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 o2(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i, @RecentlyNonNull Bundle bundle, @RecentlyNonNull boolean z2) {
|
|
if (bundle != null) {
|
|
int w2 = w2(parcel, i);
|
|
parcel.writeBundle(bundle);
|
|
B2(parcel, w2);
|
|
} else if (z2) {
|
|
z2(parcel, i, 0);
|
|
}
|
|
}
|
|
|
|
public static void p(@RecentlyNonNull boolean z2, @RecentlyNonNull Object obj) {
|
|
if (!z2) {
|
|
throw new IllegalArgumentException(String.valueOf(obj));
|
|
}
|
|
}
|
|
|
|
public static int p0(InputStream inputStream) throws IOException {
|
|
return ((((byte) inputStream.read()) << 8) & 65280) | (((byte) inputStream.read()) & 255);
|
|
}
|
|
|
|
public static c.c.a.y.k.a p1(c.c.a.a0.i0.c cVar, c.c.a.d dVar) throws IOException {
|
|
return new c.c.a.y.k.a(o1(cVar, dVar, f.a));
|
|
}
|
|
|
|
public static void p2(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i, @RecentlyNonNull byte[] bArr, @RecentlyNonNull boolean z2) {
|
|
if (bArr != null) {
|
|
int w2 = w2(parcel, i);
|
|
parcel.writeByteArray(bArr);
|
|
B2(parcel, w2);
|
|
} else if (z2) {
|
|
z2(parcel, i, 0);
|
|
}
|
|
}
|
|
|
|
public static void q(int i, int i2, int i3, int i4, int i5) {
|
|
boolean z2 = true;
|
|
j(Boolean.valueOf(i4 >= 0));
|
|
j(Boolean.valueOf(i >= 0));
|
|
j(Boolean.valueOf(i3 >= 0));
|
|
j(Boolean.valueOf(i + i4 <= i5));
|
|
if (i3 + i4 > i2) {
|
|
z2 = false;
|
|
}
|
|
j(Boolean.valueOf(z2));
|
|
}
|
|
|
|
public static int q0(int i) {
|
|
return (int) (((float) i) * 1.3333334f);
|
|
}
|
|
|
|
public static c.c.a.y.k.b q1(c.c.a.a0.i0.c cVar, c.c.a.d dVar) throws IOException {
|
|
return r1(cVar, dVar, true);
|
|
}
|
|
|
|
public static void q2(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i, @RecentlyNonNull IBinder iBinder, @RecentlyNonNull boolean z2) {
|
|
if (iBinder != null) {
|
|
int w2 = w2(parcel, i);
|
|
parcel.writeStrongBinder(iBinder);
|
|
B2(parcel, w2);
|
|
} else if (z2) {
|
|
z2(parcel, i, 0);
|
|
}
|
|
}
|
|
|
|
public static void r() {
|
|
while (true) {
|
|
int glGetError = GLES20.glGetError();
|
|
if (glGetError != 0) {
|
|
StringBuilder O = c.d.b.a.a.O("glError ");
|
|
O.append(GLU.gluErrorString(glGetError));
|
|
Log.e("GlUtil", O.toString());
|
|
} else {
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
|
|
public static p r0(Drawable drawable) {
|
|
if (drawable == null) {
|
|
return null;
|
|
}
|
|
if (drawable instanceof p) {
|
|
return (p) drawable;
|
|
}
|
|
if (drawable instanceof c.f.g.e.d) {
|
|
return r0(((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 r0 = r0(bVar.a(i));
|
|
if (r0 != null) {
|
|
return r0;
|
|
}
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public static c.c.a.y.k.b r1(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 r2(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i, @RecentlyNonNull Parcelable parcelable, @RecentlyNonNull int i2, @RecentlyNonNull boolean z2) {
|
|
if (parcelable != null) {
|
|
int w2 = w2(parcel, i);
|
|
parcelable.writeToParcel(parcel, i2);
|
|
B2(parcel, w2);
|
|
} else if (z2) {
|
|
z2(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 N = c.d.b.a.a.N(c.d.b.a.a.b(name, c.d.b.a.a.b(name2, 36)), "Must be called on ", name2, " thread, but got ", name);
|
|
N.append(".");
|
|
throw new IllegalStateException(N.toString());
|
|
}
|
|
}
|
|
|
|
public static Object s0(Object obj) {
|
|
return new a(obj.getClass(), Array.getLength(obj), obj);
|
|
}
|
|
|
|
public static c.c.a.y.k.d s1(c.c.a.a0.i0.c cVar, c.c.a.d dVar) throws IOException {
|
|
return new c.c.a.y.k.d(o1(cVar, dVar, o.a));
|
|
}
|
|
|
|
public static void s2(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i, @RecentlyNonNull String str, @RecentlyNonNull boolean z2) {
|
|
if (str != null) {
|
|
int w2 = w2(parcel, i);
|
|
parcel.writeString(str);
|
|
B2(parcel, w2);
|
|
} else if (z2) {
|
|
z2(parcel, i, 0);
|
|
}
|
|
}
|
|
|
|
@Pure
|
|
public static int t(int i, int i2, int i3) {
|
|
if (i >= i2 && i < i3) {
|
|
return i;
|
|
}
|
|
throw new IndexOutOfBoundsException();
|
|
}
|
|
|
|
@Nullable
|
|
public static String t0(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;
|
|
}
|
|
|
|
/* 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<d.a> t1(c.i.a.c.i2.w wVar) {
|
|
int i;
|
|
ArrayList<d.a> arrayList;
|
|
ArrayList<d.a> arrayList2;
|
|
d.a aVar;
|
|
c.i.a.c.i2.w wVar2 = wVar;
|
|
if (wVar.s() != 0) {
|
|
return null;
|
|
}
|
|
wVar2.E(7);
|
|
int f = wVar.f();
|
|
if (f == 1684433976) {
|
|
c.i.a.c.i2.w wVar3 = new c.i.a.c.i2.w();
|
|
Inflater inflater = new Inflater(true);
|
|
try {
|
|
if (!f0.x(wVar2, wVar3, inflater)) {
|
|
return null;
|
|
}
|
|
inflater.end();
|
|
wVar2 = wVar3;
|
|
} finally {
|
|
inflater.end();
|
|
}
|
|
} else if (f != 1918990112) {
|
|
return null;
|
|
}
|
|
ArrayList<d.a> arrayList3 = new ArrayList<>();
|
|
int i2 = wVar2.b;
|
|
int i3 = wVar2.f973c;
|
|
while (i2 < i3) {
|
|
int f2 = wVar2.f() + i2;
|
|
if (f2 > i2 && f2 <= i3) {
|
|
if (wVar2.f() == 1835365224) {
|
|
int f3 = wVar2.f();
|
|
if (f3 <= 10000) {
|
|
float[] fArr = new float[f3];
|
|
for (int i4 = 0; i4 < f3; i4++) {
|
|
fArr[i4] = Float.intBitsToFloat(wVar2.f());
|
|
}
|
|
int f4 = wVar2.f();
|
|
if (f4 <= 32000) {
|
|
double log = Math.log(2.0d);
|
|
arrayList2 = arrayList3;
|
|
int ceil = (int) Math.ceil(Math.log(((double) f3) * 2.0d) / log);
|
|
c.i.a.c.i2.v vVar = new c.i.a.c.i2.v(wVar2.a);
|
|
vVar.k(wVar2.b * 8);
|
|
float[] fArr2 = new float[(f4 * 5)];
|
|
int i5 = 5;
|
|
int[] iArr = new int[5];
|
|
int i6 = 0;
|
|
int i7 = 0;
|
|
while (true) {
|
|
if (i6 >= f4) {
|
|
vVar.k((vVar.e() + 7) & -8);
|
|
int i8 = 32;
|
|
int g = vVar.g(32);
|
|
d.b[] bVarArr = new d.b[g];
|
|
int i9 = 0;
|
|
while (true) {
|
|
if (i9 >= g) {
|
|
i = i3;
|
|
aVar = new d.a(bVarArr);
|
|
break;
|
|
}
|
|
int g2 = vVar.g(8);
|
|
int g3 = vVar.g(8);
|
|
int g4 = vVar.g(i8);
|
|
if (g4 > 128000) {
|
|
break;
|
|
}
|
|
i = i3;
|
|
int ceil2 = (int) Math.ceil(Math.log(((double) f4) * 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 = vVar.g(ceil2);
|
|
int i12 = i11 + ((-(g5 & 1)) ^ (g5 >> 1));
|
|
if (i12 < 0 || i12 >= f4) {
|
|
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;
|
|
vVar = vVar;
|
|
}
|
|
bVarArr[i9] = new d.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 = vVar.g(ceil);
|
|
int i18 = i17 + ((-(g6 & 1)) ^ (g6 >> 1));
|
|
if (i18 >= f3 || 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;
|
|
}
|
|
wVar2.D(f2);
|
|
arrayList3 = arrayList;
|
|
i2 = f2;
|
|
i3 = i;
|
|
}
|
|
return null;
|
|
}
|
|
return arrayList3;
|
|
}
|
|
|
|
public static void t2(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i, @RecentlyNonNull String[] strArr, @RecentlyNonNull boolean z2) {
|
|
if (strArr != null) {
|
|
int w2 = w2(parcel, i);
|
|
parcel.writeStringArray(strArr);
|
|
B2(parcel, w2);
|
|
} else if (z2) {
|
|
z2(parcel, i, 0);
|
|
}
|
|
}
|
|
|
|
public static void u(@RecentlyNonNull String str) {
|
|
if (!(Looper.getMainLooper() == Looper.myLooper())) {
|
|
throw new IllegalStateException(str);
|
|
}
|
|
}
|
|
|
|
public static int u0(int i) {
|
|
if (i == 3) {
|
|
return BaseTransientBottomBar.ANIMATION_FADE_DURATION;
|
|
}
|
|
if (i != 6) {
|
|
return i != 8 ? 0 : 270;
|
|
}
|
|
return 90;
|
|
}
|
|
|
|
public static c.c.a.y.k.f u1(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 <T extends Parcelable> void u2(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i, @RecentlyNonNull T[] tArr, @RecentlyNonNull int i2, @RecentlyNonNull boolean z2) {
|
|
if (tArr != null) {
|
|
int w2 = w2(parcel, i);
|
|
int length = tArr.length;
|
|
parcel.writeInt(length);
|
|
for (T t : tArr) {
|
|
if (t == null) {
|
|
parcel.writeInt(0);
|
|
} else {
|
|
y2(parcel, t, i2);
|
|
}
|
|
}
|
|
B2(parcel, w2);
|
|
} else if (z2) {
|
|
z2(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 Object v0(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.j(v, c.d.b.a.a.O("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;
|
|
}
|
|
}
|
|
|
|
@Nullable
|
|
public static c.i.a.c.a2.h0.j v1(byte[] bArr) {
|
|
c.i.a.c.i2.w wVar = new c.i.a.c.i2.w(bArr);
|
|
if (wVar.f973c < 32) {
|
|
return null;
|
|
}
|
|
wVar.D(0);
|
|
if (wVar.f() != wVar.a() + 4 || wVar.f() != 1886614376) {
|
|
return null;
|
|
}
|
|
int f = (wVar.f() >> 24) & 255;
|
|
if (f > 1) {
|
|
c.d.b.a.a.i0("Unsupported pssh version: ", f, "PsshAtomUtil");
|
|
return null;
|
|
}
|
|
UUID uuid = new UUID(wVar.m(), wVar.m());
|
|
if (f == 1) {
|
|
wVar.E(wVar.v() * 16);
|
|
}
|
|
int v = wVar.v();
|
|
if (v != wVar.a()) {
|
|
return null;
|
|
}
|
|
byte[] bArr2 = new byte[v];
|
|
System.arraycopy(wVar.a, wVar.b, bArr2, 0, v);
|
|
wVar.b += v;
|
|
return new c.i.a.c.a2.h0.j(uuid, f, bArr2);
|
|
}
|
|
|
|
public static <T extends Parcelable> void v2(@RecentlyNonNull Parcel parcel, @RecentlyNonNull int i, @RecentlyNonNull List<T> list, @RecentlyNonNull boolean z2) {
|
|
if (list != null) {
|
|
int w2 = w2(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 {
|
|
y2(parcel, t, 0);
|
|
}
|
|
}
|
|
B2(parcel, w2);
|
|
} else if (z2) {
|
|
z2(parcel, i, 0);
|
|
}
|
|
}
|
|
|
|
@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 Drawable w0(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 byte[] w1(byte[] bArr, UUID uuid) {
|
|
c.i.a.c.a2.h0.j v1 = v1(bArr);
|
|
if (v1 == null) {
|
|
return null;
|
|
}
|
|
if (uuid.equals(v1.a)) {
|
|
return v1.f745c;
|
|
}
|
|
Log.w("PsshAtomUtil", "UUID mismatch. Expected: " + uuid + ", got: " + v1.a + ".");
|
|
return null;
|
|
}
|
|
|
|
public static int w2(Parcel parcel, int i) {
|
|
parcel.writeInt(i | SupportMenu.CATEGORY_MASK);
|
|
parcel.writeInt(0);
|
|
return parcel.dataPosition();
|
|
}
|
|
|
|
public static void x(@RecentlyNonNull String str) {
|
|
if (Looper.getMainLooper() == Looper.myLooper()) {
|
|
throw new IllegalStateException(str);
|
|
}
|
|
}
|
|
|
|
@RecentlyNonNull
|
|
public static String x0(@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 c.i.a.c.a2.k0.c x1(c.i.a.c.a2.i iVar) throws IOException {
|
|
byte[] bArr;
|
|
Objects.requireNonNull(iVar);
|
|
c.i.a.c.i2.w wVar = new c.i.a.c.i2.w(16);
|
|
if (c.i.a.c.a2.k0.d.a(iVar, wVar).a != 1380533830) {
|
|
return null;
|
|
}
|
|
iVar.n(wVar.a, 0, 4);
|
|
wVar.D(0);
|
|
int f = wVar.f();
|
|
if (f != 1463899717) {
|
|
Log.e("WavHeaderReader", "Unsupported RIFF format: " + f);
|
|
return null;
|
|
}
|
|
c.i.a.c.a2.k0.d a2 = c.i.a.c.a2.k0.d.a(iVar, wVar);
|
|
while (a2.a != 1718449184) {
|
|
iVar.g((int) a2.b);
|
|
a2 = c.i.a.c.a2.k0.d.a(iVar, wVar);
|
|
}
|
|
D(a2.b >= 16);
|
|
iVar.n(wVar.a, 0, 16);
|
|
wVar.D(0);
|
|
int l = wVar.l();
|
|
int l2 = wVar.l();
|
|
int k = wVar.k();
|
|
int k2 = wVar.k();
|
|
int l3 = wVar.l();
|
|
int l4 = wVar.l();
|
|
int i = ((int) a2.b) - 16;
|
|
if (i > 0) {
|
|
byte[] bArr2 = new byte[i];
|
|
iVar.n(bArr2, 0, i);
|
|
bArr = bArr2;
|
|
} else {
|
|
bArr = f0.f;
|
|
}
|
|
return new c.i.a.c.a2.k0.c(l, l2, k, k2, l3, l4, bArr);
|
|
}
|
|
|
|
public static void x2(Parcel parcel, int i, int i2) {
|
|
int M1 = M1(parcel, i);
|
|
if (M1 != i2) {
|
|
String hexString = Integer.toHexString(M1);
|
|
StringBuilder sb = new StringBuilder(String.valueOf(hexString).length() + 46);
|
|
sb.append("Expected size ");
|
|
sb.append(i2);
|
|
sb.append(" got ");
|
|
sb.append(M1);
|
|
sb.append(" (0x");
|
|
sb.append(hexString);
|
|
sb.append(")");
|
|
throw new SafeParcelReader$ParseException(sb.toString(), parcel);
|
|
}
|
|
}
|
|
|
|
public static <T> T y(T t, Object obj) {
|
|
if (t != null) {
|
|
return t;
|
|
}
|
|
throw new NullPointerException(String.valueOf(obj));
|
|
}
|
|
|
|
public static int y0(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);
|
|
}
|
|
|
|
@Nullable
|
|
public static Metadata y1(c.i.a.c.a2.i iVar, boolean z2) throws IOException {
|
|
c.i.a.c.c2.k.a aVar;
|
|
if (z2) {
|
|
aVar = null;
|
|
} else {
|
|
int i = c.i.a.c.c2.k.b.a;
|
|
aVar = c.i.a.c.c2.k.a.a;
|
|
}
|
|
c.i.a.c.i2.w wVar = new c.i.a.c.i2.w(10);
|
|
Metadata metadata = null;
|
|
int i2 = 0;
|
|
while (true) {
|
|
try {
|
|
iVar.n(wVar.a, 0, 10);
|
|
wVar.D(0);
|
|
if (wVar.u() != 4801587) {
|
|
break;
|
|
}
|
|
wVar.E(3);
|
|
int r2 = wVar.r();
|
|
int i3 = r2 + 10;
|
|
if (metadata == null) {
|
|
byte[] bArr = new byte[i3];
|
|
System.arraycopy(wVar.a, 0, bArr, 0, 10);
|
|
iVar.n(bArr, 10, r2);
|
|
metadata = new c.i.a.c.c2.k.b(aVar).d(bArr, i3);
|
|
} else {
|
|
iVar.g(r2);
|
|
}
|
|
i2 += i3;
|
|
} catch (EOFException unused) {
|
|
}
|
|
}
|
|
iVar.k();
|
|
iVar.g(i2);
|
|
if (metadata == null || metadata.i.length == 0) {
|
|
return null;
|
|
}
|
|
return metadata;
|
|
}
|
|
|
|
public static <T extends Parcelable> void y2(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);
|
|
}
|
|
|
|
@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 final Integer z0(Intent intent, String str) {
|
|
c0.z.d.m.checkNotNullParameter(intent, "$this$getIntExtraOrNull");
|
|
c0.z.d.m.checkNotNullParameter(str, "key");
|
|
Integer valueOf = Integer.valueOf(intent.getIntExtra(str, Integer.MIN_VALUE));
|
|
if (!(valueOf.intValue() == Integer.MIN_VALUE)) {
|
|
return valueOf;
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public static int z1(c.i.a.c.a2.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 void z2(Parcel parcel, int i, int i2) {
|
|
if (i2 >= 65535) {
|
|
parcel.writeInt(i | SupportMenu.CATEGORY_MASK);
|
|
parcel.writeInt(i2);
|
|
return;
|
|
}
|
|
parcel.writeInt(i | (i2 << 16));
|
|
}
|
|
}
|