Add new PHONE_FORCE_INCOMING_CALL_UI setting

A Setting URI for overriding the INCOMING CALL UI param
in Phone.app

If set true, even if the default of phone.app is not to use
incoming call UI, the display will be enabled
Check for strongCount of Surface to avoid double delete in ~Surface()

After binder transaction, keep a check for strongCount of Surface to
avoid creating a sp<Surface> with a surface which is being destroyed
because it will lead to double delete in ~Surface() when it goes out
of scope.

(cherry picked from commit 3f69147188d0ba2607dab084fc04117f5d02d5c7)

Change-Id: I4f67670ac81752113a48200a85ccef4737f25ce7
frameworks/base: Increased Zygote preload GC threshold to half the heap size

Zygote process preloads classes and resources while preparing the heap for
all the processes. Garbage Collection is done in this preload loop to make
the heap copy good before the heap is copied to the other processes.
This Garbage Collection is done inside the preload loops  once a threshold
(PRELOAD_GC_THRESHOLD) is reached. This threshold is hardcoded to be 50000
bytes - a very low value, resulting in Garbage being unnecessarily collected
repeatedly while preloading classes and resources, contributing to boot time.
Garbage is also collected after the preloading stage is completed, which
makes the GC done inside preload loop redundant.

This change increases the threshold to be dynamically set to half the heap
size specified in the dalvik vm. This ensures the GC is normally skipped
inside the preload loop while still invoking GC in corner cases where the
heap usage might cross 50% in the preload stage.

Change-Id: I3e9841c04c04cf06a3f1eaa1bed66fa83209c0cb
CacheManager: fix issue with expire time set to "now"

Reported by Marc Newman, NASA/JSC/SDIL Primary Systems Analyst
Fix EAP password being lost when switching from an EAP network to
another network and back.

Fixes issue 2479.
frameworks/base: initialize cancelBuffer to null

Change-Id: I23eaab0ed03f852bf05bf87546327589a69420f0
utils/SharedBuffer: Make variable write atomic

On release(), mRefs write has a data race with
SharedBuffer::onlyOwner(). This change makes
the write atomic.

Change-Id: If5d71800e15214b237b00ba8cb0258967b6472c7
telephony: add support for HSPA+

Change-Id: Ibf4d9292b77b27790f65e172f0b5c23c2363162a
SurfaceFlinger.cpp: Check for NULL in removeLayer()

The patch checks for NULL in removeLayer() to avoid NULL pointer
exception in removeLayer_l().

Change-Id: I92d60d46039ebb1c73b18cf1d7036d00c7df78f2
CRs-Fixed: 294458
libui: Always allocate buffers from gralloc

All graphic buffers should be allocated from the gralloc. Gralloc
supports allocating buffers even for software-only implementations.

Change-Id: Iad4c72f0c0aeabb00a8f53a46dcf72c5436c0935
CRs-fixed: 297748
Avoid overhead of redundant task manipulation when it gains focus

Change-Id: I7a0a232c839ac6d3eec0b908cabb7c35b4a92965
Fix to unbind BluetoothHeadset service

Connections to BluetoothHeadset service isn't unbound when
bluetooth is disabled and this adds to the number of active
connections in system_server and avoids garbage collection
of death monitors. Fix is to unbind when bluetooth is
disabled.

Change-Id: Iaa406146096a4d92b3704c2b53a23d27f4878a03
Merge "Revert "Fix DHCP not woking for routers that hand out very long leases."" into gingerbread
bluetooth networking (PAN)

Change-Id: I5be9bd4b729a48234db2bc4873ec2e9e3bfe2b97
performance tuneup

Add glFinish() to prevent the impedence mismatch
   between software-rendered surfaceflinger surfaces
   in another thread.

Bug 814812

Change-Id: Ie5c24c8829e9b90a95e86e013fec9dae946deaaa
Merge "Stagefright: Return error if codec takes too long to return a buffer."(cherry picked from commit 5e57c2cf83ef62e9887592b46a4c3352662fb988)

Signed-off-by: AndDiSa <dsagwitz@web.de>
Merge "Bluetooth event loop dispatches dbus data on wakeup"(cherry picked from commit 4733d3a6bf10334c93ffbf42e6e850cacbaadd55)

Signed-off-by: AndDiSa <dsagwitz@web.de>
reduced boot time

instead of unpacking apk's Native Libraries every time
only unpack if dexopt was performed

(kanged from Firerat: I18531d9ecf6b925a9b79ced2cf7c84532ddda2bc)
Allow purging of asset bitmaps

Allow the system to reclaim more free RAM when needed on 'low' memory devices
(e.g. Droid/Milestone) that are struggling with 2.3. This option enabled
efectively restores the froyo way of forcePurgeable BitmapFactory asset
handling.

Change-Id: If454e92743bf91efae42a8e4bcc2d2e7f9b90e91
Fixing wrong Japanese phone formatter.

http://code.google.com/p/android/issues/detail?id=15383

Adding rules that Japanese number start with 050 and 060.

Change-Id: Id324d7ecfb18b348230a3903b356647045700d80