diff options
author | Joe Onorato <joeo@android.com> | 2009-12-09 15:56:04 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2009-12-09 15:56:04 -0800 |
commit | 53d0a74996bc2274e64c5582c63ae87beb9f5dde (patch) | |
tree | 85ba6917749b9f6fe0db7891ed0aba25fabd9bc1 | |
parent | ffd6081b5163cfb15845281c19455f6bc6f4ec40 (diff) | |
parent | 546917a5ad2ed8fb2013982156044faa29d11fc9 (diff) | |
download | packages_apps_trebuchet-53d0a74996bc2274e64c5582c63ae87beb9f5dde.zip packages_apps_trebuchet-53d0a74996bc2274e64c5582c63ae87beb9f5dde.tar.gz packages_apps_trebuchet-53d0a74996bc2274e64c5582c63ae87beb9f5dde.tar.bz2 |
am 546917a5: am a276fc59: Fix 2306862 - Launcher2 crashed: in libs/rs. Uploading texture without a context.
Merge commit '546917a5ad2ed8fb2013982156044faa29d11fc9' into eclair-mr2-plus-aosp
* commit '546917a5ad2ed8fb2013982156044faa29d11fc9':
Fix 2306862 - Launcher2 crashed: in libs/rs. Uploading texture without a context.
-rw-r--r-- | src/com/android/launcher2/AllAppsView.java | 26 | ||||
-rw-r--r-- | src/com/android/launcher2/Workspace.java | 1 |
2 files changed, 16 insertions, 11 deletions
diff --git a/src/com/android/launcher2/AllAppsView.java b/src/com/android/launcher2/AllAppsView.java index 6d3ae47..9e22231 100644 --- a/src/com/android/launcher2/AllAppsView.java +++ b/src/com/android/launcher2/AllAppsView.java @@ -271,13 +271,13 @@ public class AllAppsView extends RSSurfaceView } if (gainFocus) { - if (mRollo != null) { + if (mRollo != null && mRollo.mHasSurface) { gainFocus(); } else { mShouldGainFocus = true; } } else { - if (mRollo != null) { + if (mRollo != null && mRollo.mHasSurface) { if (mArrowNavigation) { // Clear selection when we lose focus mRollo.clearSelectedIcon(); @@ -658,7 +658,11 @@ public class AllAppsView extends RSSurfaceView public void setApps(ArrayList<ApplicationInfo> list) { mAllAppsList = list; if (mRollo != null) { - mRollo.setApps(list); + if (mRollo.mHasSurface) { + mRollo.setApps(list); + } else { + mRollo.mAppsDirty = true; + } } mLocks &= ~LOCK_ICONS_PENDING; } @@ -670,7 +674,7 @@ public class AllAppsView extends RSSurfaceView } final int N = list.size(); - if (mRollo != null) { + if (mRollo != null && mRollo.mHasSurface) { mRollo.reallocAppsList(mRollo.mState.iconCount + N); } @@ -682,13 +686,13 @@ public class AllAppsView extends RSSurfaceView index = -(index+1); } mAllAppsList.add(index, item); - if (mRollo != null) { + if (mRollo != null && mRollo.mHasSurface) { mRollo.addApp(index, item); mRollo.mState.iconCount++; } } - if (mRollo != null) { + if (mRollo != null && mRollo.mHasSurface) { mRollo.saveAppsList(); } } @@ -704,10 +708,10 @@ public class AllAppsView extends RSSurfaceView final ApplicationInfo item = list.get(i); int index = findAppByComponent(mAllAppsList, item); if (index >= 0) { + int ic = mRollo != null ? mRollo.mState.iconCount : 666; mAllAppsList.remove(index); - if (mRollo != null) { + if (mRollo != null && mRollo.mHasSurface) { mRollo.removeApp(index); - mRollo.mState.iconCount--; } } else { Log.w(TAG, "couldn't find a match for item \"" + item + "\""); @@ -715,7 +719,7 @@ public class AllAppsView extends RSSurfaceView } } - if (mRollo != null) { + if (mRollo != null && mRollo.mHasSurface) { mRollo.saveAppsList(); } } @@ -1174,7 +1178,7 @@ public class AllAppsView extends RSSurfaceView System.arraycopy(mLabels, index, mLabels, dest, count); System.arraycopy(mLabelIds, index, mLabelIds, dest, count); - if (mHasSurface ) { + if (mHasSurface) { uploadAppIcon(index, item); } else { mAppsDirty = true; @@ -1193,7 +1197,9 @@ public class AllAppsView extends RSSurfaceView System.arraycopy(mLabels, src, mLabels, index, count); System.arraycopy(mLabelIds, src, mLabelIds, index, count); + mRollo.mState.iconCount--; final int last = mState.iconCount - 1; + mIcons[last] = null; mIconIds[last] = 0; mLabels[last] = null; diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java index 89d2ebd..f1ee817 100644 --- a/src/com/android/launcher2/Workspace.java +++ b/src/com/android/launcher2/Workspace.java @@ -565,7 +565,6 @@ public class Workspace extends ViewGroup implements DropTarget, DragSource, Drag public boolean onInterceptTouchEvent(MotionEvent ev) { final boolean workspaceLocked = mLauncher.isWorkspaceLocked(); final boolean allAppsVisible = mLauncher.isAllAppsVisible(); - Log.d(TAG, "workspaceLocked=" + workspaceLocked + " allAppsVisible=" + allAppsVisible); if (workspaceLocked || allAppsVisible) { return false; // We don't want the events. Let them fall through to the all apps view. } |