Improve screenshot animation glitch fix.

New patchset by Stefano Semeraro aka Suxsem.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
DocumentsUI: Add a standalone File Manager

This commit adds a standalone mode to the DocumentsUI, to let
it act as a file manager/explorer.
You can browse your storage contents, open files, and delete them,
as well as do everything that the DocumentsUI can do (ie. sort
by name/size/type, list and grid view, recents, search, ...).

This gives us a consistent file browsing UX accross all apps
that uses the new documents API.

Change-Id: If73a3c100f010bdb766c843976d4fd3573ea805c
fb: do not call every time settings on clock intents

only needed for configuration change.

Change-Id: Ie6db0e8a3abca83f5ea6c25f39124672e06ac4ff
Memory leak in IInputMethodSessionWrapper executeMessage

In some cases the executeMessage is called with
mInputMethodSession == null. For the messages

DO_UPDATE_SELECTION, DO_APP_PRIVATE_COMMAND

memory is leaked. This commit recycles the args freeing
the allocated memory.
Rework thumbnail handling

Since ids of media file are usually not continuous, the original file of thumbnail are
sparse. When there are big numbers files on ex\
ternal storage, the size of this file will be horrible.
Ex, when the id is 20000, then the .thumbnails/.thumbdata3-xx file will be 50000*10k = 488.28M.
Can refer http://stackoverflow.com/questions/12396715/android-huge-thumbdata4-file-in-dcim-folder
Because after 4.0, MediaProvider will scan any files, this will be a big problem. So I modify MiniThumbFile.java to avoid this.
According 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\
d+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\
p next available index. And when you need insert a thumbnail, the index increase by 1. In this way, the block data in thumbnail file \
will be continuous. And thus unnecessary zero paddings will not be saved.

Change-Id: I66005dd69b0a5c8f4353bd7a8225d163a654fd2d
MiniThumbFile: Fix image/bitmap retrieval

Change I66005dd69b0a5c8f4353bd7a8225d163a654fd2d changed the insertion
and creation indexing mechanism, but the retrieval method was still
using the old sparse one. Fixit

Fixes android.provider.cts.MediaStore_Images_MediaTest#testInsertImageWithBitmap,
android.provider.cts.MediaStore_Images_MediaTest#testInsertImageWithImagePath,
android.provider.cts.MediaStore_Images_ThumbnailsTest#testQueryExternalMiniThumbnails,
and android.provider.cts.MediaStore_Video_ThumbnailsTest#testGetThumbnail

Change-Id: I41feea79fa304635f3908055fb95a8c85718a97f
Revert "fb: do not call every time settings on clock intents"

This reverts commit 6c31b259756928c6fce35e6edf6e6ef6c4655511.

Change-Id: Iaaefb7efcb285791a2dd641c308090cc0ac3ea59
Battery Text: Fix rounding issues and take density into account

We are a Multi-Dpi ROM... on 4.2 and 4.3 the text in the circle battery icon
was a small bit up on a lower dpi. The original author compensated this with
just a +1 to the Y value. Thats not the right way...
Calculate the current dpi into the offset and all is well.

We want a perfect 4.4...so this nitpicks even if we are talking about
0.5dp should be fixed

Change-Id: I5c6c1e237cd9049101ee88347a9b4d4b5a2b9682
Parse UUID string with Long.parseLong

Integer.parseInt throws an NFE for values greater than 0x7fffffff.

Change-Id: I1fb9e4980b2058a4071dd80d0b9abd8efeb870ab