summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/provider/RestoreDbTask.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/provider/RestoreDbTask.java')
-rw-r--r--src/com/android/launcher3/provider/RestoreDbTask.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/com/android/launcher3/provider/RestoreDbTask.java b/src/com/android/launcher3/provider/RestoreDbTask.java
index d643a0b49..fb335516f 100644
--- a/src/com/android/launcher3/provider/RestoreDbTask.java
+++ b/src/com/android/launcher3/provider/RestoreDbTask.java
@@ -16,8 +16,6 @@
package com.android.launcher3.provider;
-import static com.android.launcher3.Utilities.getIntArrayFromString;
-import static com.android.launcher3.Utilities.getStringFromIntArray;
import static com.android.launcher3.provider.LauncherDbUtils.dropTable;
import android.app.backup.BackupManager;
@@ -40,6 +38,7 @@ import com.android.launcher3.WorkspaceItemInfo;
import com.android.launcher3.Utilities;
import com.android.launcher3.logging.FileLog;
import com.android.launcher3.provider.LauncherDbUtils.SQLiteTransaction;
+import com.android.launcher3.util.IntArray;
import com.android.launcher3.util.LogConfig;
import java.io.InvalidObjectException;
@@ -240,8 +239,8 @@ public class RestoreDbTask {
SharedPreferences prefs = Utilities.getPrefs(context);
if (prefs.contains(APPWIDGET_OLD_IDS) && prefs.contains(APPWIDGET_IDS)) {
AppWidgetsRestoredReceiver.restoreAppWidgetIds(context,
- getIntArrayFromString(prefs.getString(APPWIDGET_OLD_IDS, "")),
- getIntArrayFromString(prefs.getString(APPWIDGET_IDS, "")));
+ IntArray.fromConcatString(prefs.getString(APPWIDGET_OLD_IDS, "")).toArray(),
+ IntArray.fromConcatString(prefs.getString(APPWIDGET_IDS, "")).toArray());
} else {
FileLog.d(TAG, "No app widget ids to restore.");
}
@@ -253,8 +252,8 @@ public class RestoreDbTask {
public static void setRestoredAppWidgetIds(Context context, @NonNull int[] oldIds,
@NonNull int[] newIds) {
Utilities.getPrefs(context).edit()
- .putString(APPWIDGET_OLD_IDS, getStringFromIntArray(oldIds))
- .putString(APPWIDGET_IDS, getStringFromIntArray(newIds))
+ .putString(APPWIDGET_OLD_IDS, IntArray.wrap(oldIds).toConcatString())
+ .putString(APPWIDGET_IDS, IntArray.wrap(newIds).toConcatString())
.commit();
}