Revert "Fixing crash in empty folders. (Bug 11627191)"
This reverts commit 68b667848e.
Change-Id: I51da495d6f8ef98b268c23cce02cce5ef1c7ea00
This commit is contained in:
1 parent
68b667848e
commit
72b520c956
3 files changed
+6
-18
No files matched your search
@@ -408,15 +408,6 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList
|
||||
mFolderName.setText("");
|
||||
}
|
||||
updateItemLocationsInDatabase();
|
||||
|
||||
// In case any children didn't come across during loading, clean up the folder accordingly
|
||||
mFolderIcon.post(new Runnable() {
|
||||
public void run() {
|
||||
if (getItemCount() <= 1) {
|
||||
replaceFolderWithFinalItem();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -825,7 +816,7 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList
|
||||
View v = list.get(i);
|
||||
ItemInfo info = (ItemInfo) v.getTag();
|
||||
LauncherModel.moveItemInDatabase(mLauncher, info, mInfo.id, 0,
|
||||
info.cellX, info.cellY);
|
||||
info.cellX, info.cellY);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1074,7 +1065,7 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList
|
||||
public void run() {
|
||||
CellLayout cellLayout = mLauncher.getCellLayout(mInfo.container, mInfo.screenId);
|
||||
|
||||
View child = null;
|
||||
View child = null;
|
||||
// Move the item from the folder to the workspace, in the position of the folder
|
||||
if (getItemCount() == 1) {
|
||||
ShortcutInfo finalItem = mInfo.contents.get(0);
|
||||
@@ -1104,8 +1095,6 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList
|
||||
View finalChild = getItemAt(0);
|
||||
if (finalChild != null) {
|
||||
mFolderIcon.performDestroyAnimation(finalChild, onCompleteRunnable);
|
||||
} else {
|
||||
onCompleteRunnable.run();
|
||||
}
|
||||
mDestroyed = true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user