Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
5a2fd983
authored
Sep 15, 2021
by
olly
Committed by
Christos Tsilopoulos
Sep 16, 2021
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Move database package to common module
PiperOrigin-RevId: 396936785
parent
4433ac5a
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
9 additions
and
8 deletions
library/core/src/main/java/com/google/android/exoplayer2/database/DatabaseIOException.java → library/common/src/main/java/com/google/android/exoplayer2/database/DatabaseIOException.java
library/core/src/main/java/com/google/android/exoplayer2/database/DatabaseProvider.java → library/common/src/main/java/com/google/android/exoplayer2/database/DatabaseProvider.java
library/core/src/main/java/com/google/android/exoplayer2/database/DefaultDatabaseProvider.java → library/common/src/main/java/com/google/android/exoplayer2/database/DefaultDatabaseProvider.java
library/core/src/main/java/com/google/android/exoplayer2/database/ExoDatabaseProvider.java → library/common/src/main/java/com/google/android/exoplayer2/database/ExoDatabaseProvider.java
library/core/src/main/java/com/google/android/exoplayer2/database/VersionTable.java → library/common/src/main/java/com/google/android/exoplayer2/database/VersionTable.java
library/core/src/main/java/com/google/android/exoplayer2/database/package-info.java → library/common/src/main/java/com/google/android/exoplayer2/database/package-info.java
library/core/src/test/java/com/google/android/exoplayer2/database/VersionTableTest.java → library/common/src/test/java/com/google/android/exoplayer2/database/VersionTableTest.java
library/co
re
/src/main/java/com/google/android/exoplayer2/database/DatabaseIOException.java
→
library/co
mmon
/src/main/java/com/google/android/exoplayer2/database/DatabaseIOException.java
View file @
5a2fd983
File moved
library/co
re
/src/main/java/com/google/android/exoplayer2/database/DatabaseProvider.java
→
library/co
mmon
/src/main/java/com/google/android/exoplayer2/database/DatabaseProvider.java
View file @
5a2fd983
...
@@ -19,12 +19,12 @@ import android.database.sqlite.SQLiteDatabase;
...
@@ -19,12 +19,12 @@ import android.database.sqlite.SQLiteDatabase;
import
android.database.sqlite.SQLiteException
;
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}.
* tables prefixed with {@link #TABLE_PREFIX}.
*/
*/
public
interface
DatabaseProvider
{
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"
;
String
TABLE_PREFIX
=
"ExoPlayer"
;
/**
/**
...
...
library/co
re
/src/main/java/com/google/android/exoplayer2/database/DefaultDatabaseProvider.java
→
library/co
mmon
/src/main/java/com/google/android/exoplayer2/database/DefaultDatabaseProvider.java
View file @
5a2fd983
File moved
library/co
re
/src/main/java/com/google/android/exoplayer2/database/ExoDatabaseProvider.java
→
library/co
mmon
/src/main/java/com/google/android/exoplayer2/database/ExoDatabaseProvider.java
View file @
5a2fd983
...
@@ -23,15 +23,16 @@ import android.database.sqlite.SQLiteOpenHelper;
...
@@ -23,15 +23,16 @@ import android.database.sqlite.SQLiteOpenHelper;
import
com.google.android.exoplayer2.util.Log
;
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
* <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
* prefer to keep tables used by media library components isolated in their own database. Other
* to use {@link DefaultDatabaseProvider} with their own {@link SQLiteOpenHelper}.
* applications should prefer to use {@link DefaultDatabaseProvider} with their own {@link
* SQLiteOpenHelper}.
*/
*/
public
final
class
ExoDatabaseProvider
extends
SQLiteOpenHelper
implements
DatabaseProvider
{
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"
;
public
static
final
String
DATABASE_NAME
=
"exoplayer_internal.db"
;
private
static
final
int
VERSION
=
1
;
private
static
final
int
VERSION
=
1
;
...
...
library/co
re
/src/main/java/com/google/android/exoplayer2/database/VersionTable.java
→
library/co
mmon
/src/main/java/com/google/android/exoplayer2/database/VersionTable.java
View file @
5a2fd983
...
@@ -26,8 +26,8 @@ import java.lang.annotation.Retention;
...
@@ -26,8 +26,8 @@ import java.lang.annotation.Retention;
import
java.lang.annotation.RetentionPolicy
;
import
java.lang.annotation.RetentionPolicy
;
/**
/**
* Utility methods for accessing versions of
ExoPlayer database components. This allows them to be
* Utility methods for accessing versions of
media library database components. This allows them to
* versioned independently to the version of the containing database.
*
be
versioned independently to the version of the containing database.
*/
*/
public
final
class
VersionTable
{
public
final
class
VersionTable
{
...
...
library/co
re
/src/main/java/com/google/android/exoplayer2/database/package-info.java
→
library/co
mmon
/src/main/java/com/google/android/exoplayer2/database/package-info.java
View file @
5a2fd983
File moved
library/co
re
/src/test/java/com/google/android/exoplayer2/database/VersionTableTest.java
→
library/co
mmon
/src/test/java/com/google/android/exoplayer2/database/VersionTableTest.java
View file @
5a2fd983
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment