Merge "Reset pointer icon when view is not present" into nyc-dev am: 6cf85afcb1

am: 3737049fa7

* commit '3737049fa7454d4327250a41ef2b399ae6bf24f5':
  Reset pointer icon when view is not present
This commit is contained in:
Andrii Kulian
2016-02-29 21:41:19 +00:00
committed by android-build-merger

View File

@@ -4398,8 +4398,14 @@ public final class ViewRootImpl implements ViewParent,
private boolean updatePointerIcon(MotionEvent event) {
final float x = event.getX();
final float y = event.getY();
if (mView == null) {
// E.g. click outside a popup to dismiss it
Slog.d(mTag, "updatePointerIcon called after view was removed");
return false;
}
if (x < 0 || x >= mView.getWidth() || y < 0 || y >= mView.getHeight()) {
Slog.e(mTag, "updatePointerIcon called with position out of bounds");
// E.g. when moving window divider with mouse
Slog.d(mTag, "updatePointerIcon called with position out of bounds");
return false;
}
final PointerIcon pointerIcon = mView.getPointerIcon(event, x, y);