diff options
author | Adam Cohen <adamcohen@google.com> | 2011-08-31 22:25:51 -0700 |
---|---|---|
committer | Adam Cohen <adamcohen@google.com> | 2011-08-31 23:01:54 -0700 |
commit | 3c81a3835b27bbacf8c87eedfc244528a22973ad (patch) | |
tree | 8ed3f36038bd731f2c4fa0b38bea6a782124e9d4 /src/com/android/launcher2/Launcher.java | |
parent | 3f4889e54fbb3c09fbc88cbc33be9e489d557f82 (diff) | |
download | packages_apps_trebuchet-3c81a3835b27bbacf8c87eedfc244528a22973ad.zip packages_apps_trebuchet-3c81a3835b27bbacf8c87eedfc244528a22973ad.tar.gz packages_apps_trebuchet-3c81a3835b27bbacf8c87eedfc244528a22973ad.tar.bz2 |
Fix issue where folder wouldn't open
Change-Id: I0745b70bb08dae6ebfd4fd8223cb01a39094751d
Diffstat (limited to 'src/com/android/launcher2/Launcher.java')
-rw-r--r-- | src/com/android/launcher2/Launcher.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java index 15b272f..d0b33a8 100644 --- a/src/com/android/launcher2/Launcher.java +++ b/src/com/android/launcher2/Launcher.java @@ -90,7 +90,6 @@ import android.widget.Toast; import com.android.common.Search; import com.android.launcher.R; import com.android.launcher2.DropTarget.DragObject; -import com.android.launcher2.Workspace.State; import java.io.DataInputStream; import java.io.DataOutputStream; @@ -1737,6 +1736,16 @@ public final class Launcher extends Activity private void handleFolderClick(FolderIcon folderIcon) { final FolderInfo info = folderIcon.mInfo; + Folder openFolder = mWorkspace.getFolderForTag(info); + + // If the folder info reports that the associated folder is open, then verify that + // it is actually opened. There have been a few instances where this gets out of sync. + if (info.opened && openFolder == null) { + Log.d(TAG, "Folder info marked as open, but associated folder is not open. Screen: " + + info.screen + " (" + info.cellX + ", " + info.cellY + ")"); + info.opened = false; + } + if (!info.opened) { // Close any open folder closeFolder(); @@ -1744,7 +1753,6 @@ public final class Launcher extends Activity openFolder(folderIcon); } else { // Find the open folder... - Folder openFolder = mWorkspace.getFolderForTag(info); int folderScreen; if (openFolder != null) { folderScreen = mWorkspace.getPageForView(openFolder); |