mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 18:58:19 +00:00
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.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user