正在查看: Aplazo v2.4.68 应用的 h.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Aplazo v2.4.68 应用的 h.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package B3;
import A2.AbstractC0007g;
import A2.C0002b;
import D.C0157w;
import D.b0;
import D.h0;
import Di.A;
import Di.x;
import Hb.EnumC0318x0;
import Hb.G0;
import Hb.X0;
import I5.T;
import S.AbstractC0473a;
import U0.InterfaceC0601m;
import V.C0626d;
import V0.C0686s;
import Vb.S;
import android.app.Activity;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.ResolveInfo;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.SurfaceTexture;
import android.net.Uri;
import android.os.Handler;
import android.os.Looper;
import android.os.Parcelable;
import android.text.SpannableStringBuilder;
import android.text.TextUtils;
import android.util.Base64;
import android.util.Log;
import android.util.Pair;
import android.util.Size;
import android.view.Surface;
import androidx.camera.core.impl.X;
import androidx.camera.core.impl.Y;
import androidx.camera.core.impl.a0;
import androidx.fragment.app.L;
import androidx.lifecycle.I;
import androidx.lifecycle.K0;
import androidx.lifecycle.LifecycleOwner;
import androidx.lifecycle.M0;
import androidx.lifecycle.Q0;
import c1.AbstractC1378f;
import c1.C1376d;
import c1.C1377e;
import c1.D;
import c1.m;
import c1.n;
import com.google.crypto.tink.internal.s;
import com.google.gson.w;
import com.google.protobuf.o0;
import dev.fluttercommunity.plus.share.SharePlusPendingIntent;
import gi.i;
import gi.k;
import gi.t;
import h1.InterfaceC1883m;
import h1.M;
import hi.B;
import hi.r;
import hi.z;
import ib.RunnableC1985c;
import io.split.android.client.service.sseclient.notifications.ControlNotification;
import io.split.android.client.service.sseclient.notifications.IncomingNotification;
import io.split.android.client.service.sseclient.notifications.NotificationParser;
import io.split.android.client.service.sseclient.notifications.NotificationProcessor;
import io.split.android.client.service.sseclient.notifications.OccupancyNotification;
import io.split.android.client.service.sseclient.notifications.StreamingError;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.security.GeneralSecurityException;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.TreeMap;
import java.util.TreeSet;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.l;
import n2.AbstractC2300c;
import na.R3;
import na.Y3;
import oa.AbstractC2551a4;
import oa.C2622m3;
import oa.D4;
import oa.V3;
import oa.Z3;
import org.json.JSONException;
import org.json.JSONObject;
import p1.InterfaceC2722b;
import v2.C3270a;
import vb.InterfaceFutureC3287b;
import w.P;
import wb.o;
import wb.p;
public final class h implements v3.d, i, n {
public Object f992c;
public Object f993d;
public Object f994e;
public Object f995f;
public Object f996g;
public h(Object obj, Object obj2, Object obj3, Object obj4, Object obj5) {
this.f992c = obj;
this.f993d = obj2;
this.f994e = obj3;
this.f995f = obj4;
this.f996g = obj5;
}
public static void B(Throwable th) {
Log.e("WebChromeClientImpl", th.getClass().getSimpleName() + ", Message: " + th.getMessage() + ", Stacktrace: " + Log.getStackTraceString(th));
}
public static A6.f k() {
A6.f fVar = new A6.f();
h hVar = new h();
hVar.f992c = "https://sdk.split.io/api";
hVar.f993d = "https://events.split.io/api";
hVar.f994e = "https://auth.split.io/api/v2";
hVar.f995f = "https://streaming.split.io/sse";
hVar.f996g = "https://telemetry.split.io/api/v1";
fVar.f598c = hVar;
return fVar;
}
public static h m(SharedPreferences sharedPreferences, ScheduledThreadPoolExecutor scheduledThreadPoolExecutor) {
h hVar = new h();
hVar.f995f = new ArrayDeque();
hVar.f992c = sharedPreferences;
hVar.f993d = "topic_operation_queue";
hVar.f994e = ",";
hVar.f996g = scheduledThreadPoolExecutor;
synchronized (((ArrayDeque) hVar.f995f)) {
try {
((ArrayDeque) hVar.f995f).clear();
String string = ((SharedPreferences) hVar.f992c).getString((String) hVar.f993d, "");
if (!TextUtils.isEmpty(string) && string.contains((String) hVar.f994e)) {
String[] split = string.split((String) hVar.f994e, -1);
if (split.length == 0) {
Log.e("FirebaseMessaging", "Corrupted queue. Please check the queue contents and item separator provided");
}
for (String str : split) {
if (!TextUtils.isEmpty(str)) {
((ArrayDeque) hVar.f995f).add(str);
}
}
}
} finally {
}
}
return hVar;
}
public static HashMap q(JSONObject jSONObject) {
if (jSONObject.has("evtName") && jSONObject.has("evtData")) {
try {
return V3.e(jSONObject.getJSONObject("evtData"));
} catch (JSONException e10) {
T.o("Could not convert JSONObject to Map - " + e10.getMessage());
}
}
return new HashMap();
}
public static String s(String str) {
if (str == null || !A.q(str, "/", false)) {
return "*";
}
String substring = str.substring(0, A.y(str, "/", 0, false, 6));
l.d(substring, "this as java.lang.String…ing(startIndex, endIndex)");
return substring;
}
public boolean A(HashMap hashMap) {
String str = (String) hashMap.get("data");
if (str == null) {
return true;
}
try {
return ((NotificationParser) this.f993d).parseError(str).isRetryable();
} catch (w unused) {
Uh.a.s("Could no parse ably error: ".concat(str));
return true;
}
}
public void C() {
while (true) {
LinkedHashMap linkedHashMap = (LinkedHashMap) this.f995f;
if (linkedHashMap.entrySet().size() <= 4) {
break;
}
Set entrySet = linkedHashMap.entrySet();
Set entrySet2 = linkedHashMap.entrySet();
l.d(entrySet2, "lastInteractions.entries");
entrySet.remove(z.B(entrySet2));
}
while (true) {
LinkedHashMap linkedHashMap2 = (LinkedHashMap) this.f996g;
if (linkedHashMap2.entrySet().size() <= 4) {
return;
}
Set keySet = linkedHashMap2.keySet();
l.d(keySet, "lastViewCreatedTimestamps.keys");
linkedHashMap2.remove(z.B(keySet));
}
}
public void D(P.b bVar) {
L l4;
synchronized (this.f992c) {
try {
synchronized (bVar.f9180c) {
l4 = bVar.f9181d;
}
P.a aVar = new P.a(l4, bVar.f9182e.f6080f);
P.c r4 = r(l4);
Set hashSet = r4 != null ? (Set) ((HashMap) this.f996g).get(r4) : new HashSet();
hashSet.add(aVar);
((HashMap) this.f995f).put(aVar, bVar);
if (r4 == null) {
P.c cVar = new P.c(l4, this);
((HashMap) this.f996g).put(cVar, hashSet);
l4.getLifecycle().addObserver(cVar);
}
} catch (Throwable th) {
throw th;
}
}
}
public Long E(String str) {
Long l4 = (Long) ((LinkedHashMap) this.f996g).get(str);
if (l4 == null) {
aa.f.a((B6.d) this.f992c, B6.b.WARN, B6.c.MAINTAINER, new D7.d(str, 13), null, false, 56);
}
return l4;
}
public L7.c F(long j10, String str) {
L7.c cVar;
T7.a aVar = (T7.a) this.f994e;
if (aVar == null || (cVar = (L7.c) ((LinkedHashMap) this.f995f).get(str)) == null) {
return null;
}
if (aVar.e(new T7.b(cVar.f7884b, cVar.f7885c, Long.valueOf(j10)))) {
return cVar;
}
return null;
}
public Long G(String str) {
l.e(str, "viewId");
C();
Long E10 = E(str);
if (E10 != null) {
long longValue = E10.longValue();
String H10 = H(str);
L7.c F8 = H10 != null ? F(longValue, H10) : null;
if (F8 != null) {
long j10 = longValue - F8.f7885c;
if (j10 > 0) {
return Long.valueOf(j10);
}
aa.f.a((B6.d) this.f992c, B6.b.WARN, B6.c.MAINTAINER, new D7.d(str, 14), null, false, 56);
return null;
}
if (((LinkedHashMap) this.f996g).size() > 1) {
aa.f.a((B6.d) this.f992c, B6.b.WARN, B6.c.MAINTAINER, new D7.d(str, 15), null, false, 56);
}
}
return null;
}
public String H(String str) {
Object obj;
LinkedHashMap linkedHashMap = (LinkedHashMap) this.f996g;
Set keySet = linkedHashMap.keySet();
l.d(keySet, "lastViewCreatedTimestamps.keys");
int G10 = z.G(keySet, str);
Set keySet2 = linkedHashMap.keySet();
l.d(keySet2, "lastViewCreatedTimestamps.keys");
Set set = keySet2;
int i10 = G10 - 1;
if (set instanceof List) {
obj = z.F(i10, (List) set);
} else {
if (i10 >= 0) {
int i11 = 0;
for (Object obj2 : set) {
int i12 = i11 + 1;
if (i10 == i11) {
obj = obj2;
break;
}
i11 = i12;
}
}
obj = null;
}
return (String) obj;
}
public void I(Runnable runnable) {
Context context = (Context) this.f995f;
if (context instanceof Activity) {
((Activity) context).runOnUiThread(runnable);
} else {
new Handler(Looper.getMainLooper()).post(runnable);
}
}
public void J(LinkedHashSet linkedHashSet, InterfaceC0601m interfaceC0601m) {
if (linkedHashSet.add(interfaceC0601m)) {
if (((LinkedHashSet) this.f995f).size() + ((LinkedHashSet) this.f994e).size() + ((LinkedHashSet) this.f993d).size() == 1) {
((C0686s) this.f992c).invoke((B7.a) this.f996g);
}
}
}
public void K(LifecycleOwner lifecycleOwner) {
synchronized (this.f992c) {
try {
if (y(lifecycleOwner)) {
if (((ArrayDeque) this.f993d).isEmpty()) {
((ArrayDeque) this.f993d).push(lifecycleOwner);
} else {
B.a aVar = (B.a) this.f994e;
if (aVar == null || aVar.f812d != 2) {
LifecycleOwner lifecycleOwner2 = (LifecycleOwner) ((ArrayDeque) this.f993d).peek();
if (!lifecycleOwner.equals(lifecycleOwner2)) {
P(lifecycleOwner2);
((ArrayDeque) this.f993d).remove(lifecycleOwner);
((ArrayDeque) this.f993d).push(lifecycleOwner);
}
}
}
Q(lifecycleOwner);
}
} catch (Throwable th) {
throw th;
}
}
}
public void L(LifecycleOwner lifecycleOwner) {
synchronized (this.f992c) {
try {
((ArrayDeque) this.f993d).remove(lifecycleOwner);
P(lifecycleOwner);
if (!((ArrayDeque) this.f993d).isEmpty()) {
Q((LifecycleOwner) ((ArrayDeque) this.f993d).peek());
}
} catch (Throwable th) {
throw th;
}
}
}
public void M(String str, String str2) {
l.e(str, "text");
Intent intent = new Intent();
intent.setAction("android.intent.action.SEND");
intent.setType("text/plain");
intent.putExtra("android.intent.extra.TEXT", str);
if (str2 != null) {
intent.putExtra("android.intent.extra.SUBJECT", str2);
}
Context context = (Context) this.f992c;
Intent createChooser = Intent.createChooser(intent, null, PendingIntent.getBroadcast(context, 0, new Intent(context, (Class<?>) SharePlusPendingIntent.class), ((Number) ((t) this.f996g).getValue()).intValue() | 134217728).getIntentSender());
l.d(createChooser, "chooserIntent");
O(createChooser);
}
public void N(String str, String str2, List list, List list2) {
String str3;
boolean z6;
File t7 = t();
File[] listFiles = t7.listFiles();
if (t7.exists() && listFiles != null && listFiles.length != 0) {
for (File file : listFiles) {
file.delete();
}
t7.delete();
}
ArrayList<? extends Parcelable> arrayList = new ArrayList<>(list.size());
Iterator it = list.iterator();
while (it.hasNext()) {
File file2 = new File((String) it.next());
try {
String canonicalPath = file2.getCanonicalPath();
l.d(canonicalPath, "filePath");
String canonicalPath2 = t().getCanonicalPath();
l.d(canonicalPath2, "shareCacheFolder.canonicalPath");
z6 = x.p(canonicalPath, canonicalPath2, false);
} catch (IOException unused) {
z6 = false;
}
if (z6) {
throw new IOException(AbstractC0007g.D("Shared file can not be located in '", t().getCanonicalPath(), "'"));
}
File t10 = t();
if (!t10.exists()) {
t10.mkdirs();
}
File file3 = new File(t10, file2.getName());
if (!file2.exists()) {
throw new ri.a(file2, (File) null, "The source file doesn't exist.");
}
if (file3.exists() && !file3.delete()) {
throw new ri.a(file2, file3, "Tried to overwrite the destination, but failed to delete it.");
}
if (!file2.isDirectory()) {
File parentFile = file3.getParentFile();
if (parentFile != null) {
parentFile.mkdirs();
}
FileInputStream fileInputStream = new FileInputStream(file2);
try {
FileOutputStream fileOutputStream = new FileOutputStream(file3);
try {
Z3.a(fileInputStream, fileOutputStream, 8192);
AbstractC2551a4.a(fileOutputStream, null);
AbstractC2551a4.a(fileInputStream, null);
} finally {
}
} finally {
}
} else if (!file3.mkdirs()) {
throw new Bd.b(file2, file3, "Failed to create target directory.");
}
arrayList.add(F1.e.getUriForFile(p(), (String) ((t) this.f995f).getValue(), file3));
}
Intent intent = new Intent();
if (arrayList.isEmpty()) {
if (!(str == null || A.A(str))) {
M(str, str2);
return;
}
}
str3 = "*/*";
if (arrayList.size() == 1) {
List list3 = list2;
str3 = list3 == null || list3.isEmpty() ? "*/*" : (String) z.C(list2);
intent.setAction("android.intent.action.SEND");
intent.setType(str3);
intent.putExtra("android.intent.extra.STREAM", (Parcelable) z.C(arrayList));
} else {
intent.setAction("android.intent.action.SEND_MULTIPLE");
if (list2 != null && !list2.isEmpty()) {
if (list2.size() == 1) {
str3 = (String) z.C(list2);
} else {
String str4 = (String) z.C(list2);
int g10 = r.g(list2);
if (1 <= g10) {
int i10 = 1;
while (true) {
if (!l.a(str4, list2.get(i10))) {
if (!s(str4).equals(s((String) list2.get(i10)))) {
break;
} else {
str4 = s((String) list2.get(i10)).concat("/*");
}
}
if (i10 == g10) {
break;
} else {
i10++;
}
}
}
str3 = str4;
}
}
intent.setType(str3);
intent.putParcelableArrayListExtra("android.intent.extra.STREAM", arrayList);
}
if (str != null) {
intent.putExtra("android.intent.extra.TEXT", str);
}
if (str2 != null) {
intent.putExtra("android.intent.extra.SUBJECT", str2);
}
intent.addFlags(1);
Context context = (Context) this.f992c;
Intent createChooser = Intent.createChooser(intent, null, PendingIntent.getBroadcast(context, 0, new Intent(context, (Class<?>) SharePlusPendingIntent.class), ((Number) ((t) this.f996g).getValue()).intValue() | 134217728).getIntentSender());
List<ResolveInfo> queryIntentActivities = p().getPackageManager().queryIntentActivities(createChooser, 65536);
l.d(queryIntentActivities, "getContext().packageMana…CH_DEFAULT_ONLY\n )");
Iterator<T> it2 = queryIntentActivities.iterator();
while (it2.hasNext()) {
String str5 = ((ResolveInfo) it2.next()).activityInfo.packageName;
Iterator<? extends Parcelable> it3 = arrayList.iterator();
while (it3.hasNext()) {
p().grantUriPermission(str5, (Uri) it3.next(), 3);
}
}
l.d(createChooser, "chooserIntent");
O(createChooser);
}
public void O(Intent intent) {
Z7.a aVar;
L l4 = (L) this.f993d;
if (l4 != null) {
l4.startActivityForResult(intent, 22643);
return;
}
intent.addFlags(268435456);
Ne.c cVar = (Ne.c) this.f994e;
if (cVar.d.compareAndSet(false, true) && (aVar = cVar.c) != null) {
aVar.a("dev.fluttercommunity.plus/share/unavailable");
cVar.c = null;
}
((Context) this.f992c).startActivity(intent);
}
public void P(LifecycleOwner lifecycleOwner) {
synchronized (this.f992c) {
try {
P.c r4 = r(lifecycleOwner);
if (r4 == null) {
return;
}
Iterator it = ((Set) ((HashMap) this.f996g).get(r4)).iterator();
while (it.hasNext()) {
P.b bVar = (P.b) ((HashMap) this.f995f).get((P.a) it.next());
bVar.getClass();
bVar.j();
}
} catch (Throwable th) {
throw th;
}
}
}
public void Q(LifecycleOwner lifecycleOwner) {
synchronized (this.f992c) {
try {
Iterator it = ((Set) ((HashMap) this.f996g).get(r(lifecycleOwner))).iterator();
while (it.hasNext()) {
P.b bVar = (P.b) ((HashMap) this.f995f).get((P.a) it.next());
bVar.getClass();
if (!bVar.i().isEmpty()) {
bVar.k();
}
}
} catch (Throwable th) {
throw th;
}
}
}
@Override
public boolean a() {
ArrayList arrayList = (ArrayList) this.f996g;
int size = arrayList.size();
for (int i10 = 0; i10 < size; i10++) {
if (((m) arrayList.get(i10)).f20685a.a()) {
return true;
}
}
return false;
}
@Override
public int b(long j10) {
long[] jArr = (long[]) this.f993d;
int b3 = w2.r.b(jArr, j10, false);
if (b3 < jArr.length) {
return b3;
}
return -1;
}
@Override
public long c(int i10) {
return ((long[]) this.f993d)[i10];
}
@Override
public List d(long j10) {
c cVar = (c) this.f992c;
ArrayList arrayList = new ArrayList();
cVar.g(j10, cVar.f948h, arrayList);
TreeMap treeMap = new TreeMap();
cVar.i(j10, false, cVar.f948h, treeMap);
HashMap hashMap = (HashMap) this.f995f;
cVar.h(j10, (Map) this.f994e, hashMap, cVar.f948h, treeMap);
ArrayList arrayList2 = new ArrayList();
Iterator it = arrayList.iterator();
while (it.hasNext()) {
Pair pair = (Pair) it.next();
String str = (String) ((HashMap) this.f996g).get(pair.second);
if (str != null) {
byte[] decode = Base64.decode(str, 0);
Bitmap decodeByteArray = BitmapFactory.decodeByteArray(decode, 0, decode.length);
f fVar = (f) hashMap.get(pair.first);
fVar.getClass();
arrayList2.add(new v2.b(null, null, null, decodeByteArray, fVar.f966c, 0, fVar.f968e, fVar.f965b, 0, Integer.MIN_VALUE, -3.4028235E38f, fVar.f969f, fVar.f970g, false, -16777216, fVar.f973j, 0.0f));
}
}
for (Map.Entry entry : treeMap.entrySet()) {
f fVar2 = (f) hashMap.get(entry.getKey());
fVar2.getClass();
C3270a c3270a = (C3270a) entry.getValue();
CharSequence charSequence = c3270a.f32940a;
charSequence.getClass();
SpannableStringBuilder spannableStringBuilder = (SpannableStringBuilder) charSequence;
for (a aVar : (a[]) spannableStringBuilder.getSpans(0, spannableStringBuilder.length(), a.class)) {
spannableStringBuilder.replace(spannableStringBuilder.getSpanStart(aVar), spannableStringBuilder.getSpanEnd(aVar), (CharSequence) "");
}
for (int i10 = 0; i10 < spannableStringBuilder.length(); i10++) {
if (spannableStringBuilder.charAt(i10) == ' ') {
int i11 = i10 + 1;
int i12 = i11;
while (i12 < spannableStringBuilder.length() && spannableStringBuilder.charAt(i12) == ' ') {
i12++;
}
int i13 = i12 - i11;
if (i13 > 0) {
spannableStringBuilder.delete(i10, i13 + i10);
}
}
}
if (spannableStringBuilder.length() > 0 && spannableStringBuilder.charAt(0) == ' ') {
spannableStringBuilder.delete(0, 1);
}
for (int i14 = 0; i14 < spannableStringBuilder.length() - 1; i14++) {
if (spannableStringBuilder.charAt(i14) == '\n') {
int i15 = i14 + 1;
if (spannableStringBuilder.charAt(i15) == ' ') {
spannableStringBuilder.delete(i15, i14 + 2);
}
}
}
if (spannableStringBuilder.length() > 0 && spannableStringBuilder.charAt(spannableStringBuilder.length() - 1) == ' ') {
spannableStringBuilder.delete(spannableStringBuilder.length() - 1, spannableStringBuilder.length());
}
for (int i16 = 0; i16 < spannableStringBuilder.length() - 1; i16++) {
if (spannableStringBuilder.charAt(i16) == ' ') {
int i17 = i16 + 1;
if (spannableStringBuilder.charAt(i17) == '\n') {
spannableStringBuilder.delete(i16, i17);
}
}
}
if (spannableStringBuilder.length() > 0 && spannableStringBuilder.charAt(spannableStringBuilder.length() - 1) == '\n') {
spannableStringBuilder.delete(spannableStringBuilder.length() - 1, spannableStringBuilder.length());
}
c3270a.f32944e = fVar2.f966c;
c3270a.f32945f = fVar2.f967d;
c3270a.f32946g = fVar2.f968e;
c3270a.f32947h = fVar2.f965b;
c3270a.f32950l = fVar2.f969f;
c3270a.k = fVar2.f972i;
c3270a.f32949j = fVar2.f971h;
c3270a.f32954p = fVar2.f973j;
arrayList2.add(c3270a.a());
}
return arrayList2;
}
@Override
public int e() {
return ((long[]) this.f993d).length;
}
@Override
public float f() {
return ((Number) this.f994e.getValue()).floatValue();
}
@Override
public float g() {
return ((Number) this.f995f.getValue()).floatValue();
}
public Object getValue() {
K0 k02 = (K0) this.f996g;
if (k02 != null) {
return k02;
}
Q0 q02 = (Q0) ((kotlin.jvm.internal.m) this.f993d).invoke();
M0 m02 = (M0) ((Function0) this.f994e).invoke();
AbstractC2300c abstractC2300c = (AbstractC2300c) ((C0626d) this.f995f).invoke();
l.e(q02, "store");
l.e(m02, "factory");
o0 o0Var = new o0(q02, m02, abstractC2300c);
kotlin.jvm.internal.f fVar = (kotlin.jvm.internal.f) this.f992c;
String b3 = fVar.b();
if (b3 == null) {
throw new IllegalArgumentException("Local and anonymous classes can not be ViewModels");
}
K0 N10 = o0Var.N(fVar, "androidx.lifecycle.ViewModelProvider.DefaultKey:".concat(b3));
this.f996g = N10;
return N10;
}
public void h(Object obj, Object obj2, G0 g02, boolean z6) {
byte[] array;
if (((ConcurrentHashMap) this.f993d) == null) {
throw new IllegalStateException("addPrimitive cannot be called after build");
}
if (obj == null && obj2 == null) {
throw new GeneralSecurityException("at least one of the `fullPrimitive` or `primitive` must be set");
}
if (g02.F() != EnumC0318x0.ENABLED) {
throw new GeneralSecurityException("only ENABLED key is allowed");
}
Integer valueOf = Integer.valueOf(g02.D());
if (g02.E() == X0.RAW) {
valueOf = null;
}
wb.c a2 = com.google.crypto.tink.internal.m.f23755b.a(s.G(g02.C().D(), g02.C().E(), g02.C().C(), g02.E(), valueOf));
int i10 = wb.b.f33619a[g02.E().ordinal()];
if (i10 == 1 || i10 == 2) {
array = ByteBuffer.allocate(5).put((byte) 0).putInt(g02.D()).array();
} else if (i10 == 3) {
array = ByteBuffer.allocate(5).put((byte) 1).putInt(g02.D()).array();
} else {
if (i10 != 4) {
throw new GeneralSecurityException("unknown output prefix type");
}
array = wb.c.f33620a;
}
o oVar = new o(obj, obj2, array, g02.F(), g02.E(), g02.D(), g02.C().D(), a2);
ConcurrentHashMap concurrentHashMap = (ConcurrentHashMap) this.f993d;
ArrayList arrayList = (ArrayList) this.f994e;
ArrayList arrayList2 = new ArrayList();
arrayList2.add(oVar);
byte[] bArr = oVar.f33637c;
p pVar = new p(bArr != null ? Arrays.copyOf(bArr, bArr.length) : null);
List list = (List) concurrentHashMap.put(pVar, Collections.unmodifiableList(arrayList2));
if (list != null) {
ArrayList arrayList3 = new ArrayList();
arrayList3.addAll(list);
arrayList3.add(oVar);
concurrentHashMap.put(pVar, Collections.unmodifiableList(arrayList3));
}
arrayList.add(oVar);
if (z6) {
if (((o) this.f995f) != null) {
throw new IllegalStateException("you cannot set two primary primitives");
}
this.f995f = oVar;
}
}
public void i(P.b bVar, List list, List list2, B.a aVar) {
L l4;
synchronized (this.f992c) {
Q1.g.c(!list2.isEmpty());
this.f994e = aVar;
synchronized (bVar.f9180c) {
l4 = bVar.f9181d;
}
Set set = (Set) ((HashMap) this.f996g).get(r(l4));
B.a aVar2 = (B.a) this.f994e;
if (aVar2 == null || aVar2.f812d != 2) {
Iterator it = set.iterator();
while (it.hasNext()) {
P.b bVar2 = (P.b) ((HashMap) this.f995f).get((P.a) it.next());
bVar2.getClass();
if (!bVar2.equals(bVar) && !bVar2.i().isEmpty()) {
throw new IllegalArgumentException("Multiple LifecycleCameras with use cases are registered to the same LifecycleOwner.");
}
}
}
try {
synchronized (bVar.f9182e.f6085l) {
}
I.g gVar = bVar.f9182e;
synchronized (gVar.f6085l) {
gVar.f6084j = list;
}
bVar.g(list2);
if (l4.getLifecycle().getCurrentState().a(I.STARTED)) {
K(l4);
}
} catch (I.d e10) {
throw new IllegalArgumentException(e10.getMessage());
}
}
}
public S j() {
String str = ((Long) this.f992c) == null ? " pc" : "";
if (((String) this.f993d) == null) {
str = str.concat(" symbol");
}
if (((Long) this.f995f) == null) {
str = AbstractC0473a.n(str, " offset");
}
if (((Integer) this.f996g) == null) {
str = AbstractC0473a.n(str, " importance");
}
if (str.isEmpty()) {
return new S(((Long) this.f992c).longValue(), (String) this.f993d, (String) this.f994e, ((Long) this.f995f).longValue(), ((Integer) this.f996g).intValue());
}
throw new IllegalStateException("Missing required properties:".concat(str));
}
public void l() {
R3.a();
A4.m mVar = (A4.m) this.f993d;
mVar.getClass();
R3.a();
E.a aVar = (E.a) mVar.f511d;
Objects.requireNonNull(aVar);
b0 b0Var = (b0) mVar.f510c;
Objects.requireNonNull(b0Var);
h0 h0Var = aVar.f3607a;
Objects.requireNonNull(h0Var);
h0Var.a();
h0 h0Var2 = aVar.f3607a;
Objects.requireNonNull(h0Var2);
H.g.d(h0Var2.f17444e).addListener(new RunnableC1985c(b0Var, 18), Y3.d());
((fb.e) this.f994e).getClass();
((C0002b) this.f995f).getClass();
}
public a0 n() {
SurfaceTexture surfaceTexture = new SurfaceTexture(0);
Size size = (Size) this.f995f;
surfaceTexture.setDefaultBufferSize(size.getWidth(), size.getHeight());
Surface surface = new Surface(surfaceTexture);
X e10 = X.e((P) this.f994e, size);
e10.f17489b.f17572c = 1;
h0 h0Var = new h0(surface);
this.f992c = h0Var;
InterfaceFutureC3287b d9 = H.g.d(h0Var.f17444e);
M m6 = new M(9, surface, surfaceTexture);
d9.addListener(new H.f(0, d9, m6), Y3.a());
e10.b((h0) this.f992c, C0157w.f2890d);
e10.f17492e.add(new Y() {
@Override
public final void a() {
B3.h hVar = B3.h.this;
hVar.f993d = hVar.n();
C3312k c3312k = (C3312k) hVar.f996g;
if (c3312k != null) {
C3318q c3318q = c3312k.f33276c;
c3318q.getClass();
try {
if (((Boolean) D4.b(new C3312k(c3318q)).f32752d.get()).booleanValue()) {
B3.h hVar2 = c3318q.f33310t;
c3318q.f33296e.execute(new RunnableC3313l(c3318q, C3318q.m(hVar2), (androidx.camera.core.impl.a0) hVar2.f993d, (P) hVar2.f994e, 0));
}
} catch (InterruptedException | ExecutionException e11) {
throw new RuntimeException("Unable to check if MeteringRepeating is attached.", e11);
}
}
}
});
return e10.d();
}
public df.o o() {
if (((of.g) this.f994e) == null) {
this.f994e = new of.g(this);
}
of.g gVar = (of.g) this.f994e;
l.b(gVar);
return gVar;
}
public Context p() {
L l4 = (L) this.f993d;
return l4 != null ? l4 : (Context) this.f992c;
}
public P.c r(LifecycleOwner lifecycleOwner) {
synchronized (this.f992c) {
try {
for (P.c cVar : ((HashMap) this.f996g).keySet()) {
if (lifecycleOwner.equals(cVar.f9185d)) {
return cVar;
}
}
return null;
} catch (Throwable th) {
throw th;
}
}
}
public File t() {
return new File(p().getCacheDir(), "share_plus");
}
public K7.m u(java.lang.String r9) {
throw new UnsupportedOperationException("Method not decompiled: B3.h.u(java.lang.String):K7.m");
}
public Hh.a v() {
return new Hh.a((C2622m3) this.f993d, (Th.c) this.f995f, (Th.d) this.f996g);
}
public void w(boolean z6) {
((T4.c) this.f992c).w(new T4.e(z6 ? Bh.b.PUSH_RETRYABLE_ERROR : Bh.b.PUSH_NON_RETRYABLE_ERROR, 3));
((Th.d) this.f996g).m(new Sh.a(Rh.b.SSE_CONNECTION_ERROR, Long.valueOf((z6 ? Sh.b.REQUESTED : Sh.b.NON_REQUESTED).a()), System.currentTimeMillis()));
}
public void x(HashMap hashMap) {
StringBuilder sb2;
String str = (String) hashMap.get("data");
if (str != null) {
NotificationParser notificationParser = (NotificationParser) this.f993d;
if (notificationParser.isError(hashMap)) {
try {
StreamingError parseError = notificationParser.parseError(str);
Uh.a.G("Streaming error notification received: " + parseError.getMessage());
if (parseError.shouldBeIgnored()) {
Uh.a.G("Error ignored");
return;
}
((Th.d) this.f996g).m(new Sh.a(Rh.b.ABLY_ERROR, Long.valueOf(parseError.getCode()), System.currentTimeMillis()));
((T4.c) this.f992c).w(new T4.e(parseError.isRetryable() ? Bh.b.PUSH_RETRYABLE_ERROR : Bh.b.PUSH_NON_RETRYABLE_ERROR, 3));
return;
} catch (Exception e10) {
ch.g.u(e10, new StringBuilder("Unexpected error while processing occupancy notification: "));
return;
} catch (w e11) {
StringBuilder m6 = ch.g.m("Could not parse occupancy notification: ", str, " -> ");
m6.append(e11.getLocalizedMessage());
Uh.a.s(m6.toString());
return;
}
}
IncomingNotification parseIncoming = notificationParser.parseIncoming(str);
if (parseIncoming == null) {
return;
}
int i10 = Dh.n.a[parseIncoming.getType().ordinal()];
Dh.d dVar = (Dh.d) this.f995f;
switch (i10) {
case 1:
try {
ControlNotification parseControl = notificationParser.parseControl(parseIncoming.getJsonData());
parseControl.setTimestamp(parseIncoming.getTimestamp());
dVar.a(parseControl);
return;
} catch (Exception e12) {
e = e12;
sb2 = new StringBuilder("Unexpected error while processing control notification: ");
break;
} catch (w e13) {
Uh.a.s("Could not parse control notification: " + parseIncoming.getJsonData() + " -> " + e13.getLocalizedMessage());
return;
}
case 2:
try {
OccupancyNotification parseOccupancy = notificationParser.parseOccupancy(parseIncoming.getJsonData());
parseOccupancy.setChannel(parseIncoming.getChannel());
parseOccupancy.setTimestamp(parseIncoming.getTimestamp());
dVar.b(parseOccupancy);
return;
} catch (Exception e14) {
e = e14;
sb2 = new StringBuilder("Unexpected error while processing occupancy notification: ");
break;
} catch (w e15) {
Uh.a.s("Could not parse occupancy notification: " + parseIncoming.getJsonData() + " -> " + e15.getLocalizedMessage());
return;
}
case 3:
case 4:
case 5:
case 6:
if (dVar.d.get()) {
((NotificationProcessor) this.f994e).process(parseIncoming);
return;
}
return;
default:
Uh.a.G("SSE Handler: Unknown notification");
return;
}
ch.g.u(e, sb2);
}
}
public boolean y(LifecycleOwner lifecycleOwner) {
synchronized (this.f992c) {
try {
P.c r4 = r(lifecycleOwner);
if (r4 == null) {
return false;
}
Iterator it = ((Set) ((HashMap) this.f996g).get(r4)).iterator();
while (it.hasNext()) {
P.b bVar = (P.b) ((HashMap) this.f995f).get((P.a) it.next());
bVar.getClass();
if (!bVar.i().isEmpty()) {
return true;
}
}
return false;
} catch (Throwable th) {
throw th;
}
}
}
public boolean z(HashMap hashMap) {
if (hashMap.get("data") != null && hashMap.get("data") == null && hashMap.get("event") == null) {
return true;
}
return (hashMap.get("data") == null || ((NotificationParser) this.f993d).isError(hashMap)) ? false : true;
}
public h(c cVar, HashMap hashMap, HashMap hashMap2, HashMap hashMap3) {
this.f992c = cVar;
this.f995f = hashMap2;
this.f996g = hashMap3;
this.f994e = Collections.unmodifiableMap(hashMap);
TreeSet treeSet = new TreeSet();
int i10 = 0;
cVar.d(treeSet, false);
long[] jArr = new long[treeSet.size()];
Iterator it = treeSet.iterator();
while (it.hasNext()) {
jArr[i10] = ((Long) it.next()).longValue();
i10++;
}
this.f993d = jArr;
}
public h(C1377e c1377e, D d9, List list, InterfaceC2722b interfaceC2722b, InterfaceC1883m interfaceC1883m) {
int i10;
String str;
c1.o oVar;
List list2;
int i11;
ArrayList arrayList;
int i12;
ArrayList arrayList2;
int i13;
int i14;
C1377e c1377e2 = c1377e;
this.f992c = c1377e2;
this.f993d = list;
gi.l lVar = gi.l.NONE;
this.f994e = k.a(lVar, new c1.k(this, 1));
this.f995f = k.a(lVar, new c1.k(this, 0));
c1.o oVar2 = d9.f20640b;
C1377e c1377e3 = AbstractC1378f.f20663a;
int length = c1377e2.f20659c.length();
List list3 = B.c;
List list4 = c1377e2.f20661e;
list4 = list4 == null ? list3 : list4;
ArrayList arrayList3 = new ArrayList();
int size = list4.size();
int i15 = 0;
int i16 = 0;
while (i15 < size) {
C1376d c1376d = (C1376d) list4.get(i15);
c1.o oVar3 = (c1.o) c1376d.f20655a;
int i17 = c1376d.f20656b;
if (i17 != i16) {
arrayList3.add(new C1376d(oVar2, i16, i17));
}
c1.o a2 = oVar2.a(oVar3);
int i18 = c1376d.f20657c;
arrayList3.add(new C1376d(a2, i17, i18));
i15++;
i16 = i18;
}
if (i16 != length) {
arrayList3.add(new C1376d(oVar2, i16, length));
}
if (arrayList3.isEmpty()) {
i10 = 0;
arrayList3.add(new C1376d(oVar2, 0, 0));
} else {
i10 = 0;
}
ArrayList arrayList4 = new ArrayList(arrayList3.size());
int size2 = arrayList3.size();
int i19 = i10;
while (i19 < size2) {
C1376d c1376d2 = (C1376d) arrayList3.get(i19);
int i20 = c1376d2.f20656b;
int i21 = c1376d2.f20657c;
if (i20 != i21) {
str = c1377e2.f20659c.substring(i20, i21);
l.d(str, "this as java.lang.String…ing(startIndex, endIndex)");
} else {
str = "";
}
String str2 = str;
List b3 = AbstractC1378f.b(c1377e2, i20, i21);
c1.o oVar4 = (c1.o) c1376d2.f20655a;
if (n1.k.a(oVar4.f20689b, Integer.MIN_VALUE)) {
oVar = oVar2;
list2 = list3;
i11 = size2;
arrayList = arrayList3;
i12 = i19;
arrayList2 = arrayList4;
oVar4 = new c1.o(oVar4.f20688a, oVar2.f20689b, oVar4.f20690c, oVar4.f20691d, oVar4.f20692e, oVar4.f20693f, oVar4.f20694g, oVar4.f20695h, oVar4.f20696i);
} else {
oVar = oVar2;
arrayList2 = arrayList4;
list2 = list3;
i11 = size2;
arrayList = arrayList3;
i12 = i19;
}
D d10 = new D(d9.f20639a, d9.f20640b.a(oVar4));
List list5 = b3 == null ? list2 : b3;
List list6 = (List) this.f993d;
ArrayList arrayList5 = new ArrayList(list6.size());
int size3 = list6.size();
int i22 = 0;
while (true) {
i13 = c1376d2.f20656b;
if (i22 >= size3) {
break;
}
Object obj = list6.get(i22);
C1376d c1376d3 = (C1376d) obj;
if (AbstractC1378f.c(i13, i21, c1376d3.f20656b, c1376d3.f20657c)) {
arrayList5.add(obj);
}
i22++;
}
ArrayList arrayList6 = new ArrayList(arrayList5.size());
int size4 = arrayList5.size();
for (int i23 = 0; i23 < size4; i23++) {
C1376d c1376d4 = (C1376d) arrayList5.get(i23);
int i24 = c1376d4.f20656b;
if (i13 <= i24 && (i14 = c1376d4.f20657c) <= i21) {
arrayList6.add(new C1376d(c1376d4.f20655a, i24 - i13, i14 - i13));
} else {
throw new IllegalArgumentException("placeholder can not overlap with paragraph.");
}
}
m mVar = new m(new k1.c(str2, d10, list5, arrayList6, interfaceC1883m, interfaceC2722b), i13, i21);
ArrayList arrayList7 = arrayList2;
arrayList7.add(mVar);
i19 = i12 + 1;
arrayList4 = arrayList7;
oVar2 = oVar;
list3 = list2;
size2 = i11;
arrayList3 = arrayList;
c1377e2 = c1377e;
}
this.f996g = arrayList4;
}
}