am 446d0fb6: am 41a12d22: When closing a folder, make sure to remove it from the list of drop targets.

Merge commit '446d0fb65932924aaeab203f71c4b31d234bf7dd' into eclair-mr2-plus-aosp

* commit '446d0fb65932924aaeab203f71c4b31d234bf7dd':
  When closing a folder, make sure to remove it from the list of drop targets.
This commit is contained in:
Joe Onorato
2009-10-31 15:50:54 -07:00
committed by Android Git Automerger
+2 -3
View File
@@ -202,6 +202,7 @@ public final class Launcher extends Activity
super.onCreate(savedInstanceState);
mModel = ((LauncherApplication)getApplication()).setLauncher(this);
mDragController = new DragController(this);
mInflater = getLayoutInflater();
mAppWidgetManager = AppWidgetManager.getInstance(this);
@@ -523,7 +524,6 @@ public final class Launcher extends Activity
* Finds all the views we need and configure them properly.
*/
private void setupViews() {
mDragController = new DragController(this);
DragController dragController = mDragController;
DragLayer dragLayer = (DragLayer) findViewById(R.id.drag_layer);
@@ -1318,8 +1318,7 @@ public final class Launcher extends Activity
ViewGroup parent = (ViewGroup) folder.getParent();
if (parent != null) {
parent.removeView(folder);
// TODO: this line crashes.
//mDragController.removeDropTarget((DropTarget)folder);
mDragController.removeDropTarget((DropTarget)folder);
}
folder.onClose();
}