Prevent factory reset for short passwords in CryptKeeper

Since patterns and passwords can't be shorter than 4
elements, we shouldn't count them against attempts to unlock
the device.  If we do, we risk resetting the device
due to stray input.

Bug: 18211475
Bug: 18273380

Change-Id: Ib329cd3383471483cda68bfac4278b17d0c09c57

Conflicts:
	src/com/android/settings/CryptKeeper.java

Conflicts:
	src/com/android/settings/CryptKeeper.java
Merge remote-tracking branch 'aosp/lollipop-release' into lollipop
Settings: Add missing back button to About > Status

(cherry picked from commit a4687f1cc1b1f3f1fabce6a651bedb437dafee98)

Change-Id: Ib1e561b1de644d43579db2879d62e6d54bcf1fbe

(cherry picked from commit 52bd061f9ead66dc731b92316f989e990267a5df)
Partition information menu

Credit and Thanks to nobodyAtall

Change-Id: I4859db251883181947e0e96c3d4969a27da9de62
Fix memory leak issue in application settings

If opening Main menu->Settings->Apps, and rotating the phone
about 50 times, Settings force closes and out of memory occur.
This is because after ManageApplications onDestroy, references
of ApplicationsState have not been release. So, they will not
be garbage collected. It leads to OOM and force close. To
avoid this we need to release the references of
ApplicationsState when ManageApplications onDestroy.

Also, when exiting ManageApplications or InstalledApps in
Settings there is a memory leak due to not releasing some
objects. This fix releases the Session objects to avoid
memory leak.

Change-Id: Icca7100bded0653a4ec7f2b4bd48a29262432a3b

(cherry picked from commit 8e1ff8262e6b88e918d417189c088a23a78cf2f8)
Change check for syncActive

In Manage Account settings if account is in syncing state
option provided to user is "sync now" which should be
"Cancel sync".

syncActive is set to true if getCurrentSyncsAsUser() returns
an empty list which means there are no active syncs.

syncActive should be set to false if getCurrentSyncsAsUser()
returns an empty list.

Change-Id: If78247a90bbca3e1a12553b6facb1315321f52cf

(cherry picked from commit e2172ea8e12ce92adf84f04989d17783adf0dd4c)
Show application's package name in the "App info" screen.

Change-Id: I7dac8ffa0b10abb5ff235750e90a96d801b2f919

(cherry picked from commit 20413edcd585e19348a73c9fd2e4a942cff95df9)

(cherry picked from commit a99585dec9270c122ad07d0b9bdd638e31bd50f3)
Settings : Add tap/pay help url

Change-Id: I41f37dff0fa2eb547f84aaf776950f0f42e6e36f

(cherry picked from commit f3cad824d4cde36fd1e12d78e99c3069a83b391e)

(cherry picked from commit aa4db1f4e902776210f87ea4b5f02f0065c189aa)
bluetooth: Don't crash when the local adapter is not set

In devices where bluetooth is not working (like the emulator or devices
in development), the bluetooth Settings crashes when closing the activity.

Most of the code checks for the nullability of the local adapter except
for this particular piece. This is usually not a worry for production
devices and I wouldn't usually worry about this but since the rest of the
code performs the nullability check it seems silly to crash onPause.

Change-Id: I7c1d3b43969b516336be770957008ef2054d312f
TrustedCredentials: Don't crash when the activity is paused

If you press Settings -> Security -> Trusted Credentials, then press
 back before the loading finishes, the loader async task will still
try to dereference the activity which will cause an NPE.

This patch fixes that by getting and holding a reference to the
context in the beggining and bailing early if it is null.

Change-Id: Ie03734d5f184821df5d8729fc4a16eb51cdeebf5
bluetooth: Show a refresh icon on the select devices screen

The refresh menu is hidden behind an overflow which is
pointless. This patch shows the refresh icon if there is
enough room.

Change-Id: I35f19c42054b05388f7b8fcb82e0f3bd60e2d618
Setting: add app move to external storage

Add support tp move APP to external storage.

Change-Id: I9d8fef2df2f36b4d8b611d8ffe87990407b44742