.class public Landroidx/media3/database/StandaloneDatabaseProvider; .super Landroid/database/sqlite/SQLiteOpenHelper; .source "StandaloneDatabaseProvider.java" # interfaces .implements Landroidx/media3/database/DatabaseProvider; # static fields .field public static final DATABASE_NAME:Ljava/lang/String; = "exoplayer_internal.db" .field private static final TAG:Ljava/lang/String; = "SADatabaseProvider" .field private static final VERSION:I = 0x1 # direct methods .method public constructor (Landroid/content/Context;)V .locals 3 .line 51 invoke-virtual {p1}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context; move-result-object p1 const/4 v0, 0x0 const/4 v1, 0x1 const-string v2, "exoplayer_internal.db" invoke-direct {p0, p1, v2, v0, v1}, Landroid/database/sqlite/SQLiteOpenHelper;->(Landroid/content/Context;Ljava/lang/String;Landroid/database/sqlite/SQLiteDatabase$CursorFactory;I)V return-void .end method .method private static wipeDatabase(Landroid/database/sqlite/SQLiteDatabase;)V .locals 10 const-string v0, "type" const-string v1, "name" .line 74 filled-new-array {v0, v1}, [Ljava/lang/String; move-result-object v4 const-string v3, "sqlite_master" const/4 v5, 0x0 const/4 v6, 0x0 const/4 v7, 0x0 const/4 v8, 0x0 const/4 v9, 0x0 move-object v2, p0 .line 76 invoke-virtual/range {v2 .. v9}, Landroid/database/sqlite/SQLiteDatabase;->query(Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor; move-result-object v0 .line 84 :cond_0 :goto_0 :try_start_0 invoke-interface {v0}, Landroid/database/Cursor;->moveToNext()Z move-result v1 if-eqz v1, :cond_1 const/4 v1, 0x0 .line 85 invoke-interface {v0, v1}, Landroid/database/Cursor;->getString(I)Ljava/lang/String; move-result-object v1 const/4 v2, 0x1 .line 86 invoke-interface {v0, v2}, Landroid/database/Cursor;->getString(I)Ljava/lang/String; move-result-object v2 const-string v3, "sqlite_sequence" .line 87 invoke-virtual {v3, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v3 if-nez v3, :cond_0 .line 89 new-instance v3, Ljava/lang/StringBuilder; invoke-direct {v3}, Ljava/lang/StringBuilder;->()V const-string v4, "DROP " invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v3 invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 const-string v3, " IF EXISTS " invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v1 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 .line 91 :try_start_1 invoke-virtual {p0, v1}, Landroid/database/sqlite/SQLiteDatabase;->execSQL(Ljava/lang/String;)V :try_end_1 .catch Landroid/database/SQLException; {:try_start_1 .. :try_end_1} :catch_0 .catchall {:try_start_1 .. :try_end_1} :catchall_0 goto :goto_0 :catch_0 move-exception v2 :try_start_2 const-string v3, "SADatabaseProvider" .line 93 new-instance v4, Ljava/lang/StringBuilder; invoke-direct {v4}, Ljava/lang/StringBuilder;->()V const-string v5, "Error executing " invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v4 invoke-virtual {v4, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v1 invoke-static {v3, v1, v2}, Landroidx/media3/common/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V :try_end_2 .catchall {:try_start_2 .. :try_end_2} :catchall_0 goto :goto_0 :cond_1 if-eqz v0, :cond_2 .line 97 invoke-interface {v0}, Landroid/database/Cursor;->close()V :cond_2 return-void :catchall_0 move-exception p0 if-eqz v0, :cond_3 .line 75 :try_start_3 invoke-interface {v0}, Landroid/database/Cursor;->close()V :try_end_3 .catchall {:try_start_3 .. :try_end_3} :catchall_1 goto :goto_1 :catchall_1 move-exception v0 invoke-virtual {p0, v0}, Ljava/lang/Throwable;->addSuppressed(Ljava/lang/Throwable;)V :cond_3 :goto_1 throw p0 .end method # virtual methods .method public onCreate(Landroid/database/sqlite/SQLiteDatabase;)V .locals 0 return-void .end method .method public onDowngrade(Landroid/database/sqlite/SQLiteDatabase;II)V .locals 0 .line 66 invoke-static {p1}, Landroidx/media3/database/StandaloneDatabaseProvider;->wipeDatabase(Landroid/database/sqlite/SQLiteDatabase;)V return-void .end method .method public onUpgrade(Landroid/database/sqlite/SQLiteDatabase;II)V .locals 0 return-void .end method