add NFC toggle (1/2)

Change-Id: I9ee50676f4d5229ec78e80c876b8d329722fd535
Signed-off-by: sethyx <sethyx@gmail.com>
Actually copy ProTekk.ogg to the correct location

Patch-set 1: We actually use tabs here.

Change-Id: Ib63a2cd934144cc4a2982ab7eed69e132e183820
Signed-off-by: Gary Danko <gdanko@gmail.com>
move weather images to framework-res

- decreases size of systemui
- allows for access throughout the system without
      duplication

Change-Id: I06e90d39d365587ee15bf1b566ec81b39f79d3b0
telephony: when building apn list, use preferred apn if it can handle requested type

GsmDataConnectionTracker::setupData() does not consult TelephonyProvider when it
picks an APN for mms. It just uses apnContext.getNextWaitingApn() which picks the
first one in the list. On AT&T it picks wap.cingular, which is wrong for LTE.

Since the data connection is made properly, setupData() stops scanning and never
tries the correct APN (pta). The result is sending of the mms just hangs.

This change causes GsmDataConnectionTracker::buildWaitingApns() to first try the
currently active APN if it can handle the type of APN being requested, then it
tried the preferred APN and then the rest of the APN's, in that order.

This fixes the MMS problem since the correct APN (pta) is chosen.

Change-Id: I076b88d42f59241cf468d678ad0e628d0f2d9e8d
Merge "telephony: when building apn list, use preferred apn if it can handle requested type" into ics
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
libmedia: build with AudioParameter if needed

Usage:
BOARD_USES_LIBMEDIA_WITH_AUDIOPARAMETER := true

Change-Id: I4d33afcf2af200f70120ee9b9ee03c8830712686
Distance max set incorrectly

The distance max used in the MotionRange is calculated
incorrectly.

Looks like a copy-and-paste error.

Change-Id: I2b6daab088df0fb69e05682b67ca33524ff35987
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
Do not dispatch context selection events to non-visible fragments.

When used in a `ViewPager`, fragments that are present on the adjacent,
cached pages will receive context selection dispatches which, depending
on your fragment contents, can be difficult to determine whether or not
the event truly originated from your view.

By using the visible hint we restrict dispatching to only those fragments
which are marked as being visible. Since the fragment pager adapter
updates this setting properly most implementations will be afforded this
fix without any change required. If the user is implementing their own
adapter they likely already understand the implications of these cached
fragments and the reponsibility for updating the boolean falls to them.

Mirrors support library change Ie6a72c1c82c2784774373670007b6f5948fe16da

Change-Id: I1bc6f74e26660ef4a3c20419c077e37992412e94
Aligning native Parcel implementation to Java.

The Java implementation of writing the RPC response header
calculates the length of the header including the 4 bytes
specifying the header length but the native implementation
excludes the 4 bytes specifying the length from the header
length.
The native implementation has been aligned to the Java impl.

Change-Id: I325bf272a63152d8fded4cf4e51a906b5a9bfe19
telephony: support for setting add. audioparams for incall audio

Change-Id: Ic6f72fba542e1421631826d9bcd86340064c942b
Merge "Actually copy ProTekk.ogg to the correct location" into ics
LGEQualcommUiccRIL: Fix signalstrength on pre-ICS radio libraries

And datacall parameters, too
Change-Id: Ifc6f959044622bab2e7198ad15ce6f56dde370f7
Merge "LGEQualcommUiccRIL: Fix signalstrength on pre-ICS radio libraries" into ics
telephony: allow to specify on and off values for setting additional audioparams

Change-Id: I574c0315f0cadc65b064aa621e0f35160a369b2d
SystemUI: fix observer being initialized twice in StatusBarIconView

credit goes to garyd9 for spotting it

Change-Id: I4c6d71bf51304f893fe049a775a784f83e8149ef
Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com>
Merge "add NFC toggle (1/2)" into ics
add NFC polling mode setting (3/3)

Change-Id: I5a3672a57da16e812cc180dcac24c0a0aee4abaa
Signed-off-by: sethyx <sethyx@gmail.com>
Lockscreen: Add weatherpanel to lockscreen (1/2)

Change-Id: Iae85744fa304916743bdd104cab4365b91f3c0b7
Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com>