Code simplifications

This commit is contained in:
Fredrik Fornwall
2015-11-29 00:20:45 +01:00
parent 1aa439311b
commit 95fbb810e2
3 changed files with 9 additions and 25 deletions

View File

@@ -1485,10 +1485,7 @@ public class ViewDragHelper {
* @return true if the supplied view is under the given point, false otherwise
*/
public boolean isViewUnder(View view, int x, int y) {
if (view == null) {
return false;
}
return x >= view.getLeft() && x < view.getRight() && y >= view.getTop() && y < view.getBottom();
return view != null && x >= view.getLeft() && x < view.getRight() && y >= view.getTop() && y < view.getBottom();
}
/**
@@ -1522,4 +1519,4 @@ public class ViewDragHelper {
return result;
}
}
}