Fix endless loop of mediascanner with some MPEG files.

Fixes http://code.google.com/p/cyanogenmod/issues/detail?id=6058
Allow SIP calls to be added as a contact from call log (2/2)

Change-Id: I9a154b88e40e250c67fcced77ca0a9626619b667
Refresh whole screen after changing render effect.

Previously, when applying render effects, parts of the screen that were
not refreshed as part of the setting procedure (such as the status bar)
didn't get the render effect applied, which looked ugly.
Add simple caching to XML compilation

XML compilation stage will perform many (expensive) resource ID
lookups - for the same entries. Adding this simple cache can
dramatically improve performance of this stage (often a bottleneck)

Updated: fixed for Mac OS X (also tested on Windows, Linux)

back ported from http://review.cyanogenmod.com/#/c/24040/

Change-Id: Ib1ab82ba9bf901bc2a3f9027b47d680861d6c315
Signed-off-by: Jorrit Jongma <jorrit@jongma.org>

Conflicts:

	tools/aapt/Android.mk
	tools/aapt/ResourceTable.cpp
Work around some failures in Wrigley 3G RIL.

- The RIL sometimes forgets data connections that became inactive,
  making it return an empty list in the DATA_CALL_LIST RIL call
  instead of just marking those connections inactive. When framework
  then nevertheless tries to teardown those connections, the RIL chokes.
  Fix that by suppressing the DEACTIVATE_DATA_CALL call in those cases.

- Sometimes the RIL doesn't respond to SETUP_DATA_CALL requests. Catch
  that condition and convert it into an error so that frameworks retries
  the connection.
Fix light filter sometimes being slow when changing light conditions.

If the screen is turned off, the light filter is supposed to be reset
when the screen comes back on. On screen off, the light sensor listener
is unregistered, and the code relies on it not being called anymore.
That assumption doesn't hold true, though (verified by checking logs),
which causes the light filter to be filled while the screen is off.
Fix haptic feedback for pattern length of 1.
Update ringer audio focus if ringer volume is changed during ringing.

AudioService only grabs the audio focus for the phone if the ringer
volume is set to something audible. If e.g. ascending ringtone is
enabled and starts at 0, the audio focus wouldn't be grabbed for the
whole ring period, leading to a mixture of played music and the
ringtone. Fix that by grabbing the audio focus if the volume is set away
from 0 while ringing.

Also attenuate music during ringing even when using silent ringtone.
Makes it more obvious to the user that something is going on.
Theme some more framework notifications.
Localize screen timeout toast.

Change-Id: Ic167ead9a218ae3cb887c2b70257024e3b5bbbc5
Merge "Localize screen timeout toast." into gingerbread
Merge "Fix light filter sometimes being slow when changing light conditions." into gingerbread
Merge "Theme some more framework notifications." into gingerbread
Merge "Update ringer audio focus if ringer volume is changed during ringing." into gingerbread
Frameworks/SystemUI: Update Greek translations

Signed-off-by: Michael Bestas <mikeioannina@gmail.com>

Change-Id: I25186850f606ae32474f75f7149a7ad3dd0d93bf
Merge "Work around some failures in Wrigley 3G RIL." into gingerbread
Merge "Frameworks/SystemUI: Update Greek translations" into gingerbread
Fix wrong 'USB debugging connected' notify color

Change-Id: I8ad4ce8652325e2e10dd529a934c8928ee0b149c
Revert "Fix wrong 'USB debugging connected' notify color"

This reverts commit 6d70c41047314e8753b373bc92ae675bf580b641
Allow theming of framework UI elements.

As the theme engine works by replacing resources while loading the APK,
framework UI couldn't be themed so far. Workaround that by manually
creating a com.android.systemui package context and using that for
showing the UI. This attempt is a bit hacky, but should be safe as
a) systemui should always be present
b) if it isn't, we fall back to no theming

Change-Id: I644e2e8d7d4abf07bae639b606197d691f16adac