Refactoring common methods

Change-Id: Id6d3072dd3a6d7f54e9591abbeffd9bd51c7403d
diff --git a/src/com/android/launcher3/CellLayout.java b/src/com/android/launcher3/CellLayout.java
index 72e2891..a3500aa 100644
--- a/src/com/android/launcher3/CellLayout.java
+++ b/src/com/android/launcher3/CellLayout.java
@@ -613,11 +613,7 @@
             if (lp.cellVSpan < 0) lp.cellVSpan = mCountY;
 
             child.setId(childId);
-            if (inLayout) {
-                mShortcutsAndWidgets.addView(child, index, lp, true);
-            } else {
-                mShortcutsAndWidgets.addView(child, index, lp, false);
-            }
+            mShortcutsAndWidgets.addView(child, index, lp, inLayout);
 
             if (markCells) markCellsAsOccupiedForView(child);