From 48465319f6f6badd7fd5cb627d814b9f9d39b22f Mon Sep 17 00:00:00 2001 From: Sihua Ma Date: Tue, 30 May 2023 15:01:34 -0700 Subject: [PATCH] Possibly fix the widget restoration bug The update will always be considered as failed because we always return 0 for all the commits. Test: N/A Bug: 234700507 Change-Id: I33ee8af996cef62dbc14349f9a7dd3cb72836ab6 --- src/com/android/launcher3/util/ContentWriter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/launcher3/util/ContentWriter.java b/src/com/android/launcher3/util/ContentWriter.java index 7c5ef4db0c..9910dc2e70 100644 --- a/src/com/android/launcher3/util/ContentWriter.java +++ b/src/com/android/launcher3/util/ContentWriter.java @@ -106,7 +106,7 @@ public class ContentWriter { public int commit() { if (mCommitParams != null) { - mCommitParams.mDbController.update( + return mCommitParams.mDbController.update( Favorites.TABLE_NAME, getValues(mContext), mCommitParams.mWhere, mCommitParams.mSelectionArgs); }