Performance increase in thumbnail handling

Allow for 160*120 thumbnails which is what cameras commonly
generates. The constants for the micro thumbnail were set to other
values, resulting in recalculations of the thumbnais, which
takes time.

This change only affects the maximum size of the temporary image,
when choosing whether to use the EXIF thumbnail or decoding and
downsampling the full image. Without this change, it will choose
an x16 downsampling of the full image over an x2 downsampling of
the EXIF thumbnail, after the change it will prefer the EXIF
thumbnail.

Cf the DCF specifications at http://www.exif.org/dcf.PDF,
"3.3.6. DCF basic thumbnail data structure, (C) Pixel count"

Tested by running DDMS and measuring the time required to create
a thumbnail. This was 220-280 ms prior to change, < 20 ms after.

Change-Id: I59c753493f947e920bad3fde5eeed5d49d509863
installd: Delete cache properly for devices using datadata partition

The java side already checks /data/data for free space but installd
still checks /data causing it to never reap the cache (because it
thinks that enough free space is available.)

Change-Id: I736af6ff7ea0c8ae07900168f6b8ac2f7a4dbe0b
Monitor device storage directly in /data/data

The DeviceStorageMonitorService watches over /data, and when things get
full, starts deleting app cached files.  The app caches are actually
under /data/data, which on DINC is its own mount.  This means the
monitor did not notice when app cache grew too big, as it only saw the
size of /data proper.

This patch makes the monitor look at /data/data instead.  For DINC, this
means it can properly manage app cache, but it won't notice if the upper
/data partition is getting full.  That's not as common as /data/data
filling up though.  For the Samsung devices that mount a /datadata and
then symlink to /data/data, it should also work, as statfs dereferences
links first.  For all other devices with only /data, reading statfs on
/data/data still yields the total/free sizes of the /data partition.

Change-Id: I118a85a04c3a257d54d40ce7802426b4e0fe3e87
Audio: Fix abnormal keytone playback during silent mode changing

Change-Id: Icfc4003c9756b3c33578c137e59dc4a2b4f25647
Author: Chenyang Du <chenyang.du@intel.com>
Signed-off-by: Ertao Zhao <ertaox.zhao@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 19084 4898
Update thumbnail when file is updated

When a file is updated, even if it's different content but the same
file name, the thumbnail file is not updated. We need to renew the
thumbnail for another content that uses an existing file name.
"Media.MINI_THUMB_MAGIC" should be set to 0 to trigger creation/re-creation
of thumbnail in MediaProvider.

Change-Id: Iaf5a0ea0c1069a0d7b3b47ee89c2357793278c17
Clear loaders array after they are destroyed.

See change Ia577caecbacb226a3ce525a01a66283efb6ba754 for details.

Change-Id: I9f07eeceaa3829f71008e6f6a38ab849095bd69c
Signed-off-by: Roman Mazur <mazur.roman@gmail.com>
Fix potential deadlock between LockScreen and WindowManagerService

If LockScreen is enhanced using SurfaceView/GLSurfaceView,
deadlock problem between LockScreen and WindowManagerService
can occur because of IWindow.resized() callback.
And it must lead to watchdog and reset.

IWindow.resized() callback is one-way function so calling resized()
callback of a remote IWindow object is never blocked.
However, calling resized() callback of a local IWindow object
(LockScreen is running on the same system_server process)
is always blocked until resized() callback returns.
Because resized() callback of SurfaceView/GLSurfaceView can lead to
WindowManagerService.relayoutWindow() call, deadlock can occur
between relayoutWindow() and performLayoutAndPlaceSurfacesLockedInner().
(Both functions need locking mWindowMap)

So this patch simulate one-way call when calling resized() callback
of a local IWindow object.

Change-Id: I2a6a5c74ed22d8e6b7a3bea3424ff2879d227105
Signed-off-by: Sangkyu Lee <sk82.lee@lge.com>
Notification : Fix app info long-press

Addresses http://code.google.com/p/cyanogenmod/issues/detail?id=7060

Change-Id: I45c0e1b73c08ceffef02db244b947bfcedf3b20a
Keyguard: Reduce font size of clock in status keyguard (sw720dp)

When system clock is configure for a 24H clock, times like 22:22, overflows the clock
of the keyguard status view on sw720dp. This change reduces the font size of clock to
allow to fit all time formats.

Change-Id: I1416c2a0f9da039f4beb4cdb77dbc5069dc47671
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Ita translations
Prevent audio players starting on startup.

Previously, (at least) Apollo was started on startup (in that it
appeared in the notification bar) because it listens to the AUDIO_BECOMING_NOISY
intent to silence itself in that case. This intent is broadcast by
AudioService when there's a user switch to silence any potential audio
players for the old user. As the system also sends around a
USER_SWITCHED intent on startup, this led to the aforementioned player
startup.
As the intent of AudioService was to act on a user backgrounding anyway,
send out AUDIO_BECOMING_NOISY as reaction to a USER_BACKGROUND intent
instead of the USER_SWITCHED intent.

Change-Id: Iba35844a1274c9dd195f104068304e6a7ffa809e
SystemUI QuickSettings: Allow more off-status localizations

Create strings for NFC off and Sync off so that they can be localized
appropriately.

This is a continuation of: http://review.cyanogenmod.org/#/c/30327/

Change-Id: I070310868147af84b10d15c7d872f6d43120434b
SystemUI: highlight quick settings and notification clear buttons

Actually make use of the drawables bestowed upon us by the Google

Change-Id: I54ed68cf529eec0a0b76e9e35599d70a7d38f686
Lockscreen Targets : Make multi-user compatible

Use getStringForUser instead of getString since the framework always run as root user (0)

Change-Id: Ibe8b69cf4c4ad123ca8e68cd8fadcb7eb467b5be
Framework: Enable multi-user support for Quiet Hours

Change-Id: Ica967ff6bf5842a08421583449876ba73de13d51
Framework: Fix multi-user support in AudioService

Change-Id: Iddeeeac0734a237103e238bcdaa1e85806a64e4f
PackageManager: Restrict system packages to protected storage

Don't allow packages signed with the platform key to be
installed into user (or app) controlled storage

Change-Id: I7390b3bdf5289411f7a335c69635bed9f74bbfb3
Framework: Enable multi-user support for Notification light

Change-Id: I4fb84fdb0c9e1592c2a421011c303a789cde8c8c
Framework:  Fix security exception

Change-Id: I4fa1f55c8209e6890b6cea13b0ed4d781f9f615d
QuietHours Tile (1/2)

Allows user to toggle state of quiet hours

Part 2 : http://review.cyanogenmod.org/#/c/31302/

Patchset 2 : New drawables courtesy of Björn Lundén
         3 : Make multiuser compatible

Change-Id: I10f7b7befbf7405e47247d90bfee0f30c3ecd7c9

Conflicts:

	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsController.java