Merge "Small cleanups around indexOfChild usage."
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarApps.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarApps.java
index 645baf3..04038bb 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarApps.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarApps.java
@@ -419,7 +419,6 @@
         }
 
         // "Move" the dragged app by removing it and adding it back at the target location.
-        int dragViewIndex = indexOfChild(mDragView);
         int targetIndex = indexOfChild(target);
         // This works, but is subtle:
         // * If dragViewIndex > targetIndex then the dragged app is moving from right to left and
@@ -513,8 +512,7 @@
         if (mDragView == null) {
             return;
         }
-        int index = indexOfChild(mDragView);
-        removeViewAt(index);
+        removeView(mDragView);
         endDrag();
     }