Paper over bug 2592956 - Home not redrawing the shortcuts, widgets, or background.
The mNext* stuff in AllApps3D got reset when onNewIntent came in too fast after an onCreate, which happened because of the configuration changed. Change-Id: I9a358b6969ac1d17ea98f58218d47bfe983936f0
This commit is contained in:
@@ -91,6 +91,10 @@ public class AllApps3D extends RSSurfaceView
|
|||||||
private static RenderScriptGL sRS;
|
private static RenderScriptGL sRS;
|
||||||
private static RolloRS sRollo;
|
private static RolloRS sRollo;
|
||||||
|
|
||||||
|
private static boolean sZoomDirty = false;
|
||||||
|
private static boolean sAnimateNextZoom;
|
||||||
|
private static float sNextZoom;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* True when we are using arrow keys or trackball to drive navigation
|
* True when we are using arrow keys or trackball to drive navigation
|
||||||
*/
|
*/
|
||||||
@@ -120,9 +124,6 @@ public class AllApps3D extends RSSurfaceView
|
|||||||
private boolean mShouldGainFocus;
|
private boolean mShouldGainFocus;
|
||||||
|
|
||||||
private boolean mHaveSurface = false;
|
private boolean mHaveSurface = false;
|
||||||
private boolean mZoomDirty = false;
|
|
||||||
private boolean mAnimateNextZoom;
|
|
||||||
private float mNextZoom;
|
|
||||||
private float mZoom;
|
private float mZoom;
|
||||||
private float mVelocity;
|
private float mVelocity;
|
||||||
private AAMessage mMessageProc;
|
private AAMessage mMessageProc;
|
||||||
@@ -241,7 +242,7 @@ public class AllApps3D extends RSSurfaceView
|
|||||||
}
|
}
|
||||||
// We may lose any callbacks that are pending, so make sure that we re-sync that
|
// We may lose any callbacks that are pending, so make sure that we re-sync that
|
||||||
// on the next surfaceChanged.
|
// on the next surfaceChanged.
|
||||||
mZoomDirty = true;
|
sZoomDirty = true;
|
||||||
mHaveSurface = false;
|
mHaveSurface = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -801,12 +802,12 @@ public class AllApps3D extends RSSurfaceView
|
|||||||
*/
|
*/
|
||||||
public void zoom(float zoom, boolean animate) {
|
public void zoom(float zoom, boolean animate) {
|
||||||
cancelLongPress();
|
cancelLongPress();
|
||||||
mNextZoom = zoom;
|
sNextZoom = zoom;
|
||||||
mAnimateNextZoom = animate;
|
sAnimateNextZoom = animate;
|
||||||
// if we do setZoom while we don't have a surface, we won't
|
// if we do setZoom while we don't have a surface, we won't
|
||||||
// get the callbacks that actually set mZoom.
|
// get the callbacks that actually set mZoom.
|
||||||
if (sRollo == null || !mHaveSurface) {
|
if (sRollo == null || !mHaveSurface) {
|
||||||
mZoomDirty = true;
|
sZoomDirty = true;
|
||||||
mZoom = zoom;
|
mZoom = zoom;
|
||||||
} else {
|
} else {
|
||||||
sRollo.setZoom(zoom, animate);
|
sRollo.setZoom(zoom, animate);
|
||||||
@@ -959,7 +960,7 @@ public class AllApps3D extends RSSurfaceView
|
|||||||
sRollo.mScrollPos = ((float)mData[0]) / (1 << 16);
|
sRollo.mScrollPos = ((float)mData[0]) / (1 << 16);
|
||||||
mVelocity = ((float)mData[1]) / (1 << 16);
|
mVelocity = ((float)mData[1]) / (1 << 16);
|
||||||
mZoom = ((float)mData[2]) / (1 << 16);
|
mZoom = ((float)mData[2]) / (1 << 16);
|
||||||
mZoomDirty = false;
|
sZoomDirty = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1305,8 +1306,8 @@ public class AllApps3D extends RSSurfaceView
|
|||||||
}
|
}
|
||||||
|
|
||||||
void dirtyCheck() {
|
void dirtyCheck() {
|
||||||
if (mAllApps.mZoomDirty) {
|
if (sZoomDirty) {
|
||||||
setZoom(mAllApps.mNextZoom, mAllApps.mAnimateNextZoom);
|
setZoom(mAllApps.sNextZoom, mAllApps.sAnimateNextZoom);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1612,8 +1613,8 @@ public class AllApps3D extends RSSurfaceView
|
|||||||
Log.d(TAG, "mVelocityTracker=" + mVelocityTracker);
|
Log.d(TAG, "mVelocityTracker=" + mVelocityTracker);
|
||||||
Log.d(TAG, "mTouchTracking=" + mTouchTracking);
|
Log.d(TAG, "mTouchTracking=" + mTouchTracking);
|
||||||
Log.d(TAG, "mShouldGainFocus=" + mShouldGainFocus);
|
Log.d(TAG, "mShouldGainFocus=" + mShouldGainFocus);
|
||||||
Log.d(TAG, "mZoomDirty=" + mZoomDirty);
|
Log.d(TAG, "sZoomDirty=" + sZoomDirty);
|
||||||
Log.d(TAG, "mAnimateNextZoom=" + mAnimateNextZoom);
|
Log.d(TAG, "sAnimateNextZoom=" + sAnimateNextZoom);
|
||||||
Log.d(TAG, "mZoom=" + mZoom);
|
Log.d(TAG, "mZoom=" + mZoom);
|
||||||
Log.d(TAG, "mScrollPos=" + sRollo.mScrollPos);
|
Log.d(TAG, "mScrollPos=" + sRollo.mScrollPos);
|
||||||
Log.d(TAG, "mVelocity=" + mVelocity);
|
Log.d(TAG, "mVelocity=" + mVelocity);
|
||||||
|
|||||||
@@ -1750,6 +1750,10 @@ public final class Launcher extends Activity
|
|||||||
* - Go back with back key TODO: make this not go to workspace
|
* - Go back with back key TODO: make this not go to workspace
|
||||||
* - From all apps
|
* - From all apps
|
||||||
* - From workspace
|
* - From workspace
|
||||||
|
* - Enter and exit car mode (becuase it causes an extra configuration changed)
|
||||||
|
* - From all apps
|
||||||
|
* - From the center workspace
|
||||||
|
* - From another workspace
|
||||||
*/
|
*/
|
||||||
void closeAllApps(boolean animated) {
|
void closeAllApps(boolean animated) {
|
||||||
if (mAllAppsGrid.isVisible()) {
|
if (mAllAppsGrid.isVisible()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user