Merge "Fixing shortcuts not getting migrated to app icons" into ub-launcher3-burnaby

This commit is contained in:
Sunny Goyal
2015-07-14 17:48:30 +00:00
committed by Android (Google) Code Review
2 changed files with 4 additions and 4 deletions

View File

@@ -1999,7 +1999,7 @@ public class LauncherModel extends BroadcastReceiver
"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 @@ public class LauncherModel extends BroadcastReceiver
* 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 @@ public class LauncherModel extends BroadcastReceiver
}
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;

View File

@@ -772,7 +772,7 @@ public class LauncherProvider extends ContentProvider {
long id = c.getLong(idIndex);
updateStmt.bindLong(1, id);
updateStmt.execute();
updateStmt.executeUpdateDelete();
}
db.setTransactionSuccessful();
} catch (SQLException ex) {