Remove WAR for handling uploads when no surface was present.
diff --git a/src/com/android/launcher2/AllAppsView.java b/src/com/android/launcher2/AllAppsView.java
index 8d24ea3..8cced4a 100644
--- a/src/com/android/launcher2/AllAppsView.java
+++ b/src/com/android/launcher2/AllAppsView.java
@@ -189,7 +189,6 @@
@Override
public void surfaceDestroyed(SurfaceHolder holder) {
super.surfaceDestroyed(holder);
- mRollo.mHasSurface = false;
// Without this, we leak mMessageCallback which leaks the context.
mRS.mMessageCallback = null;
}
@@ -202,7 +201,6 @@
if (mRollo == null) {
mRollo = new RolloRS();
- mRollo.mHasSurface = true;
mRollo.init(getResources(), w, h);
if (mAllAppsList != null) {
mRollo.setApps(mAllAppsList);
@@ -211,8 +209,6 @@
gainFocus();
mShouldGainFocus = false;
}
- } else {
- mRollo.mHasSurface = true;
}
mRollo.dirtyCheck();
mRollo.resize(w, h);
@@ -271,7 +267,7 @@
}
if (gainFocus) {
- if (mRollo != null && mRollo.mHasSurface) {
+ if (mRollo != null) {
gainFocus();
} else {
mShouldGainFocus = true;
@@ -637,7 +633,7 @@
*/
public void zoom(float zoom, boolean animate) {
cancelLongPress();
- if (mRollo == null || !mRollo.mHasSurface) {
+ if (mRollo == null) {
mZoomDirty = true;
mZoom = zoom;
mAnimateNextZoom = animate;
@@ -799,9 +795,6 @@
private Bitmap mSelectionBitmap;
private Canvas mSelectionCanvas;
- boolean mHasSurface = false;
- private boolean mAppsDirty = true;
-
Params mParams;
State mState;
@@ -1046,17 +1039,8 @@
}
void dirtyCheck() {
- if (mHasSurface) {
- if (mAppsDirty && mAllAppsList != null) {
- for (int i=0; i < mState.iconCount; i++) {
- uploadAppIcon(i, mAllAppsList.get(i));
- }
- saveAppsList();
- mAppsDirty = false;
- }
- if (mZoomDirty) {
- setZoom(mZoom, mAnimateNextZoom);
- }
+ if (mZoomDirty) {
+ setZoom(mZoom, mAnimateNextZoom);
}
}
@@ -1081,12 +1065,8 @@
for (int i=0; i < mState.iconCount; i++) {
createAppIconAllocations(i, list.get(i));
}
- if (mHasSurface) {
- for (int i=0; i < mState.iconCount; i++) {
- uploadAppIcon(i, list.get(i));
- }
- } else {
- mRollo.mAppsDirty = true;
+ for (int i=0; i < mState.iconCount; i++) {
+ uploadAppIcon(i, list.get(i));
}
saveAppsList();
}
@@ -1187,13 +1167,7 @@
System.arraycopy(mLabelIds, index, mLabelIds, dest, count);
createAppIconAllocations(index, item);
-
- if (mHasSurface) {
- uploadAppIcon(index, item);
- } else {
- mAppsDirty = true;
- }
-
+ uploadAppIcon(index, item);
mRollo.mState.iconCount++;
}
@@ -1405,8 +1379,6 @@
Log.d(TAG, "mRollo.mLabelIds=" + Arrays.toString(mLabelIds));
Log.d(TAG, "mRollo.mTouchXBorders=" + Arrays.toString(mTouchXBorders));
Log.d(TAG, "mRollo.mTouchYBorders=" + Arrays.toString(mTouchYBorders));
- Log.d(TAG, "mRollo.mHasSurface=" + mHasSurface);
- Log.d(TAG, "mRollo.mAppsDirty=" + mAppsDirty);
Log.d(TAG, "mRollo.mState.newPositionX=" + mState.newPositionX);
Log.d(TAG, "mRollo.mState.newTouchDown=" + mState.newTouchDown);
Log.d(TAG, "mRollo.mState.flingVelocity=" + mState.flingVelocity);