Preventing screen rotations when dragging.
Change-Id: I6805c66f9aeec32bc7d597e99e1f62be0e2d0ab3
This commit is contained in:
@@ -1645,6 +1645,7 @@ public class Workspace extends SmoothPagedView
|
||||
child.getLocationOnScreen(mTempXY);
|
||||
final int screenX = (int) mTempXY[0] + (child.getWidth() - bmpWidth) / 2;
|
||||
final int screenY = (int) mTempXY[1] + (child.getHeight() - bmpHeight) / 2;
|
||||
mLauncher.lockScreenOrientation();
|
||||
mDragController.startDrag(b, screenX, screenY, 0, 0, bmpWidth, bmpHeight, this,
|
||||
child.getTag(), DragController.DRAG_ACTION_MOVE, null);
|
||||
b.recycle();
|
||||
@@ -2444,7 +2445,7 @@ public class Workspace extends SmoothPagedView
|
||||
boolean animateDrop = !mWasSpringLoadedOnDragExit;
|
||||
((CellLayout) getChildAt(mDragInfo.screen)).onDropChild(mDragInfo.cell, animateDrop);
|
||||
}
|
||||
|
||||
mLauncher.unlockScreenOrientation();
|
||||
mDragOutline = null;
|
||||
mDragInfo = null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user