diff options
author | Marco Nelissen <marcone@google.com> | 2010-05-12 07:50:14 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-05-12 07:50:14 -0700 |
commit | bbafdc6403488b0f7ad564a5a0ff2eed5b87ab7b (patch) | |
tree | 56d7df775385e3994fd9d8c89c494b2fbda4e807 | |
parent | b6e1ec19dd73cb55baef538a9119bcac0f8b9366 (diff) | |
parent | 836b2d75ef86487ecae0ae834ecbab324fd99471 (diff) | |
download | frameworks_base-bbafdc6403488b0f7ad564a5a0ff2eed5b87ab7b.zip frameworks_base-bbafdc6403488b0f7ad564a5a0ff2eed5b87ab7b.tar.gz frameworks_base-bbafdc6403488b0f7ad564a5a0ff2eed5b87ab7b.tar.bz2 |
am 836b2d75: Merge "Don\'t clear the _data column in the audio_meta table, since it isn\'t needed, and causes a sqlite constraint exception. Bug 2671792." into froyo
Merge commit '836b2d75ef86487ecae0ae834ecbab324fd99471' into froyo-plus-aosp
* commit '836b2d75ef86487ecae0ae834ecbab324fd99471':
Don't clear the _data column in the audio_meta table, since it isn't
-rw-r--r-- | media/java/android/media/MediaScanner.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/media/java/android/media/MediaScanner.java b/media/java/android/media/MediaScanner.java index e80ece6..013f8fc 100644 --- a/media/java/android/media/MediaScanner.java +++ b/media/java/android/media/MediaScanner.java @@ -869,12 +869,15 @@ public class MediaScanner values.put(MediaStore.Images.ImageColumns.DATA, ""); String [] pathSpec = new String[] {path + '%'}; try { + // These tables have DELETE_FILE triggers that delete the file from the + // sd card when deleting the database entry. We don't want to do this in + // this case, since it would cause those files to be removed if a .nomedia + // file was added after the fact, when in that case we only want the database + // entries to be removed. mMediaProvider.update(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values, MediaStore.Images.ImageColumns.DATA + " LIKE ?", pathSpec); mMediaProvider.update(MediaStore.Video.Media.EXTERNAL_CONTENT_URI, values, MediaStore.Images.ImageColumns.DATA + " LIKE ?", pathSpec); - mMediaProvider.update(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI, values, - MediaStore.Images.ImageColumns.DATA + " LIKE ?", pathSpec); } catch (RemoteException e) { throw new RuntimeException(); } |