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
Hide GlowPadView warnings

Make message verbose and contingent on DEBUG. This has been spamming
my logs everytime I touch navbar or lockscreen targets.

Change-Id: Iea1a6db86055d4034405f0ee4e20282b6c493210
Freeze screen while changing expanded desktop mode.

Also animate from old to new state.

Change-Id: I2db8ec4d55f7b8b5e592cc1ef21b86ebdbd00eb0
PhoneWindowManager: Delay setting updates during window animation.

Change-Id: I90ee5d8f83176a38a32b5ff38c4b191f1b78532e
Keep ToggleLockscreenTiles in sync between Quick Settings and Ribbon

Update the appearance of both tiles when one is toggled.
Only the KeyguardLock which disabled the lockscreen is able to
re-enable it, so have both tiles use a static KeyguardLock.

Change-Id: Idd8d41d3eda60f9a13bd4b6bc0fab12eb3d25f40
SystemUI: fix SearchPanel gesture in landscape mode.

Change-Id: I8f98b30e9f66f1ae96c85363a8a4af679e1173d6
Merge "Rework thumbnail handling" into cm-10.2
Merge "Hide GlowPadView warnings" into cm-10.2
Core & SystemUI: RU translation

PS1: Rephrased "lockscreen_discharging" and moved it to cm_strings.
     Brought back "lockscreen_plugged_in" from AOSP, to prevent merge conflicts.

PS2: Updated translation for Pie controls and Quick Settings.

PS3: Moved "lockscreen_discharging" back to strings.xml, like in original translation.
     Fixed a typo in "lockscreen_plugged_in", now it's identical to AOSP.

PS4: Updated and rephrased Permlabs. AOSP russian translation starts them with capital
     letter and uses nouns instead of verbs.

PS5: Added translation for Mock SMS permissions and "progress_nomediapresent" message.

PS6: Updated plurals to fix AOSP bug, where "1 item" was also displayed for 21, 31, ...
     Will be also proposed to AOSP Code Review.
     Original discussion here (translators only): http://goo.gl/tD5cBg

PS7: Rephrased "navbar_menu_" strings, more precise description now.

PS8: Made changes suggested by Marco: removed msgid in "lockscreen_plugged_in" and an
     unneeded comment for "progress_nomediapresent".

PS9: Reverted plurals' fix. Will create an AOSP bugtracker entry for this.

Change-Id: Ied3d421ba3f84eca3248b6afab4721aa623d528e
Merge "Core & SystemUI: RU translation" into cm-10.2
Fix up 'launch player on headset connection' option.

- don't crash system_server if no music player can be found
- use the active user's setting instead of the owner's setting

Change-Id: I38a07fe5c8c3d67ececd0768e1fcc01a6cf7fa5a
SystemUI: do not collapse panels if keyevent was canceled.

Change-Id: I9af82e9fa2305142521075938dfd05521adeb9f4
Merge "Fix up 'launch player on headset connection' option." into cm-10.2
frameworks/base: FI translations

Change-Id: I86f3c0c440adec87d296dc2d9ffecc5a40e0a4fe
Fix Quick Settings tiles jerking down while animating to notifications view

Patch Set 2: Fixed in code rather than XML

Change-Id: I1689aa80a0fcb8ad17bcefc290b43a16079f7b88
Fix status bar brightness control when on secure lock screen

When the notifications panel is disabled no views are handling touch events
on the status bar, so we see nothing beyond each ACTION_DOWN. Intercept touch
events when needed specifically for brightness control.

Also recycle VelocityTracker when we're not using it, as per its documentation.

Change-Id: I84d4c788bcdb1e05244710aca933d97e3e60d1b5
Merge "SystemUI: fix SearchPanel gesture in landscape mode." into cm-10.2
Merge "Keep ToggleLockscreenTiles in sync between Quick Settings and Ribbon" into cm-10.2
Merge "frameworks/base: FI translations" into cm-10.2
Merge "Fix status bar brightness control when on secure lock screen" into cm-10.2