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
Avoiding horizontal keypad navigation trapping within gallery.

Non touchscreen devices such as Google TV require the keypad
navigation to properly move the focus among widgets.

The Gallery is misshandling the keypress event and avoiding
the focus from going to other widgets on it's sides upon
keypress even after the user has reached it's first and
last items.

Change-Id: If32ee57e8513cac692deb161e1941d6cc85e3188
Signed-off-by: David Sobreira Marques <dpsmarques@gmail.com>
Fixes an issue that occured unexpected exception "pointerIndex out of range".

The findNewActiveIndex method may return -1.
So, the code should check case of -1 before event.getPointerId
and if index0 is -1, gesture should be ended immediately.

Change-Id: I4aae5c84e3db61d10b0bfcfa7bfa6b9115231a52
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>
Fixed group and child view caching in SimpleExpandableListAdapter.

Now the adapter reports the correct type count and type for group and child
views by overriding the respective methods from the base class. Each group
view has two types, one for expanded views, one for collapsed views. Each
child view has two types, one for the last view within a group, one for the
other views within a group.

Change-Id: I117b2c0f7e98fb7fe2fdd35c15f7d1f9dc06674f
Signed-off-by: Georg Hofmann <georg.hofmann@gmail.com>
Build overlay packages just like regular packages.

Previously, building overlay packages required passing aapt its -o flag.
This commit decouples the idmap generation code from the effects of the
-o flag.

Since this commit renders the -o flag obsolete, support for the flag was
removed from aapt as well.

Change-Id: Ied2e0ab8cb800e49623f0a2044b06cd4935473d5
Runtime resource overlay: clean-up.

This is a combination of three minor clean-up tasks:

- Generate correct idmap even if name lookup fails:

  Any resources following a resource with a spec but no actual values
  would receive an incorrect ID in the idmap due to an accumulating offset
  error. To combat this, a dummy value is inserted in the idmap whenever
  a resource with a spec but no values is encountered.

- Optimize pruning of padding zeroes in idmaps:

  Earlier, trailing zeroes were iteratively popped from the end of each
  type block of an idmap. This commit instead tracks where to make the
  cut, and does so with a single function call.

- aapt: warn about resources which lack values:

  The resource framework assumes every resource to have a value for
  at least one valid configuration. However, if multiple resource
  directories are used (several -S options to aapt), the list of
  configurations is limited by dpi (-c option to aapt) and a resource
  is only available in discarded dpi configurations, aapt will create
  a resource entry where each configuration lack an actual value. This
  commit lets aapt emit a warning whenever this has happened.

Change-Id: Ic7451b7f4adfef5bfa6b0d7e64e057f317a2cdaa

Conflicts:

	libs/utils/ResourceTypes.cpp
Improve robustness of resource overlay test suite.

Test runner will now create directory /vendor/overlay/framework, if
missing.

Also, move wallpaper from drawable to drawable-nodpi for it to actually
take effect on ICS code.

Change-Id: I7615345e847c5fca91aedc459f6aa3316a45aab5
fix build
try to fix Back Button Kill bug