Fixing nullpointer error in genering error description

Bug: 383492095
Flag: EXEMPT bug fix
Test: Presubmit
Change-Id: I43c71bb62df45d53bd757daa3203f216229946a0
This commit is contained in:
Sunny Goyal
2024-12-11 11:41:06 -08:00
parent cea1888874
commit 0cb0166a2c
+2 -1
View File
@@ -2298,7 +2298,8 @@ public class Launcher extends StatefulActivity<LauncherState>
if (item.container == CONTAINER_DESKTOP) {
CellLayout cl = mWorkspace.getScreenWithId(presenterPos.screenId);
if (cl != null && cl.isOccupied(presenterPos.cellX, presenterPos.cellY)) {
Object tag = cl.getChildAt(presenterPos.cellX, presenterPos.cellY).getTag();
View occupiedView = cl.getChildAt(presenterPos.cellX, presenterPos.cellY);
Object tag = occupiedView == null ? null : occupiedView.getTag();
String desc = "Collision while binding workspace item: " + item
+ ". Collides with " + tag;
if (FeatureFlags.IS_STUDIO_BUILD) {