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

438 lines
20 KiB
Java

package o;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ResolveInfo;
import android.database.DataSetObservable;
import android.os.AsyncTask;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
/* loaded from: classes.dex */
public class ykw extends DataSetObservable {
static final String b = "ActivityChooserModel";
public final List<HBt> a;
final Context c;
public IeS d;
boolean e;
public final Object f;
public boolean g;
public final List<LWm> h;
public final String i;
public boolean j;
private Intent k;
private boolean l;
/* renamed from: o, reason: collision with root package name */
private int f9322o;
/* loaded from: classes.dex */
public interface IeS {
}
static {
new HashMap();
}
public final int d() {
int size;
synchronized (this.f) {
c();
size = this.a.size();
}
return size;
}
public final ResolveInfo fs_(int i) {
ResolveInfo resolveInfo;
synchronized (this.f) {
c();
resolveInfo = this.a.get(i).a;
}
return resolveInfo;
}
public final int ft_(ResolveInfo resolveInfo) {
synchronized (this.f) {
c();
List<HBt> list = this.a;
int size = list.size();
for (int i = 0; i < size; i++) {
if (list.get(i).a == resolveInfo) {
return i;
}
}
return -1;
}
}
public final Intent fr_() {
synchronized (this.f) {
}
return null;
}
public final ResolveInfo fu_() {
synchronized (this.f) {
c();
if (this.a.isEmpty()) {
return null;
}
return this.a.get(0).a;
}
}
public final int g() {
int size;
synchronized (this.f) {
c();
size = this.h.size();
}
return size;
}
/* JADX WARN: Code restructure failed: missing block: B:43:0x009e, code lost:
r2.close();
*/
/* JADX WARN: Code restructure failed: missing block: B:48:0x0098, code lost:
if (r2 != null) goto L41;
*/
/* JADX WARN: Code restructure failed: missing block: B:49:0x009b, code lost:
if (r2 == null) goto L42;
*/
/* JADX WARN: Removed duplicated region for block: B:60:0x00a7 */
/* JADX WARN: Removed duplicated region for block: B:62:? A[RETURN, SYNTHETIC] */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void c() {
/*
r9 = this;
boolean r0 = r9.e
r1 = 0
if (r0 == 0) goto La2
boolean r0 = r9.j
if (r0 == 0) goto La2
java.lang.String r0 = r9.i
boolean r0 = android.text.TextUtils.isEmpty(r0)
if (r0 != 0) goto La2
r9.e = r1
r0 = 1
r9.g = r0
android.content.Context r2 = r9.c // Catch: java.lang.Throwable -> La1
java.lang.String r3 = r9.i // Catch: java.lang.Throwable -> La1
java.io.FileInputStream r2 = r2.openFileInput(r3) // Catch: java.lang.Throwable -> La1
org.xmlpull.v1.XmlPullParser r3 = android.util.Xml.newPullParser() // Catch: java.lang.Throwable -> L91 java.io.IOException -> L98 org.xmlpull.v1.XmlPullParserException -> L9b
java.lang.String r4 = "UTF-8"
r3.setInput(r2, r4) // Catch: java.lang.Throwable -> L91 java.io.IOException -> L98 org.xmlpull.v1.XmlPullParserException -> L9b
L27:
if (r1 == r0) goto L31
r4 = 2
if (r1 == r4) goto L31
int r1 = r3.next() // Catch: java.lang.Throwable -> L91 java.io.IOException -> L98 org.xmlpull.v1.XmlPullParserException -> L9b
goto L27
L31:
java.lang.String r1 = "historical-records"
java.lang.String r4 = r3.getName() // Catch: java.lang.Throwable -> L91 java.io.IOException -> L98 org.xmlpull.v1.XmlPullParserException -> L9b
boolean r1 = r1.equals(r4) // Catch: java.lang.Throwable -> L91 java.io.IOException -> L98 org.xmlpull.v1.XmlPullParserException -> L9b
if (r1 == 0) goto L89
java.util.List<o.ykw$LWm> r1 = r9.h // Catch: java.lang.Throwable -> L91 java.io.IOException -> L98 org.xmlpull.v1.XmlPullParserException -> L9b
r1.clear() // Catch: java.lang.Throwable -> L91 java.io.IOException -> L98 org.xmlpull.v1.XmlPullParserException -> L9b
L42:
int r4 = r3.next() // Catch: java.lang.Throwable -> L91 java.io.IOException -> L98 org.xmlpull.v1.XmlPullParserException -> L9b
if (r4 != r0) goto L4b
if (r2 == 0) goto La1
goto L9e
L4b:
r5 = 3
if (r4 == r5) goto L42
r5 = 4
if (r4 == r5) goto L42
java.lang.String r4 = r3.getName() // Catch: java.lang.Throwable -> L91 java.io.IOException -> L98 org.xmlpull.v1.XmlPullParserException -> L9b
java.lang.String r5 = "historical-record"
boolean r4 = r5.equals(r4) // Catch: java.lang.Throwable -> L91 java.io.IOException -> L98 org.xmlpull.v1.XmlPullParserException -> L9b
if (r4 == 0) goto L81
java.lang.String r4 = "activity"
r5 = 0
java.lang.String r4 = r3.getAttributeValue(r5, r4) // Catch: java.lang.Throwable -> L91 java.io.IOException -> L98 org.xmlpull.v1.XmlPullParserException -> L9b
java.lang.String r6 = "time"
java.lang.String r6 = r3.getAttributeValue(r5, r6) // Catch: java.lang.Throwable -> L91 java.io.IOException -> L98 org.xmlpull.v1.XmlPullParserException -> L9b
long r6 = java.lang.Long.parseLong(r6) // Catch: java.lang.Throwable -> L91 java.io.IOException -> L98 org.xmlpull.v1.XmlPullParserException -> L9b
java.lang.String r8 = "weight"
java.lang.String r5 = r3.getAttributeValue(r5, r8) // Catch: java.lang.Throwable -> L91 java.io.IOException -> L98 org.xmlpull.v1.XmlPullParserException -> L9b
float r5 = java.lang.Float.parseFloat(r5) // Catch: java.lang.Throwable -> L91 java.io.IOException -> L98 org.xmlpull.v1.XmlPullParserException -> L9b
o.ykw$LWm r8 = new o.ykw$LWm // Catch: java.lang.Throwable -> L91 java.io.IOException -> L98 org.xmlpull.v1.XmlPullParserException -> L9b
r8.<init>(r4, r6, r5) // Catch: java.lang.Throwable -> L91 java.io.IOException -> L98 org.xmlpull.v1.XmlPullParserException -> L9b
r1.add(r8) // Catch: java.lang.Throwable -> L91 java.io.IOException -> L98 org.xmlpull.v1.XmlPullParserException -> L9b
goto L42
L81:
org.xmlpull.v1.XmlPullParserException r1 = new org.xmlpull.v1.XmlPullParserException // Catch: java.lang.Throwable -> L91 java.io.IOException -> L98 org.xmlpull.v1.XmlPullParserException -> L9b
java.lang.String r3 = "Share records file not well-formed."
r1.<init>(r3) // Catch: java.lang.Throwable -> L91 java.io.IOException -> L98 org.xmlpull.v1.XmlPullParserException -> L9b
throw r1 // Catch: java.lang.Throwable -> L91 java.io.IOException -> L98 org.xmlpull.v1.XmlPullParserException -> L9b
L89:
org.xmlpull.v1.XmlPullParserException r1 = new org.xmlpull.v1.XmlPullParserException // Catch: java.lang.Throwable -> L91 java.io.IOException -> L98 org.xmlpull.v1.XmlPullParserException -> L9b
java.lang.String r3 = "Share records file does not start with historical-records tag."
r1.<init>(r3) // Catch: java.lang.Throwable -> L91 java.io.IOException -> L98 org.xmlpull.v1.XmlPullParserException -> L9b
throw r1 // Catch: java.lang.Throwable -> L91 java.io.IOException -> L98 org.xmlpull.v1.XmlPullParserException -> L9b
L91:
r0 = move-exception
if (r2 == 0) goto L97
r2.close() // Catch: java.io.IOException -> L97
L97:
throw r0
L98:
if (r2 == 0) goto La1
goto L9e
L9b:
if (r2 != 0) goto L9e
goto La1
L9e:
r2.close()
La1:
r1 = r0
La2:
r9.e()
if (r1 == 0) goto Laa
r9.notifyChanged()
Laa:
return
*/
throw new UnsupportedOperationException("Method not decompiled: o.ykw.c():void");
}
public final void e() {
int size = this.h.size() - this.f9322o;
if (size <= 0) {
return;
}
this.j = true;
for (int i = 0; i < size; i++) {
this.h.remove(0);
}
}
/* loaded from: classes.dex */
public static final class LWm {
public final ComponentName a;
public final float b;
public final long d;
public LWm(String str, long j, float f) {
this(ComponentName.unflattenFromString(str), j, f);
}
public LWm(ComponentName componentName, long j, float f) {
this.a = componentName;
this.d = j;
this.b = f;
}
public final int hashCode() {
ComponentName componentName = this.a;
int hashCode = componentName == null ? 0 : componentName.hashCode();
long j = this.d;
return ((((hashCode + 31) * 31) + ((int) (j ^ (j >>> 32)))) * 31) + Float.floatToIntBits(this.b);
}
public final boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
LWm lWm = (LWm) obj;
ComponentName componentName = this.a;
if (componentName == null) {
if (lWm.a != null) {
return false;
}
} else if (!componentName.equals(lWm.a)) {
return false;
}
return this.d == lWm.d && Float.floatToIntBits(this.b) == Float.floatToIntBits(lWm.b);
}
public final String toString() {
StringBuilder sb = new StringBuilder("[; activity:");
sb.append(this.a);
sb.append("; time:");
sb.append(this.d);
sb.append("; weight:");
sb.append(new BigDecimal(this.b));
sb.append("]");
return sb.toString();
}
}
/* loaded from: classes.dex */
public static final class HBt implements Comparable<HBt> {
public final ResolveInfo a;
public float e;
@Override // java.lang.Comparable
public final /* synthetic */ int compareTo(HBt hBt) {
return Float.floatToIntBits(hBt.e) - Float.floatToIntBits(this.e);
}
public final int hashCode() {
return Float.floatToIntBits(BitmapDescriptorFactory.HUE_RED) + 31;
}
public final boolean equals(Object obj) {
if (this == obj) {
return true;
}
return obj != null && getClass() == obj.getClass() && Float.floatToIntBits(BitmapDescriptorFactory.HUE_RED) == Float.floatToIntBits(((HBt) obj).e);
}
public final String toString() {
StringBuilder sb = new StringBuilder("[resolveInfo:");
sb.append(this.a.toString());
sb.append("; weight:");
sb.append(new BigDecimal(0.0d));
sb.append("]");
return sb.toString();
}
}
/* loaded from: classes.dex */
public final class Sts extends AsyncTask<Object, Void, Void> {
final ykw a;
public Sts(ykw ykwVar) {
this.a = ykwVar;
}
/* JADX INFO: Access modifiers changed from: private */
/* JADX WARN: Code restructure failed: missing block: B:12:0x0069, code lost:
if (r14 != null) goto L36;
*/
/* JADX WARN: Code restructure failed: missing block: B:16:0x0095, code lost:
r14.close();
*/
/* JADX WARN: Code restructure failed: missing block: B:30:0x0085, code lost:
if (r14 == null) goto L27;
*/
/* JADX WARN: Code restructure failed: missing block: B:33:0x0078, code lost:
if (r14 == null) goto L27;
*/
/* JADX WARN: Code restructure failed: missing block: B:36:0x0092, code lost:
if (r14 != null) goto L36;
*/
@Override // android.os.AsyncTask
/* renamed from: c, reason: merged with bridge method [inline-methods] */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public java.lang.Void doInBackground(java.lang.Object... r14) {
/*
r13 = this;
java.lang.String r0 = "historical-record"
java.lang.String r1 = "historical-records"
r2 = 0
r3 = r14[r2]
java.util.List r3 = (java.util.List) r3
r4 = 1
r14 = r14[r4]
java.lang.String r14 = (java.lang.String) r14
r5 = 0
o.ykw r6 = r13.a // Catch: java.io.FileNotFoundException -> La3
android.content.Context r6 = r6.c // Catch: java.io.FileNotFoundException -> La3
java.io.FileOutputStream r14 = r6.openFileOutput(r14, r2) // Catch: java.io.FileNotFoundException -> La3
org.xmlpull.v1.XmlSerializer r6 = android.util.Xml.newSerializer()
r6.setOutput(r14, r5) // Catch: java.lang.Throwable -> L6c java.io.IOException -> L6e java.lang.IllegalStateException -> L7b java.lang.IllegalArgumentException -> L88
java.lang.String r7 = "UTF-8"
java.lang.Boolean r8 = java.lang.Boolean.TRUE // Catch: java.lang.Throwable -> L6c java.io.IOException -> L6e java.lang.IllegalStateException -> L7b java.lang.IllegalArgumentException -> L88
r6.startDocument(r7, r8) // Catch: java.lang.Throwable -> L6c java.io.IOException -> L6e java.lang.IllegalStateException -> L7b java.lang.IllegalArgumentException -> L88
r6.startTag(r5, r1) // Catch: java.lang.Throwable -> L6c java.io.IOException -> L6e java.lang.IllegalStateException -> L7b java.lang.IllegalArgumentException -> L88
int r7 = r3.size() // Catch: java.lang.Throwable -> L6c java.io.IOException -> L6e java.lang.IllegalStateException -> L7b java.lang.IllegalArgumentException -> L88
r8 = r2
L2d:
if (r8 >= r7) goto L5f
java.lang.Object r9 = r3.remove(r2) // Catch: java.lang.Throwable -> L6c java.io.IOException -> L6e java.lang.IllegalStateException -> L7b java.lang.IllegalArgumentException -> L88
o.ykw$LWm r9 = (o.ykw.LWm) r9 // Catch: java.lang.Throwable -> L6c java.io.IOException -> L6e java.lang.IllegalStateException -> L7b java.lang.IllegalArgumentException -> L88
r6.startTag(r5, r0) // Catch: java.lang.Throwable -> L6c java.io.IOException -> L6e java.lang.IllegalStateException -> L7b java.lang.IllegalArgumentException -> L88
android.content.ComponentName r10 = r9.a // Catch: java.lang.Throwable -> L6c java.io.IOException -> L6e java.lang.IllegalStateException -> L7b java.lang.IllegalArgumentException -> L88
java.lang.String r10 = r10.flattenToString() // Catch: java.lang.Throwable -> L6c java.io.IOException -> L6e java.lang.IllegalStateException -> L7b java.lang.IllegalArgumentException -> L88
java.lang.String r11 = "activity"
r6.attribute(r5, r11, r10) // Catch: java.lang.Throwable -> L6c java.io.IOException -> L6e java.lang.IllegalStateException -> L7b java.lang.IllegalArgumentException -> L88
java.lang.String r10 = "time"
long r11 = r9.d // Catch: java.lang.Throwable -> L6c java.io.IOException -> L6e java.lang.IllegalStateException -> L7b java.lang.IllegalArgumentException -> L88
java.lang.String r11 = java.lang.String.valueOf(r11) // Catch: java.lang.Throwable -> L6c java.io.IOException -> L6e java.lang.IllegalStateException -> L7b java.lang.IllegalArgumentException -> L88
r6.attribute(r5, r10, r11) // Catch: java.lang.Throwable -> L6c java.io.IOException -> L6e java.lang.IllegalStateException -> L7b java.lang.IllegalArgumentException -> L88
java.lang.String r10 = "weight"
float r9 = r9.b // Catch: java.lang.Throwable -> L6c java.io.IOException -> L6e java.lang.IllegalStateException -> L7b java.lang.IllegalArgumentException -> L88
java.lang.String r9 = java.lang.String.valueOf(r9) // Catch: java.lang.Throwable -> L6c java.io.IOException -> L6e java.lang.IllegalStateException -> L7b java.lang.IllegalArgumentException -> L88
r6.attribute(r5, r10, r9) // Catch: java.lang.Throwable -> L6c java.io.IOException -> L6e java.lang.IllegalStateException -> L7b java.lang.IllegalArgumentException -> L88
r6.endTag(r5, r0) // Catch: java.lang.Throwable -> L6c java.io.IOException -> L6e java.lang.IllegalStateException -> L7b java.lang.IllegalArgumentException -> L88
int r8 = r8 + 1
goto L2d
L5f:
r6.endTag(r5, r1) // Catch: java.lang.Throwable -> L6c java.io.IOException -> L6e java.lang.IllegalStateException -> L7b java.lang.IllegalArgumentException -> L88
r6.endDocument() // Catch: java.lang.Throwable -> L6c java.io.IOException -> L6e java.lang.IllegalStateException -> L7b java.lang.IllegalArgumentException -> L88
o.ykw r0 = r13.a
r0.e = r4
if (r14 == 0) goto L98
goto L95
L6c:
r0 = move-exception
goto L99
L6e:
java.lang.String r0 = o.ykw.b // Catch: java.lang.Throwable -> L6c
o.ykw r0 = r13.a // Catch: java.lang.Throwable -> L6c
java.lang.String r0 = r0.i // Catch: java.lang.Throwable -> L6c
o.ykw r0 = r13.a
r0.e = r4
if (r14 == 0) goto L98
goto L95
L7b:
java.lang.String r0 = o.ykw.b // Catch: java.lang.Throwable -> L6c
o.ykw r0 = r13.a // Catch: java.lang.Throwable -> L6c
java.lang.String r0 = r0.i // Catch: java.lang.Throwable -> L6c
o.ykw r0 = r13.a
r0.e = r4
if (r14 == 0) goto L98
goto L95
L88:
java.lang.String r0 = o.ykw.b // Catch: java.lang.Throwable -> L6c
o.ykw r0 = r13.a // Catch: java.lang.Throwable -> L6c
java.lang.String r0 = r0.i // Catch: java.lang.Throwable -> L6c
o.ykw r0 = r13.a
r0.e = r4
if (r14 != 0) goto L95
goto L98
L95:
r14.close() // Catch: java.io.IOException -> L98
L98:
return r5
L99:
o.ykw r1 = r13.a
r1.e = r4
if (r14 == 0) goto La2
r14.close() // Catch: java.io.IOException -> La2
La2:
throw r0
La3:
java.lang.String r14 = o.ykw.b
return r5
*/
throw new UnsupportedOperationException("Method not decompiled: o.ykw.Sts.doInBackground(java.lang.Object[]):java.lang.Void");
}
}
}