frameworks/base: Update quick launch shortcut icons/resources

Update the existing icons and add "xxhdpi" versions created
from a vector template. This commit cleans also the resource
files a bit up.

Screenshot: http://goo.gl/6CrMYr

Change-Id: I45abee5cf13cd239eb5b4402019afac28d6d5952

Conflicts:
	core/java/com/android/internal/util/cm/NavigationRingConstants.java
	core/java/com/android/internal/util/cm/NavigationRingHelpers.java
	core/res/res/values/dimens.xml
	core/res/res/values/symbols.xml
	packages/SystemUI/src/com/android/systemui/cm/ActionTarget.java
Allow subclasses to override bindPreferences().

Allows them to modify adapter behaviour.

Change-Id: I6767e3988740b674fbdf40a903cd2ef3949ca7db
New navring icons for power menu and last app. Let's follow CM changes

Change-Id: I9a012061faa03879c6769cd5a202acc9d7d1f28b

Conflicts:
	core/res/res/drawable-mdpi/ic_navigation_ring_lastapp_activated.png
	core/res/res/drawable-mdpi/ic_navigation_ring_lastapp_normal.png
	core/res/res/drawable-xxhdpi/ic_navigation_ring_lastapp_activated.png
	core/res/res/drawable-xxhdpi/ic_navigation_ring_lastapp_normal.png
Themes: Style, boot animation, and wallpaper previews

Change-Id: I2b367bf5336c03f2a4972a05b68922065cd4a701
Fix the bug in replacing a fragment with itself.

Summary:

We are facing a bug that some fragments in our app got removed
randomly. We debugged the app and it seems there is a bug in
the fragment API.

When we we are trying to replace a fragment with itself. We will
try to make the operation a null op, then both `op.fragment` and
`f` will be reset to null.

  op.fragment = f = null;

But since it's inside a loop, if the list `mAdded` still have
items to be visited, the code will continue to the next
iteration. Then it will compare the fragment with null, and
reach the line:

  mManager.removeFragment(old, mTransition, mTransitionStyle);

Eventually it will delete all left fragments in the list `mAdded`.

This diff adds a break to abort the searching after we null
the operation.

Test Plan:

1) Tested with our app. No fragment is randomly removed.

Revert Plan:

Change-Id: I5dc2c07a1bb1d1da1b0fd4e5610d970d55a81e86
Tags:
Signed-off-by: Kang Zhang <kangzhang.cn@gmail.com>
ExpandableListView: Fix to nofity group collapse event

ExpandableListView is created with all groups as collapsed but this
isn't relayed to specified adapter. Fix is to invoke onGroupCollapsed
of ExpandableListAdapter via ExpandableListConnector.

Change-Id: I57614b1efb094ff7828d128c2885f7f009854984
frameworks: Make Spinner widget request the itemtype of the adapter

Prior to that change the itemtype is ignored, this prevent Spinner to
work with adapter containing multiple itemtype.

Change-Id: I1554f5bfd04c972f4eddb6da9d611b7f7ef4e0e7
Fix "pm list permissions" crash if resource string missing

The "pm list permissions" command lists detailed information about
each permission on the system, including its label and description,
both of which can be stored as translatable resource strings in APK
files.  However, it is possible that the resource identifiers for
these strings point to non-existent resources.  When this happens, the
loadText() method throws Resources.NotFoundException, causing the "pm"
command to abort prematurely, simply printing "Killed" to stdout and
a stack trace to logcat.

This commit fixes the crash by explicitly catching the
Resources.NotFoundException exception in loadText() and returning null
if it is thrown.  The loadText() method already has the potential to
return null so none of its callers need be modified.  This fixes the
crash and simply shows "label:null" and/or "description:null" in the
output if the string resource is missing.

Change-Id: I92273399e1dac6029163750d004940ee1da67428
Fix NullPointerException in ListView

There is a NullPointerException in `handleHorizontalFocusWithinListItem()`
because `selectedView.findFocus()` returns null and then there is no null
check when when the assigned variable `currentFocus` is used, although
`View.findFocus()` states that it may return null.

Change-Id: I6897027e9a2a238d9283e6b9f5146198989fcac0
Fall back to "tl" if "fil" is absent.

For JB-MR1, there was a hack that used "tl" where
we really meant "fil" because ICU didn't have localizations
for "fil". This has now been fixed, and we now support 3 letter
language codes for AAPT so we can use "fil" where required.

For the benefit of apps that need to target older platforms,
we fall back to "tl" if the app has assets for "tl" and the
resource locale is "fil".

See bugs 7291355, 7207176 and 8049507 for more context.

Change-Id: I1ac8502525f99b40f9091d5efd2df33518d47a41
Fix broken assumptions in LocalePicker.

This code assumed that the locale is always 5 chars in
length and was of the form xx-YY. This is not necessarily
true. The language can be 3 letters in length and the locale
might have a script and variant.

Also cleans up several nasty pieces of code and eliminates
unnecessary array copies and improves readability by using
idiomatic java.

bug: 15873165
bug: 10090157

Change-Id: Iab1cfd7b78e5772b1245654f2153caf63a96033d
Make sure we clean up

pruneDeadThumbnailFile need to close its cursor
in a finally block to avoid leak resouces.

Change-Id: I2646b91970e47ee80a721a2452215b7cae149d10
Fix Aapt so that duplicate package ID errors are not incorrectly reported.

Aapt falsely reports package ID conflicts unless base packages are included
in strictly ascending order based on their package IDs. This fix addresses
that issue while still detecting and reporting conflicts correctly when they
actually exist.

Change-Id: Ic8059b87f919641d086df88d1556f5fa0063739f
WallpaperManager: add NULL pointer check for getCropAndSetWallpaperIntent

Originally the api 'getCropAndSetWallpaperIntent' does not check
whether the parsed parameter is a NULL pointer, as leads to the
whole app crash if it call this api with a null parameter accidentally.
A null pointer check logic is added into its original parameter check
logic, so that this API will throw an IllegalArgumentException if it
is parsed with a null pointer

Change-Id: Ib7de40e571419d09e1a744edc969eb7162766b75
Lockscreen blur and blur radius (1/2)

Change-Id: Iab92bc2adfc2c861cd4f1baccdba2409a5deb788

Lockscreen Blur: Disable if music is playing

Some apps don't employ full screen album art.
In that case album art doesn't override wallpaper & content behind screen is clearly visible.
This fixes that issue.

Conflicts:
	core/java/android/provider/Settings.java
	packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java
LN: Fix possible NPE

Change-Id: Iced239623d6580dcade06cd9a3f82a4d109e0aca
Fix crash in widget pager - DO NOT MERGE

Fixes bug 14299491

Change-Id: I3c94cbd7f7923dc5a429c9929bc432a5dd29d04f
KeyChain: add explicit package for getPrivateKey.

Bug: 9964538
Change-Id: If67c1938e9506d4fa81b241bcbce2193d1b194ef
Use the correct package name for CHOOSER.

Bug: 13013106
Change-Id: I1f715de18e7108274f5a98234376d48c2d329438
frameworks/base: Fix binder parcel leak with getMetadata() API

When VideoView calls getMetadata API of MediaPlayer, parcel object
is getting allocated by MediaPlayer and metadata is created over
parcel object. This metadata object is returned to the VideoView
which is being GC without calling recycle on parcel which was
creating leak in binder virtual memory.

CRs-fixed: 669303
Change-Id: I1e265909ee42d4fabd8b2552668b3d84af994294