launcher3: Avoid mutating model on collisions in Launcher3.

Collisions should be handled prior to binding in the ui layer.

The following change adds extra logging to help identify cases
where this might occur.

Bug: 417021465
Flag: EXEMPT Bug fix
Test: manual
Change-Id: I5549c94fe81eb13088f8c56a5ff797d46d4bedb2
This commit is contained in:
Adnan Begovic
2025-05-12 15:49:02 -07:00
parent ba7849663e
commit 1ada2c53ea
+2 -1
View File
@@ -2240,7 +2240,8 @@ public class Launcher extends StatefulActivity<LauncherState>
if (FeatureFlags.IS_STUDIO_BUILD) {
throw (new RuntimeException(desc));
} else {
getModelWriter().deleteItemFromDatabase(item, desc);
// b/417021465 - Avoid mutating the model in the UI layer.
Log.e(TAG, desc, new Exception());
continue;
}
}