Merge "Fix 4020235: NPE at com.android.launcher2.DragLayer.onInterceptTouchEvent" into honeycomb-mr1
This commit is contained in:
committed by
Android (Google) Code Review
commit
f697ac683b
@@ -62,17 +62,19 @@ public class DragLayer extends FrameLayout {
|
||||
// event has occurred which doesn't result in resizing a widget. In this case, we
|
||||
// dismiss any visible resize frames.
|
||||
final Workspace w = (Workspace) findViewById(R.id.workspace);
|
||||
final CellLayout currentPage = (CellLayout) w.getChildAt(w.getCurrentPage());
|
||||
final CellLayoutChildren childrenLayout = currentPage.getChildrenLayout();
|
||||
if (w != null) {
|
||||
final CellLayout currentPage = (CellLayout) w.getChildAt(w.getCurrentPage());
|
||||
final CellLayoutChildren childrenLayout = currentPage.getChildrenLayout();
|
||||
|
||||
if (childrenLayout.hasResizeFrames() && !childrenLayout.isWidgetBeingResized()) {
|
||||
post(new Runnable() {
|
||||
public void run() {
|
||||
if (!childrenLayout.isWidgetBeingResized()) {
|
||||
childrenLayout.clearAllResizeFrames();
|
||||
if (childrenLayout.hasResizeFrames() && !childrenLayout.isWidgetBeingResized()) {
|
||||
post(new Runnable() {
|
||||
public void run() {
|
||||
if (!childrenLayout.isWidgetBeingResized()) {
|
||||
childrenLayout.clearAllResizeFrames();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
return mDragController.onInterceptTouchEvent(ev);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user