Themes: Fix setting wallpaper from a legacy theme

Change-Id: I3bfc9ee24d2a3ee5c1bdb97f2c07427e6d723206
Themes: Track NotFoundException on app launch failure

We should probably keep an eye on NotFoundExceptions too since they
are a common exception thrown when a bad theme is applied.

Change-Id: I2ccaed0349a90ab99b99fb83cef0c9183d598088
Themes: Remove listener if exception is thrown

If something goes wrong and a client does not remove itself, the
theme manager may still have a reference to the listener and an
exception is thrown while trying to call one of the listener's methods.
When this happens, we should not only log it but remove the bad listener.

Change-Id: I052cdcc10b0eaa75ebf076b3ece5f8a668d3868e
Themes: Fix native crash in libandroidfw

If a missing attribute needs to be added in somewhere in the middle
of the bag, a segfault would occur because we change curEntry to a
value that is beyond the set's allocated space.  This patch stores
curEntry in prevEntry before changing it's value and memmove uses
prevEntry to index the set.

Change-Id: Ie70f2ad465097c3acf76caa729999c424fb01ee2
Merge "Themes: Fix native crash in libandroidfw" into kitkat
Merge remote-tracking branch 'pa/kitkat' into kitkat
Add system setting for t9 search input locale

Change-Id: I780b3cca1ad2da396b76464a6dab5cc53f621ed2
Broadcast tethered client inteface along with upstream interface name

On change in tethering upstream interface for IPV4 of IPV6 address,
broadcast an intent with both tethered client interface as well as
upstream interface name, ip address type and update type.

Change-Id: I2f23e2b8ec125339bedd454446accb23e33cacae
WiFi: Check data length before extracting

GBK to UTF convertion is carried on input data. The maximum data
that can be supported in framework is BUF_SIZE.
The gerrit is to check the size of input data  prior to parsing,
so that it will not lead to any crashes.

Change-Id: If8ff372dc26317b369643405dcea01ff28c4f1f3
CRs-Fixed: 708416
Add new Card Unavailable reason for SIM power down in APM.

REASON_APM_SIM_POWER_DOWN value added to CardUnavailableReason enum.
This is to indicate card absent event received when SIM is powered
down in APM.

Change-Id: I985e06d629715ebc0489a2fb19e908ab652bfeeb
CRs-Fixed: 661325
Merge branch 'kitkat' of https://github.com/AOSPA-legacy/android_frameworks_base into HEAD