remove duplicate toggle functions from status bar Settings view

Change-Id: I7c0b858acdc85f2810f013892dfa13a82bf466ec
SurfaceFlinger: Return the current transform value when queried

When an application queries the transform hint,
SurfaceTexture returns the value based on the previous
queueBuffer function. When query() is called before any
queueBuffer() calls, it doesn't return the current transform.
Make sure to get the current transform from a layer
whenever query() is called.

Change-Id: Id86c931dc72285cf754cc6c77219434388fc0d69
Handling EGL_BAD_ALLOC egl error as return from swap

Some GL apps are not closing properly espacially while
forcefully closed.Cause unnessary swap command from
GLSurfaceView and returing EGL_BAD_ALLOC as error that is
not handling in GL thread and leads to uncaught exception

CRs-fixed: 335039
(cherry picked from commit 46cc8d1f506fabd04e3e192511ab715a22ff92ea)

Change-Id: I92d08b6328a0055687ad99b9413a97ec7025e0cd
Surfaceflinger: Add Src orientation for the layer

hwcl->transform contains the final transform, add source transform
to it, so that the source transform can be used for setting correct
orientation for Secondary display.

Change-Id: I9dd6ab9495991b01211711f55b9380a3a53cf0f0
CRs-fixed: 341691, 330719, 342199, 344308
(cherry picked from commit ec2226ef4e8c9bbf5d255d26f9677d7e36fc6ea2)
SurfaceTexture: Reset buffer values on disconnect.

When the surface texture client disconnects, reset the values set
for buffer width, height, transform and format. This is to ensure
that the same surface texture can be used by another client with
different parameters without any corruptions.

Change-Id: I1e158f4641d7b06cea9976ad2827c7b12c95f538
CRs-Fixed: 347382
FontRenderer: do not leak mIndexBufferID

This glBuffer needs to be deleted to avoid leaking
graphics memory.

CRs-Fixed: 346272
Change-Id: Ib56553fffbf88848905893b02a986765823050ad
(cherry picked from commit 8ee3ffb1c0096767311b55c509e1288901f3747f)
frameworks/base: surfaceflinger: Enable dither if needed

SF is checking if dithering is required but not enabling it.
Enable for layer drawing and  also for screenshot for 16bpp
framebuffer only.

CRs-fixed: 333721
(cherry picked from commit 85c02ed97b4a1d0cc343a452959570b379928d59)

Change-Id: I599fe5b9683db208c8b32a1d3d395d5203f78fd3
Camera: sanity check for camcorder frame format parameter

Change-Id: Ieb9f40d32257178d202eaea1b71df25c0336ad8c
Additional fixes for button/keyboard backlight auto-brightness.

- Use sensor-determined brightness values when the button and/or keyboard
  lights are on, even if button/keyboard auto-brightness is disabled, since
  users may want to specify a custom brightness setting that disables the
  button/keyboard backlight entirely in low-ambient light situations.

- When button/keyboard auto-brightness is disabled, don't update button and
  keyboard brightnesses immediately if ambient light (the sensor) changes,
  as this may reactivate these lights after they've turned off in absense of
  user activity.  This is a particular problem when watching video or other
  circumstances when the lights are not expected to reactivate.
telephony: CDMA: fix ERI display when device is in airplane mode

currently when a CDMA device is in airplane mode, the ERI display
shows "Searching for Service"
the radio is OFF, and not searching for anything, so fix it to
actually display the radio status correctly

Change-Id: I3acfb509291867e1a8e35163a89d86719aa40479
MemoryHeapBase: ifdef for gingerbread compatibility

Allow to "revert" by a board config flag the offset member addon
see commit f24c4cd0f20 (aosp change id Ie618fb5c0718e)

This change is required to use overlay based proprietary camera libs
coming from gingerbread and froyo builds.

This change also requires a global cflag named BINDER_COMPAT
because a lot of modules use the MemoryHeap includes

Add this in your BoardConfig.mk :
COMMON_GLOBAL_CFLAGS += -DBINDER_COMPAT

Change-Id: Ib0370fbf4c4770f8141607a8fc393639ffbdc8e2
opengl: remove tegra errata duplicates

Change-Id: I118ad07cb7b45db1b8b73b79852d5c8956387bc8
Update reboot and screenshot drawables

Change-Id: I7e434e9f3774d6350ce56e0f6706dd30be8e3377
Prevent Sym key from showing the IME picker

By default InputMethodManager will popup an IME picker when pressing
the Sym key.

This can be disabled by setting config_symKeyShowsImePicker to false in the
overlay (so the Sym key will show the symbol windows selector for ex.)

Change-Id: I27f5210ddf1aee5b19389a12dc9e21100dbefa0b
Power widget & tether: Restore ICS drawables, replace/create xhdpi drawables

This restores the ICS drawables because they fit better. Some icons by prash
was kept slightly modified and quite a few new ones.

Also replaces the tethering notification drawables as the stock ones
are too big.

Change-Id: I49e1e457fd931b38b5cf16fbeb3b8c58f0b66331
Power widget: Resize ring_on and ring_vibrate_on drawbles slightly

Made the icons slightly smaller to fit the silent-drawable based on
user feedback. I agree it was a bit large before.

Thanks to dvtonder for the originals.

stat_silent.png is only resaved so that it once again works in PS.

Change-Id: Ic54f97eba6163d1f828a6bea1f4f14dba9c57b9c
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

Applying theming to more framework items.

All dialogs and notifications should be covered now.

Change-Id: If93f81991361165a00b5b1b03ffc323e3ab42c0b
Framework: Add Missed call and Voicemail to notification light settings (2/3)

This commit adds the ability to store the configured missed call and voicemail
light settings

Requires Part 1 (Settings) and Part 3 (Phone) commits

Change-Id: I726cbad5c0f9f7d4f84091eeb747c21567ce443e
SimUnlockScreen: Explicitly register themeChange receiver

The unlock activity changed a bit in ICS, so we need to register the
receiver explicitly instead of relying on onResume() to be called in
order to set it up

Change-Id: I9ac9463f249b37466f8daf99d34b85c15b06d43f
SurfaceFlinger: Handle WFD and HDMI concurrency

- changes to handle wifi display and HDMI concurrency
- rename enableHDMIOutput to enableExternalDisplay
- remove action safe related functions(not used anymore)

Change-Id: Ib7d9aa4472a4419c395728fec07f7f9827198bbf