Skip to content

Commit 604e9c7

Browse files
committed
Use Math.floor instead of FloatMath.floor
Recommended by Android Lint for apps targeting 8 and above
1 parent a470e27 commit 604e9c7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

app/src/main/java/com/github/mobile/util/ServiceUtils.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import static android.util.TypedValue.COMPLEX_UNIT_DIP;
2020
import android.content.Context;
2121
import android.content.res.Resources;
22-
import android.util.FloatMath;
2322
import android.util.TypedValue;
2423
import android.view.Display;
2524
import android.view.View;
@@ -127,6 +126,6 @@ public static int getIntPixels(final Context context, final int dp) {
127126
public static int getIntPixels(final Resources resources, final int dp) {
128127
float pixels = TypedValue.applyDimension(COMPLEX_UNIT_DIP, dp,
129128
resources.getDisplayMetrics());
130-
return (int) FloatMath.floor(pixels + 0.5F);
129+
return (int) Math.floor(pixels + 0.5F);
131130
}
132131
}

0 commit comments

Comments
 (0)