Revert^2 "Moving taskbar lifecycle to TouchInteractionService"

430465a3d5
Bug: 187353581
Change-Id: I7b2280d16adfafd3e85ffc1d22e32d0c00d12b67
This commit is contained in:
Sunny Goyal
2021-05-20 20:18:47 +00:00
parent fd3ad5d769
commit d5500548dc
29 changed files with 948 additions and 982 deletions

View File

@@ -324,15 +324,17 @@ public final class Utilities {
}
public static void scaleRectFAboutCenter(RectF r, float scale) {
scaleRectFAboutPivot(r, scale, r.centerX(), r.centerY());
}
public static void scaleRectFAboutPivot(RectF r, float scale, float px, float py) {
if (scale != 1.0f) {
float cx = r.centerX();
float cy = r.centerY();
r.offset(-cx, -cy);
r.offset(-px, -py);
r.left = r.left * scale;
r.top = r.top * scale ;
r.right = r.right * scale;
r.bottom = r.bottom * scale;
r.offset(cx, cy);
r.offset(px, py);
}
}