Lock screen weather: Simplified 'no-data' layout & refresh indicator

This commit simplifies the no-data layout of the lock screen weather by
replacing confused Cid, adding "No data" text and hiding the temperatures
on the right.  It also adds a simple "Refreshing" indicator when the user
taps on the weather panel to refresh.

Screenshots:

Change-Id: Ide0bf3134add99ea0b27b90a36f063c37dddb90b
http://dl.dropbox.com/u/50993944/Screenshot_2012-06-02-08-56-36.png
http://dl.dropbox.com/u/50993944/Screenshot_2012-06-02-09-51-47.png

Conflicts:

	policy/src/com/android/internal/policy/impl/KeyguardStatusViewManager.java
systemui: Add option to enable notification counts

 * The code is already there, this adds a runtime toggle for it.

Change-Id: I093fae9b0e2e263c11a41f07c9669c18afda978d

Conflicts:

	packages/SystemUI/src/com/android/systemui/statusbar/StatusBar.java
	packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java
Performance: Activity manager perf unnecessary recalc of oom_adj

If an activity has bound servicesor content providers,
updateLruProcessInternalLocked will be called recursively with
the oomAdj flag set, resulting in several recalculations of oomAdj
with unchanged data. Doing it at the end of the top level call to
updateLruProcessInternalLocked should be sufficient.

Change-Id: I95e27011e1d3519f256a9bd756cbb18d43e8db29
Status bar: Make brightness control more responsive

When touching the status bar, screen brightness can be changed after a counter
reaches a threshold. Previously any y-axis movement above a certain velocity
would reset the counter, making it very difficult for the user to smoothly
adjust brightness. With this patch such movements will simply cause the counter
not to increment.

Will need testing to determine whether this makes it too easy to adjust
brightness by mistake.

Change-Id: I3dc9185f0240b58b59dd0b641f96f8cf8e97ed9f
Framework : Lockscreen background customization (1/2)

Allow user to customize lockscreen background (port from cm7)

Part 2 : http://review.cyanogenmod.com/#/c/16914/
Part 3 : Minor edits
Part 4 : Fix crash on tablets. Added nullcheck to ViewGroup Layout
Part 5 : Add missing id to layout
Part 6 : Reordering/renaming of setBackground

Change-Id: I3f904486b8c7bcfcb63f54937810f6ee9c1721ef

Conflicts:

	core/java/android/provider/Settings.java
	core/res/res/layout/keyguard_screen_tab_unlock.xml
	policy/src/com/android/internal/policy/impl/LockScreen.java
Add NT_MODE's for NETWORK_MODE's 8 and 10

as defined in RILConstants.java

The RIL in newer motorola phones is set to 10 as default.
Signed-off-by: dhacker29 <davidhackerdvm@gmail.com>

Change-Id: Ic80a9d984be40a5f921204e8997943b44c52d421
Fix off-by-one error when filtering application UIDs

A filtering check in writeLPr() mistakenly includes the first application UID
(10000) with the result that the package with UID 10000 is missing from
packages.list. This patch fix the error.

Change-Id: I3651beb346290db8e09317391b95a77aed1946b6
Signed-off-by: Magnus Eriksson <eriksson.mag@gmail.com>
Prevent empty overflow popup when there are no overflow items.

On a device with a hardware menu key, an empty overflow window can be displayed
if there are no items in said overflow menu. This leads to the next user touch
being swallowed in the action of dismissing the invisible window.

Change-Id: I9191e4b2e1ed4888e4bc7261e8b3f095a272a9b5
Issue: Foreground activity performs [Resume] and [Pause] when any process died in sleep mode.

Step to Reproduce
1)	Turn off device’s screen. (Sleep mode)
2)	Kill any process.
A.	Engineer Version: kill [PID]
B.	User Version: am force-stop [Package Name]
3)	Foreground activity proceed [Resume] and [Pause] consecutively.

Reason: Since ICS version, activity goes to stopped status when screen turns off.
stopIfSleepingLocked( ) makes activity to stopped status but, pauseIfSleepingLocked( ) was used in GB
and, activity keep paused status and, this problem did not occur.
This change give effect to resuming activity when any process was killed.
Because, resume is proceed without exception for activity status.
The exception only filtered for [ActivityState.PAUSED] in sleep or shutdown mode.
and, resume complete flow when activity status was [ActivityState.STOPPED].

Solution for this issue:
We think that exception’s condition have to change if stopped activity status is intended in sleep mode.
According to activity life cycle, activity can not resume from stop status.

Also check [ActivityState.STOPPING]. :)

Change-Id: Icca3366ac30ffa3b18f6e2393e4d7309089ef26a

Conflicts:

	services/java/com/android/server/am/ActivityStack.java
Fix potential NPE when saving fragment state.

If a fragment's saved view state is null and the user
visible hint is true then the `result` bundle will have
never been initialized to a value resulting in a
`NullPointerException`.

Mirrors support library change I8ba585bc6b9298841490d64bc22a8219cd261adb.

