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
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 4e27e6f..36fa4c1 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -20,6 +20,7 @@
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.launcher3">
+ <uses-sdk android:targetSdkVersion="19" android:minSdkVersion="16"/>
<permission
android:name="com.android.launcher3.permission.PRELOAD_WORKSPACE"