Fixing shortcuts not getting migrated to app icons

Bug: 22410445
Change-Id: I939c59270529daf51638aa30b30763c18a2ce6a5
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java
index 7414a22..9d2a890 100644
--- a/src/com/android/launcher3/LauncherModel.java
+++ b/src/com/android/launcher3/LauncherModel.java
@@ -1999,7 +1999,7 @@
                                                 "constructing info for partially restored package",
                                                 true);
                                         info = getRestoredItemInfo(c, titleIndex, intent,
-                                                promiseType, cursorIconInfo, context);
+                                                promiseType, itemType, cursorIconInfo, context);
                                         intent = getRestoredItemIntent(c, context, intent);
                                     } else {
                                         // Don't restore items for other profiles.
@@ -3380,7 +3380,7 @@
      * to a package that is not yet installed on the system.
      */
     public ShortcutInfo getRestoredItemInfo(Cursor c, int titleIndex, Intent intent,
-            int promiseType, CursorIconInfo iconInfo, Context context) {
+            int promiseType, int itemType, CursorIconInfo iconInfo, Context context) {
         final ShortcutInfo info = new ShortcutInfo();
         info.user = UserHandleCompat.myUserHandle();
 
@@ -3406,7 +3406,7 @@
         }
 
         info.contentDescription = mUserManager.getBadgedLabelForUser(info.title, info.user);
-        info.itemType = LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT;
+        info.itemType = itemType;
         info.promisedIntent = intent;
         info.status = promiseType;
         return info;
diff --git a/src/com/android/launcher3/LauncherProvider.java b/src/com/android/launcher3/LauncherProvider.java
index ee72aea..cc5e18b 100644
--- a/src/com/android/launcher3/LauncherProvider.java
+++ b/src/com/android/launcher3/LauncherProvider.java
@@ -772,7 +772,7 @@
 
                     long id = c.getLong(idIndex);
                     updateStmt.bindLong(1, id);
-                    updateStmt.execute();
+                    updateStmt.executeUpdateDelete();
                 }
                 db.setTransactionSuccessful();
             } catch (SQLException ex) {