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
DockAudio: Route audio via dock for Samsung devices

This patch simply removes the audio routing checks for Samsung
devices and routes audio via the dock when the mobile is docked.

There is no option to disable audio routing out through the dock

Change-Id: Ie3f99101b051326913d06f1c78894d50035f6e62
When wifi wants ASCII lowercasing, it needs to ask for it.

http://elliotth.blogspot.com/2012/01/beware-convenience-methods.html

Bug: https://code.google.com/p/android/issues/detail?id=58359
Change-Id: Ibf25d0bbc76015cf8353ec01ab2b743cbc2bde67

Conflicts:

	wifi/java/android/net/wifi/WifiStateMachine.java

If frameworks wants ASCII casing, it should explicity ask for it.

http://elliotth.blogspot.com/2012/01/beware-convenience-methods.html

Bug: https://code.google.com/p/android/issues/detail?id=58359
Change-Id: Iaab02e718a7be7bda22e626dca05d79bfd2a8fc4

If graphics wants ASCII lowercasing, it needs to ask for it.

http://elliotth.blogspot.com/2012/01/beware-convenience-methods.html

Bug: https://code.google.com/p/android/issues/detail?id=58359
Change-Id: I13c106985302335dbb15bb9176d35ec6b4546d4e

If media wants ASCII lowercasing, it needs to ask for it.

http://elliotth.blogspot.com/2012/01/beware-convenience-methods.html

Use toLowerCase(Locale.ROOT) if you want ASCII for machine consumption,
and use toLowerCase(Locale.getDefault()) if you want the user's locale's
casing rules for human consumption.

Bug: https://code.google.com/p/android/issues/detail?id=58359
Change-Id: Id9005a17e34217a81bef3b40031b9e2e6272f45d
Frameworks_base: PT-BR update translations

Change-Id: I22993d3437e3d654d8656e09ae2e798f09f35c68
Core: NL translation

and fix English strings as well

Change-Id: I62beb7966bd2167f415c778303711fa9ee6138f4
Base: CS translation - AOSP

- fixed message for connecting charger

Change-Id: If140a328781522d81c90e4f4c02244e842ee9301
Base: CS translation

- added mock SMS
- added enforcing/permissive SELinux policy
- added enforcing/permissive MMAC policy
- added keyboard name
- removed additional spaces
- added missing removable medium
- added missing from AOSP
- fixed duplicated strings

Change-Id: I1b702c2b91ec03151c38b81377c677a391cb0c87
SystemUI/InputDevices: PL translations

Change-Id: Iaf13721ae0e16c27a01f04b35bc0636126984b07
Move broadcast actions from service to ProfileManager so all API is
there.

Change-Id: Ic8a8ad8f86f01864a30963457687f5be70e99ef4
Factor out profile trigger code into separate class.

Makes it easier to extend the trigger mechanism later on.

Change-Id: Ied318e7efa7e1755022deecb8172f862943ca6ac
Cleanup.

Change-Id: If5fc34b681615e600430478807c53f6d4440a5ec
halo text color

Change-Id: Iaf2fa3d833b48d64a9b90f9459cb1cb0470a10a3
fix

Change-Id: I10f012831f575d0fc84dc38475cb7f33468af463
Merge "Base: CS translation - AOSP" into cm-10.2
Merge "Base: CS translation" into cm-10.2
Merge "SystemUI/InputDevices: PL translations" into cm-10.2
Halo: Add master switch to disable Halo (1/2)

Change-Id: Ifb0f4e8abdce1ed3d4cc4c973edc08794781db64

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
power: Add fastboot functionality

 * Fastboot optimizes simple power on/off by putting the system into the
   lowest possible power state without shutting down the hardware.
 * The framework will all out to the FastPowerOn app for simple power
   off, and enable airplane mode, shut off USB, stop all media, and kill
   all non-system processes.
 * When the power key is pressed, the system wakes up, radios are
   restored, USB is restored.
 * It looks exactly like a normal power cycle, but faster!
 * Reboot option retains normal behavior.
 * Full shutdown is possible by a long-press on power off.

Adapted from CodeAurora:

Adding Fast Power ON functionality

- Switch normal power off/on and fast power off/on based on user`s
selection on the Settings application.
- Add an intent to enter/exit fast power on state
- Handle power off button behaviour when in fast power on mode

PM: Implement Fast Power On - do not wake up on USB unplug event

Avoid wake up from deep sleep if we are in FPO mode and usb unplug event occurs.

Change-Id: Ia115190c546c56bb9010e6ef5e15376e9c49e034
dock: Enable dock audio by default

 * There is no use case for turning this off by default. In fact, it's
 * an anti use-case. Turn it on.

Change-Id: I35d3615527fc5a6f659e650b4d4da401a98ac983
HALO: revert halo text color
doesn't work this way

Change-Id: I37ef0e4eb0ab899bdbab1c7967e09ea4e69196ff