Merge "Restore original scaleRectAboutCenter method." into ub-launcher3-master

This commit is contained in:
Jonathan Miranda
2016-12-15 19:36:40 +00:00
committed by Android (Google) Code Review
3 changed files with 20 additions and 7 deletions

View File

@@ -399,8 +399,7 @@ public class Workspace extends PagedView
float scale = 1;
if (isWidget) {
DeviceProfile profile = mLauncher.getDeviceProfile();
scale = Utilities.shrinkRectAboutCenter(r, profile.appWidgetScale.x,
profile.appWidgetScale.y);
scale = Utilities.shrinkRect(r, profile.appWidgetScale.x, profile.appWidgetScale.y);
}
size[0] = r.width();
size[1] = r.height();
@@ -3475,7 +3474,7 @@ public class Workspace extends PagedView
Rect r = estimateItemPosition(layout, targetCell[0], targetCell[1], spanX, spanY);
if (info.itemType == LauncherSettings.Favorites.ITEM_TYPE_APPWIDGET) {
DeviceProfile profile = mLauncher.getDeviceProfile();
Utilities.shrinkRectAboutCenter(r, profile.appWidgetScale.x, profile.appWidgetScale.y);
Utilities.shrinkRect(r, profile.appWidgetScale.x, profile.appWidgetScale.y);
}
loc[0] = r.left;
loc[1] = r.top;