• Benson Huang's avatar
    Fix SQLiteDiskIOException in stability test · d1b7c58a
    Benson Huang authored
        Because Sprout has removable storage, the framework needs to maintain
        external database for keeping multiple databases between SD cards.
        When cleaning up databases for old external storage volumes, we can't
        delete .db-shm and .db-wal because these two files always have the
        latest data and .db doesn't have. Using camera or Google+ will access
        .db-shm and .db-wal to get the latest data and will cause SQLite Disk
        I/O exception if they are deleted.
    
        The fix is to modify the logic of cleaning up databases (only delete
        .db file, not to delete .db-shm and .db-wal file).
    
        Bug 18412563
    
        Review: https://partner-android-review.git.corp.google.com/#/c/187072
    
    Signed-off-by: default avatarBenson Huang <benson.huang@mediatek.com>
    
    Change-Id: I484bd535ddebee09824a10f12241f6b2ce086b94
    d1b7c58a
MediaProvider.java 257 KB