Commit 5a2fd983 by olly Committed by Christos Tsilopoulos

Move database package to common module

PiperOrigin-RevId: 396936785
parent 4433ac5a
......@@ -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";
/**
......
......@@ -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;
......
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment