Merge "Add additional fake task views on overview gesture completion."

This commit is contained in:
TreeHugger Robot
2020-12-23 01:34:00 +00:00
committed by Android (Google) Code Review
7 changed files with 106 additions and 13 deletions
+5
View File
@@ -404,6 +404,11 @@ public final class Utilities {
return (size / densityRatio);
}
/** Converts a dp value to pixels for the current device. */
public static int dpToPx(float dp) {
return (int) (dp * Resources.getSystem().getDisplayMetrics().density);
}
public static int pxFromSp(float size, DisplayMetrics metrics) {
return (int) Math.round(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP,
size, metrics));