Move database package to common module

PiperOrigin-RevId: 396936785
This commit is contained in:
olly 2021-09-15 23:22:23 +01:00 committed by Christos Tsilopoulos
parent 4433ac5a2a
commit 5a2fd983a9
7 changed files with 9 additions and 8 deletions

View File

@ -19,12 +19,12 @@ import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteException;
/**
* Provides {@link SQLiteDatabase} instances to ExoPlayer components, which may read and write
* Provides {@link SQLiteDatabase} instances to media library components, which may read and write
* tables prefixed with {@link #TABLE_PREFIX}.
*/
public interface DatabaseProvider {
/** Prefix for tables that can be read and written by ExoPlayer components. */
/** Prefix for tables that can be read and written by media library components. */
String TABLE_PREFIX = "ExoPlayer";
/**

View File

@ -23,15 +23,16 @@ import android.database.sqlite.SQLiteOpenHelper;
import com.google.android.exoplayer2.util.Log;
/**
* An {@link SQLiteOpenHelper} that provides instances of a standalone ExoPlayer database.
* An {@link SQLiteOpenHelper} that provides instances of a standalone database.
*
* <p>Suitable for use by applications that do not already have their own database, or that would
* prefer to keep ExoPlayer tables isolated in their own database. Other applications should prefer
* to use {@link DefaultDatabaseProvider} with their own {@link SQLiteOpenHelper}.
* prefer to keep tables used by media library components isolated in their own database. Other
* applications should prefer to use {@link DefaultDatabaseProvider} with their own {@link
* SQLiteOpenHelper}.
*/
public final class ExoDatabaseProvider extends SQLiteOpenHelper implements DatabaseProvider {
/** The file name used for the standalone ExoPlayer database. */
/** The file name used for the standalone database. */
public static final String DATABASE_NAME = "exoplayer_internal.db";
private static final int VERSION = 1;

View File

@ -26,8 +26,8 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
/**
* Utility methods for accessing versions of ExoPlayer database components. This allows them to be
* versioned independently to the version of the containing database.
* Utility methods for accessing versions of media library database components. This allows them to
* be versioned independently to the version of the containing database.
*/
public final class VersionTable {