framework/base: Initialize mRotation to panel orientation.

    - Fixes the homescreen layout to be prepared based on the panel
      orientation.
    - Disables the rotation animation from 0 to panel orientation after
      bootup.

Change-Id: Ie77e53ade087df05e102c45bf9d12bdaf09583f7
Fix logging typos in GpsLocationProvider

Change-Id: Ibf12947f3758defee990fbf685323334b8d1eeda
Signed-off-by: Magnus Eriksson <eriksson.mag@gmail.com>
ad 1021 gid for gps + 3004 netraw

Change-Id: I59d7e99ec996891b19fa15a3ed66e055e6bccad8

Conflicts:
	core/java/com/android/internal/os/ZygoteInit.java
Allow to set total number of background apps for low memory devices

Due to memory constraints, we anyway cannot fit the default number
of BG apps. So instead of killing background apps to
free up memory when launching, start with an already
reduced background set of apps.
Another side-effect is that launch latencies also improve.

Note: This is for low memory devices. (~512MB RAM or less)

Change-Id: I5d42bf58a77cd4ce460ba655a1365031b144aaf1
Fix fatal exception in system process due to NullPointerException.

Null pointer check added to avoid NullPointerException, that was
leading fatal exception in system process hence framework rebooting.

CRs-fixed: 483763

Change-Id: I8ea262e28f97a570650057c7633727b9e666bfcb
gps: fixed singleshot session that doesn't stop

When a single shot location is requested and a
location is returned, the location request is
not stopped and so it continues even when the
requestor has stopped listening. This can cause
gps tracking to continue in the backgroud and eat
up battery.

This is fixed by stoping the provider if there
are no more update record associated with it
when a location is returned.

Change-Id: Ie437732ff06231a46724843af30e21ca3a1694ab
Merge branch 'katkiss' into kk_222
switch animations off by default

Change-Id: Ib426d600a887fa98cef53049e0290e5c23c5f27f
Merge branch 'kk_tmp' into kk_222
fix typo

Change-Id: I7b1ddc3d739a9c4af992486a034022fc6a2a52a4
Add missing ACTION_MEDIA_UNMOUNTED intent

When an SD card is removed without the user unmounting, the intent
ACTION_MEDIA_BAD_REMOVAL is fired but is missing the preceeding
ACTION_MEDIA_UNMOUNTED which is needed to keep UI consistency.

Now when bad media removal is detected an ACTION_MEDIA_UNMOUNTED
intent is sent before the ACTION_MEDIA_BAD_REMOVAL.

Change-Id: I133300f42bafab141351e796d7cfc13c15d133e0
Fix deadlock of WebViewCoreThread

There was a deadlock in destroy process.
Investigation showed that WebViewCoreThread is waiting some
callbacks but in this case WebViewCoreThread can not resume
itself not to call notify method.

Flow:
1. CallbackProxy.sendMessageToUiThreadSync
2. WebViewClassic.destroy()
3. CallbackProxy.blockMessages()
4. CallbackProxy.handleMessage is called via MainThread
5. The WebViewCoreThread deadlock is occured.

The cases we have to call notify method are followings.
OVERRIDE_URL
CREATE_WINDOW
SAVE_PASSWORD
NOTIFY
OPEN_FILE_CHOOSER
JS_ALERT
JS_CONFIRM
JS_PROMPT
JS_UNLOAD
JS_TIMEOUT

Change-Id: I9d95ae500bf6338d77b32b5fa15de7cff5720d0f