what-the-bank/sources/com/google/android/gms/internal/vision/zzm.java

133 lines
7.9 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.gms.internal.vision;
import android.content.Context;
import android.os.RemoteException;
import android.util.Log;
import com.google.android.gms.dynamite.DynamiteModule;
/* loaded from: classes2.dex */
public abstract class zzm<T> {
private static String PREFIX = "com.google.android.gms.vision.dynamite";
private final String tag;
private final String zzdh;
private final String zzdi;
private T zzdk;
private final Context zze;
private final Object lock = new Object();
private boolean zzdj = false;
public zzm(Context context, String str, String str2) {
this.zze = context;
this.tag = str;
String str3 = PREFIX;
StringBuilder sb = new StringBuilder(String.valueOf(str3).length() + 1 + String.valueOf(str2).length());
sb.append(str3);
sb.append(".");
sb.append(str2);
this.zzdh = sb.toString();
this.zzdi = PREFIX;
}
protected abstract T zza(DynamiteModule dynamiteModule, Context context) throws RemoteException, DynamiteModule.LoadingException;
protected abstract void zzm() throws RemoteException;
public final boolean isOperational() {
return zzq() != null;
}
public final void zzp() {
synchronized (this.lock) {
if (this.zzdk == null) {
return;
}
try {
zzm();
} catch (RemoteException e) {
Log.e(this.tag, "Could not finalize native handle", e);
}
}
}
/* JADX WARN: Removed duplicated region for block: B:16:0x0048 A[Catch: all -> 0x0068, TryCatch #1 {, blocks: (B:4:0x0003, B:6:0x0007, B:10:0x0009, B:12:0x0033, B:14:0x0044, B:16:0x0048, B:18:0x004c, B:19:0x0064, B:20:0x0066, B:23:0x0059, B:25:0x005d, B:34:0x003d, B:27:0x0016, B:29:0x001d, B:32:0x0029), top: B:3:0x0003 }] */
/* JADX WARN: Removed duplicated region for block: B:23:0x0059 A[Catch: all -> 0x0068, TryCatch #1 {, blocks: (B:4:0x0003, B:6:0x0007, B:10:0x0009, B:12:0x0033, B:14:0x0044, B:16:0x0048, B:18:0x004c, B:19:0x0064, B:20:0x0066, B:23:0x0059, B:25:0x005d, B:34:0x003d, B:27:0x0016, B:29:0x001d, B:32:0x0029), top: B:3:0x0003 }] */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final T zzq() {
/*
r4 = this;
java.lang.Object r0 = r4.lock
monitor-enter(r0)
T r1 = r4.zzdk // Catch: java.lang.Throwable -> L68
if (r1 == 0) goto L9
monitor-exit(r0) // Catch: java.lang.Throwable -> L68
return r1
L9:
android.content.Context r1 = r4.zze // Catch: android.os.RemoteException -> L14 com.google.android.gms.dynamite.DynamiteModule.LoadingException -> L16 java.lang.Throwable -> L68
com.google.android.gms.dynamite.DynamiteModule$VersionPolicy r2 = com.google.android.gms.dynamite.DynamiteModule.PREFER_HIGHEST_OR_REMOTE_VERSION // Catch: android.os.RemoteException -> L14 com.google.android.gms.dynamite.DynamiteModule.LoadingException -> L16 java.lang.Throwable -> L68
java.lang.String r3 = r4.zzdh // Catch: android.os.RemoteException -> L14 com.google.android.gms.dynamite.DynamiteModule.LoadingException -> L16 java.lang.Throwable -> L68
com.google.android.gms.dynamite.DynamiteModule r1 = com.google.android.gms.dynamite.DynamiteModule.load(r1, r2, r3) // Catch: android.os.RemoteException -> L14 com.google.android.gms.dynamite.DynamiteModule.LoadingException -> L16 java.lang.Throwable -> L68
goto L31
L14:
r1 = move-exception
goto L3d
L16:
java.lang.String r1 = r4.tag // Catch: android.os.RemoteException -> L14 com.google.android.gms.dynamite.DynamiteModule.LoadingException -> L3c java.lang.Throwable -> L68
java.lang.String r2 = "Cannot load feature, fall back to load whole module."
android.util.Log.d(r1, r2) // Catch: android.os.RemoteException -> L14 com.google.android.gms.dynamite.DynamiteModule.LoadingException -> L3c java.lang.Throwable -> L68
android.content.Context r1 = r4.zze // Catch: android.os.RemoteException -> L14 com.google.android.gms.dynamite.DynamiteModule.LoadingException -> L28 java.lang.Throwable -> L68
com.google.android.gms.dynamite.DynamiteModule$VersionPolicy r2 = com.google.android.gms.dynamite.DynamiteModule.PREFER_HIGHEST_OR_REMOTE_VERSION // Catch: android.os.RemoteException -> L14 com.google.android.gms.dynamite.DynamiteModule.LoadingException -> L28 java.lang.Throwable -> L68
java.lang.String r3 = r4.zzdi // Catch: android.os.RemoteException -> L14 com.google.android.gms.dynamite.DynamiteModule.LoadingException -> L28 java.lang.Throwable -> L68
com.google.android.gms.dynamite.DynamiteModule r1 = com.google.android.gms.dynamite.DynamiteModule.load(r1, r2, r3) // Catch: android.os.RemoteException -> L14 com.google.android.gms.dynamite.DynamiteModule.LoadingException -> L28 java.lang.Throwable -> L68
goto L31
L28:
r1 = move-exception
java.lang.String r2 = r4.tag // Catch: android.os.RemoteException -> L14 com.google.android.gms.dynamite.DynamiteModule.LoadingException -> L3c java.lang.Throwable -> L68
java.lang.String r3 = "Error Loading module"
android.util.Log.e(r2, r3, r1) // Catch: android.os.RemoteException -> L14 com.google.android.gms.dynamite.DynamiteModule.LoadingException -> L3c java.lang.Throwable -> L68
r1 = 0
L31:
if (r1 == 0) goto L44
android.content.Context r2 = r4.zze // Catch: android.os.RemoteException -> L14 com.google.android.gms.dynamite.DynamiteModule.LoadingException -> L3c java.lang.Throwable -> L68
java.lang.Object r1 = r4.zza(r1, r2) // Catch: android.os.RemoteException -> L14 com.google.android.gms.dynamite.DynamiteModule.LoadingException -> L3c java.lang.Throwable -> L68
r4.zzdk = r1 // Catch: android.os.RemoteException -> L14 com.google.android.gms.dynamite.DynamiteModule.LoadingException -> L3c java.lang.Throwable -> L68
goto L44
L3c:
r1 = move-exception
L3d:
java.lang.String r2 = r4.tag // Catch: java.lang.Throwable -> L68
java.lang.String r3 = "Error creating remote native handle"
android.util.Log.e(r2, r3, r1) // Catch: java.lang.Throwable -> L68
L44:
boolean r1 = r4.zzdj // Catch: java.lang.Throwable -> L68
if (r1 != 0) goto L57
T r2 = r4.zzdk // Catch: java.lang.Throwable -> L68
if (r2 != 0) goto L57
java.lang.String r1 = r4.tag // Catch: java.lang.Throwable -> L68
java.lang.String r2 = "Native handle not yet available. Reverting to no-op handle."
android.util.Log.w(r1, r2) // Catch: java.lang.Throwable -> L68
r1 = 1
r4.zzdj = r1 // Catch: java.lang.Throwable -> L68
goto L64
L57:
if (r1 == 0) goto L64
T r1 = r4.zzdk // Catch: java.lang.Throwable -> L68
if (r1 == 0) goto L64
java.lang.String r1 = r4.tag // Catch: java.lang.Throwable -> L68
java.lang.String r2 = "Native handle is now available."
android.util.Log.w(r1, r2) // Catch: java.lang.Throwable -> L68
L64:
T r1 = r4.zzdk // Catch: java.lang.Throwable -> L68
monitor-exit(r0) // Catch: java.lang.Throwable -> L68
return r1
L68:
r1 = move-exception
monitor-exit(r0) // Catch: java.lang.Throwable -> L68
throw r1
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.internal.vision.zzm.zzq():java.lang.Object");
}
}