what-the-bank/sources/com/google/android/gms/measurement/internal/zzed.java

60 lines
2.5 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.gms.measurement.internal;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabaseLockedException;
import android.database.sqlite.SQLiteException;
import android.database.sqlite.SQLiteOpenHelper;
/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes.dex */
public final class zzed extends SQLiteOpenHelper {
final zzee zza;
/* JADX INFO: Access modifiers changed from: package-private */
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public zzed(zzee zzeeVar, Context context, String str) {
super(context, "google_app_measurement_local.db", (SQLiteDatabase.CursorFactory) null, 1);
this.zza = zzeeVar;
}
@Override // android.database.sqlite.SQLiteOpenHelper
public final SQLiteDatabase getWritableDatabase() throws SQLiteException {
try {
return super.getWritableDatabase();
} catch (SQLiteDatabaseLockedException e) {
throw e;
} catch (SQLiteException unused) {
this.zza.zzs.zzay().zzd().zza("Opening the local database failed, dropping and recreating it");
this.zza.zzs.zzf();
if (!this.zza.zzs.zzau().getDatabasePath("google_app_measurement_local.db").delete()) {
this.zza.zzs.zzay().zzd().zzb("Failed to delete corrupted local db file", "google_app_measurement_local.db");
}
try {
return super.getWritableDatabase();
} catch (SQLiteException e2) {
this.zza.zzs.zzay().zzd().zzb("Failed to open local database. Events will bypass local storage", e2);
return null;
}
}
}
@Override // android.database.sqlite.SQLiteOpenHelper
public final void onCreate(SQLiteDatabase sQLiteDatabase) {
zzak.zzb(this.zza.zzs.zzay(), sQLiteDatabase);
}
@Override // android.database.sqlite.SQLiteOpenHelper
public final void onDowngrade(SQLiteDatabase sQLiteDatabase, int i, int i2) {
}
@Override // android.database.sqlite.SQLiteOpenHelper
public final void onOpen(SQLiteDatabase sQLiteDatabase) {
zzak.zza(this.zza.zzs.zzay(), sQLiteDatabase, "messages", "create table if not exists messages ( type INTEGER NOT NULL, entry BLOB NOT NULL)", "type,entry", null);
}
@Override // android.database.sqlite.SQLiteOpenHelper
public final void onUpgrade(SQLiteDatabase sQLiteDatabase, int i, int i2) {
}
}