Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
packages_providers_MediaProvider
Commits
022eb71b
Commit
022eb71b
authored
15 years ago
by
Marco Nelissen
Browse files
Options
Download
Email Patches
Plain Diff
Fix botched database update step.
Change-Id: Ida7c0cbf4831eb5ab8bd6ff041a2c7fe7361a6d0
parent
403ebe07
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
src/com/android/providers/media/MediaProvider.java
src/com/android/providers/media/MediaProvider.java
+7
-5
No files found.
src/com/android/providers/media/MediaProvider.java
View file @
022eb71b
...
...
@@ -372,7 +372,9 @@ public class MediaProvider extends ContentProvider {
// Revisions 84-86 were a failed attempt at supporting the "album artist" id3 tag
// We can't downgrade from those revisions, so start over.
if
(
fromVersion
<
63
||
(
fromVersion
>=
84
&&
fromVersion
<=
86
))
{
// (the initial change to do this was wrong, so now we actually need to start over
// if the database version is 84-89)
if
(
fromVersion
<
63
||
(
fromVersion
>=
84
&&
fromVersion
<=
89
))
{
fromVersion
=
63
;
// Drop everything and start over.
Log
.
i
(
TAG
,
"Upgrading media database from version "
+
...
...
@@ -911,9 +913,9 @@ public class MediaProvider extends ContentProvider {
// The fastscroll thumb needs an index on the strings being displayed,
// otherwise the queries it does to determine the correct position
// becomes really inefficient
db
.
execSQL
(
"CREATE INDEX title_idx on audio_meta(title);"
);
db
.
execSQL
(
"CREATE INDEX artist_idx on artists(artist);"
);
db
.
execSQL
(
"CREATE INDEX album_idx on albums(album);"
);
db
.
execSQL
(
"CREATE INDEX
IF NOT EXISTS
title_idx on audio_meta(title);"
);
db
.
execSQL
(
"CREATE INDEX
IF NOT EXISTS
artist_idx on artists(artist);"
);
db
.
execSQL
(
"CREATE INDEX
IF NOT EXISTS
album_idx on albums(album);"
);
}
if
(
fromVersion
<
88
)
{
...
...
@@ -3022,7 +3024,7 @@ public class MediaProvider extends ContentProvider {
private
static
String
TAG
=
"MediaProvider"
;
private
static
final
boolean
LOCAL_LOGV
=
true
;
private
static
final
int
DATABASE_VERSION
=
8
9
;
private
static
final
int
DATABASE_VERSION
=
9
0
;
private
static
final
String
INTERNAL_DATABASE_NAME
=
"internal.db"
;
// maximum number of cached external databases to keep
...
...
This diff is collapsed.
Click to expand it.
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