* commit '5c61d17f0ff67440ce9fb578043a4507b537aa0c': Prevent exception in production when icons collide during bind
This commit is contained in:
@@ -3982,7 +3982,15 @@ public class Launcher extends Activity
|
||||
if (item.container == LauncherSettings.Favorites.CONTAINER_DESKTOP) {
|
||||
CellLayout cl = mWorkspace.getScreenWithId(item.screenId);
|
||||
if (cl != null && cl.isOccupied(item.cellX, item.cellY)) {
|
||||
throw new RuntimeException("OCCUPIED");
|
||||
View v = cl.getChildAt(item.cellX, item.cellY);
|
||||
Object tag = v.getTag();
|
||||
String desc = "Collision while binding workspace item: " + item
|
||||
+ ". Collides with " + tag;
|
||||
if (LauncherAppState.isDogfoodBuild()) {
|
||||
throw (new RuntimeException(desc));
|
||||
} else {
|
||||
Log.d(TAG, desc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user