am 96ed5dcd: am 6d1fac3d: Merge "Update buckets after path changes." into jb-mr1-dev
* commit '96ed5dcd7f84926c1224914a4ad25f94a722d245':
Update buckets after path changes.
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index f035150..c7e479c 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -2,7 +2,7 @@
package="com.android.providers.media"
android:sharedUserId="android.media"
android:sharedUserLabel="@string/uid_label"
- android:versionCode="510">
+ android:versionCode="511">
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
diff --git a/src/com/android/providers/media/MediaProvider.java b/src/com/android/providers/media/MediaProvider.java
index de80ffb..038380c 100644
--- a/src/com/android/providers/media/MediaProvider.java
+++ b/src/com/android/providers/media/MediaProvider.java
@@ -1746,6 +1746,10 @@
+ "'||SUBSTR(_data,17) WHERE _data LIKE '/storage/sdcard0/%';");
}
}
+ if (fromVersion < 511) {
+ // we update _data in version 510, we need to update the bucket_id as well
+ updateBucketNames(db);
+ }
sanityCheck(db, fromVersion);
long elapsedSeconds = (SystemClock.currentTimeMicro() - startTime) / 1000000;