Change-Id: Iabd5ac293d2ece3771da9ef257479eca0dcd523c
Input: Fix some Applications ANR issue in monkey test

Issue Description:
When do monkey test on some applications, there is big probability get ANR issue. one example is as following:
    adb shell monkey -p com.google.android.street -v 500000

Root Cause:
situation 1. InputDispatcher Thread calls findTouchedWindowTargetsLocked routine, there is a AMOTION_EVENT_ACTION_DOWN event
             and it can find a splittable touched window for this event , then mTouchState.split set to true.

situation 2. WMS Thread calls setInputWindows routine and all TouchedWindows associated with mTouchState are removed ,
             mTouchState.split status still keep true.

situation 3. InputDispatcher Thread calls findTouchedWindowTargetsLocked routine, there is a AMOTION_EVENT_ACTION_POINTER_DOWN event
             and it can find found touched window, exit window loop in following code :
                  if (windowInfo->visible) {
                    if (! (flags & InputWindowInfo::FLAG_NOT_TOUCHABLE)) {
                        isTouchModal = (flags & (InputWindowInfo::FLAG_NOT_FOCUSABLE
                                | InputWindowInfo::FLAG_NOT_TOUCH_MODAL)) == 0;
                        if (isTouchModal || windowInfo->touchableRegionContainsPoint(x, y)) {
                            if (! screenWasOff
                                    || (flags & InputWindowInfo::FLAG_TOUCHABLE_WHEN_WAKING)) {
                                newTouchedWindowHandle = windowHandle;
                            }
                            break; // found touched window, exit window loop
                        }
                    }

situation 4. The following code will have problem after situation 3 in below conditions:
             newTouchedWindowHandle doesn't support split , isSplit is true ( last time touched window is splittable )
             mTempTouchState.getFirstForegroundWindowHandle will always return NULL due to situation 2

            // Figure out whether splitting will be allowed for this window.
            if (newTouchedWindowHandle != NULL
                    && newTouchedWindowHandle->getInfo()->supportsSplitTouch()) {
                // New window supports splitting.
                isSplit = true;
            } else if (isSplit) {
                // New window does not support splitting but we have already split events.
                // Assign the pointer to the first foreground window we find.
                // (May be NULL which is why we put this code block before the next check.)
                newTouchedWindowHandle = mTempTouchState.getFirstForegroundWindowHandle();
            }

            The window says it does not want to support splitting, so the touches should go to one of the previously split windows except
            that there are none, which result to "goto Unresponsive" in findtouchedWindowTargetsLocked routine.
            This is not the correct behavior because the user did actually touch something.

situation 5. InputDispatcher Thread will call dispatchOnce repeated to try to dispatch this AMOTION_EVENT_ACTION_POINTER_DOWN event,
             then ANR timeout ( 5000ms ) will be exceeded after several times "goto Unresponsive"in findtouchedWindowTargetsLocked routine.

Solution:
In situation 4 we should drop the touch. If the newly touched window was splittable then we wouldn't drop the touch.
It's only when the newly touched window was not splittable where we will drop the touch.

Change-Id: Iab2c06ce0597ac77eb886ccd9d84646c86723bdb
Author: Jeffrey Brown <jeffbrown@android.com>
Author: Erjun Ding <erjunx.ding@intel.com>
Author: Zhenghua Wang <zhenghua.wang@intel.com>
Author: Jack Ren <jack.ren@intel.com>
Author: Bruce Beare <bruce.j.beare@intel.com>

Conflicts:

	services/input/InputDispatcher.cpp

Conflicts:

	services/input/InputDispatcher.cpp
telephony: support for setting add. audioparams for incall audio

Change-Id: Ic6f72fba542e1421631826d9bcd86340064c942b
ipconfig.txt: fix a possible error in parsing

The format of /data/misc/wifi/ipconfig.txt is this one
  <version>
  <netA_key1><netA_value1><netA_key2><netA_value2>...<EOS>
  <netB_key1><netB_value1><netB_key2><netB_value2>...<EOS>

On the defy, i had an error on boot regarding a missing "id" in NetworkStats,
so i compared on another device...

It appears that defy one format was :
  <version><EOS>
  <netA_key1><netA_value1><netA_key2><netA_value2>...<EOS>

I dont know exactly what caused this format error,
maybe because the quota and usage stats are enabled on it.

Change-Id: I4cf70fe88688341b8eea007a08910acb6f4fcff7
Brightness toast panel - dialog displayed showing brightness when using statusbar brightness control

Change-Id: I8f02f12ae6c8262a1df2bb3218dc17109cd90587
Fix Keyguard Password Screen Layout

Change-Id: I95913f70a821dbab6d2618803f9f77a4cb55439b
Merge "Fix Keyguard Password Screen Layout" into ics
StatusBarIconView: fix SystemUI crash on boot

Change-Id: I0577074ea3f4dcc1f17eb05f362031cb6f263989
Merge branch 'ics' of git://github.com/LiquidSmoothROMs/android_frameworks_base into ics