Commit 8389df55 authored by Rob Buis's avatar Rob Buis Committed by Commit Bot

Remove superfluous int cast

I get a warning about the cast, turns out the cast is not
needed since round will return int:
https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html#round-float-

Bug: None
Signed-off-by: default avatarRob Buis <rob.buis@samsung.com>
Change-Id: I677f09c0a7a731d6bc788618cefb1e1b5c2da5c6
Reviewed-on: https://chromium-review.googlesource.com/592239Reviewed-by: default avatarJeffrey Yasskin <jyasskin@chromium.org>
Reviewed-by: default avatarTed Choc <tedchoc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491114}
parent 74e53600
......@@ -520,7 +520,7 @@ public class ItemChooserDialog {
// Round to (an integer + 0.5) times LIST_ROW_HEIGHT.
heightDp = (Math.round(heightDp / LIST_ROW_HEIGHT_DP - 0.5f) + 0.5f) * LIST_ROW_HEIGHT_DP;
heightDp = MathUtils.clamp(heightDp, MIN_HEIGHT_DP, MAX_HEIGHT_DP);
return (int) Math.round(heightDp * density);
return Math.round(heightDp * density);
}
private void showDialogForView(View view) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment