{"push_id":968379675,"size":1,"distinct_size":1,"ref":"refs/heads/m6.0.1","head":"e09763529bf32bc414ea5aaaaf010989feeea812","before":"30de7667b83298ef2429e7a37320e18a33081c25","commits":[{"sha":"e09763529bf32bc414ea5aaaaf010989feeea812","author":{"email":"583efccb99331229c007dca4e5ec7b72387679cc@gmail.com","name":"fun"},"message":"Rework thumbnail handling\n\nSince ids of media file are usually not continuous, the original file of thumbnail are\nsparse. When there are big numbers files on ex\\\nternal storage, the size of this file will be horrible.\nEx, when the id is 20000, then the .thumbnails/.thumbdata3-xx file will be 50000*10k = 488.28M.\nCan refer http://stackoverflow.com/questions/12396715/android-huge-thumbdata4-file-in-dcim-folder\nBecause after 4.0, MediaProvider will scan any files, this will be a big problem. So I modify MiniThumbFile.java to avoid this.\nAccording to the id, we now produce an index file. In this index file, one id will use BYTES_PER_MINTHUMB_INDEX(8) bytes in offset (i\\\nd+1)*BYTES_PER_MINTHUMB_INDEX. The data of these 8 bytes is the index of thumbnail file. The first BYTES_PER_MINTHUMB_INDEX bytes kee\\\np next available index. And when you need insert a thumbnail, the index increase by 1. In this way, the block data in thumbnail file \\\nwill be continuous. And thus unnecessary zero paddings will not be saved.\n\nMiniThumbFile: Fix image/bitmap retrieval\n\nChange I66005dd69b0a5c8f4353bd7a8225d163a654fd2d changed the insertion\nand creation indexing mechanism, but the retrieval method was still\nusing the old sparse one. Fixit\n\nFixes android.provider.cts.MediaStore_Images_MediaTest#testInsertImageWithBitmap,\nandroid.provider.cts.MediaStore_Images_MediaTest#testInsertImageWithImagePath,\nandroid.provider.cts.MediaStore_Images_ThumbnailsTest#testQueryExternalMiniThumbnails,\nand android.provider.cts.MediaStore_Video_ThumbnailsTest#testGetThumbnail\n\nChange-Id: I0f9307f66fd3f263a9efb9fbe2f0535779cc7924","distinct":true,"url":"https://api.github.com/repos/TurboROM/frameworks_base/commits/e09763529bf32bc414ea5aaaaf010989feeea812"}]}