New launcher2 icon migration algorithm.

The user will be able to request "icon migration", which is
not a direct mapping of the old workspace, but rather
follows this heuristic for bringing the user's favorite
icons (by dint of their existence on the workspace) into
Launcher3:

Workspace shortcuts are placed in lexicographic order on the workspace
starting at screen 0 (leaving the bottom row of screen 0 empty to make
sure there's room to move things around). Folders are preserved and
their contents sorted. Duplicate icons (that is, shortcuts
with the same intent, pursuant to some cleanups) are removed.

Hotseat icons are migrated in their original place, unless their new
location is not accommodated by the hotseat (i.e. the L3 hotseat is
too small on this device), in which case they're treated like any
other shortcut and tossed into the workspace.

To test, turn on Launcher.ENABLE_DEBUG_INTENTS and then:

$ adb shell am broadcast -a com.android.launcher3.action.DELETE_DATABASE
$ adb shell am broadcast -a com.android.launcher3.action.MIGRATE_DATABASE

Bug: 12416411
Change-Id: Ia5c56f36c11455867ea20a39f70210f595020a87
Adding migration Clings. (Bug 11973614)

- Refactoring Launcher cling code out to LauncherClings.

Change-Id: Iff4f84f5b8bfeb69b1be0b4802022c3eb20b6f2c
Updating assets and text for migration cling. (Bug 11973614)

Change-Id: I69ffc1581cc43511b4f42ebb2735afe4c0b44131
backup keys that might have slipped past

seems a little paranoid, but can't hurt.

Bug: 12455866
Change-Id: If9da4cc021ee4fac32c822a91fabda69bf3ff8aa
Set App context from WallpaperChanged receiver. (Bug 12525684)

Change-Id: Ie037d74d31e6b05b0ae5bb25ed1bf1c639a28a5f
hide launcher restore behind a flag.

enable with 'adb shell settings put secure launcher_restore_enabled 1'
before signing into wiped device

Bug: 12532845
Change-Id: I1471c39dac2e6e1412f7720b1ba8edf46273c593
Increasing string length for translation (Bug 12524122)

Change-Id: I24e053790812779ec07de99c6f763965584a1bb7
Add ability to center the crop (disabled)
Fix longpress crash.

The AllApps button doesn't usually accept longpresses, but
you can trick it into trying by holding one finger on it and
another on another icon in the hotseat. This patch defends
against that and bails out if the longpressed item has the
all apps rank (position in hotseat).

Bug: 11740833
Change-Id: I99785ccbc9e6dc6be2a9e56289b3cc0275fbb65c
restore app favorites and screens

version 0: restore assuming apps are already installed.

Bug: 10779035
Change-Id: I7f9aa418a7d3d5460a79a229c0fbc80305b5eb5c
Properly saving migration cling keys.

Change-Id: Id52a12da6af0fc91463dae07bbeb355ee04873d0
Fix NPE in Workspace.onDropCompleted

Bug: 11627757
Change-Id: I9dc86856d4bc00253d6350d157be541a8c46888d
search for a valid journal

there are too many bytes, so we need to find the valid subset,
without stepping past the end!

Bug: 12489602
Change-Id: Ic9d7c804c199740ff50d0864f99632ae68619369
Keep selected wallpaper on configuration change.

Keeps the currently selected wallpaper when a configuration (for example,
device rotation) occurs. This change also effects the logic when the thumbnail
gets displayed after loading the image from an external URI, as this must be
now handled independently of which wallpaper is selected.

Bug: 11007874
Change-Id: Id676c378aec38d0b21e5d9150846f33aff415cad
Ensure that hasFirstRunActivity is only called when necessary

Change-Id: I834abcd82f46c6f096f5c92452b34c668a4a3d86
Fixing drop targets in phone / small tablet landscape (issue 12192781)

Change-Id: I4dc8a82c8cd5ef279506e7868e33a455fba5a3be
Remove settings in overview mode for Launcher3.

The appereance of the settings button in overview mode is now dependent on
a overridable method, such that we can have it in GEL, but not in Launcher3.
This change also adjusts the logic of how wide the overview panel is, depending
on how many items we have.

Bug: 12441429
Change-Id: Ibf537c26602785f565292cbfa213eb123469ebcd