From 70e8b157219e9090ba5e47fdfa51b2b92e98449d Mon Sep 17 00:00:00 2001 From: Andy Wickham Date: Wed, 7 Oct 2020 23:00:06 -0700 Subject: [PATCH] Minor stylistic changes in Workspace.java. Change-Id: Ib07611f27cbc427d11abccd8b74ea144485752f7 --- src/com/android/launcher3/Workspace.java | 60 ++++++++++++------------ 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index 98328cf8af..dfff358daf 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -2078,40 +2078,40 @@ public class Workspace extends PagedView mLastReorderY = -1; } - /* - * - * Convert the 2D coordinate xy from the parent View's coordinate space to this CellLayout's - * coordinate space. The argument xy is modified with the return result. - */ - private void mapPointFromSelfToChild(View v, float[] xy) { - xy[0] = xy[0] - v.getLeft(); - xy[1] = xy[1] - v.getTop(); - } + /* + * + * Convert the 2D coordinate xy from the parent View's coordinate space to this CellLayout's + * coordinate space. The argument xy is modified with the return result. + */ + private void mapPointFromSelfToChild(View v, float[] xy) { + xy[0] = xy[0] - v.getLeft(); + xy[1] = xy[1] - v.getTop(); + } - boolean isPointInSelfOverHotseat(int x, int y) { - mTempFXY[0] = x; - mTempFXY[1] = y; - mLauncher.getDragLayer().getDescendantCoordRelativeToSelf(this, mTempFXY, true); - View hotseat = mLauncher.getHotseat(); - return mTempFXY[0] >= hotseat.getLeft() && - mTempFXY[0] <= hotseat.getRight() && - mTempFXY[1] >= hotseat.getTop() && - mTempFXY[1] <= hotseat.getBottom(); - } + boolean isPointInSelfOverHotseat(int x, int y) { + mTempFXY[0] = x; + mTempFXY[1] = y; + mLauncher.getDragLayer().getDescendantCoordRelativeToSelf(this, mTempFXY, true); + View hotseat = mLauncher.getHotseat(); + return mTempFXY[0] >= hotseat.getLeft() + && mTempFXY[0] <= hotseat.getRight() + && mTempFXY[1] >= hotseat.getTop() + && mTempFXY[1] <= hotseat.getBottom(); + } /** * Updates the point in {@param xy} to point to the co-ordinate space of {@param layout} * @param layout either hotseat of a page in workspace * @param xy the point location in workspace co-ordinate space */ - private void mapPointFromDropLayout(CellLayout layout, float[] xy) { - if (mLauncher.isHotseatLayout(layout)) { - mLauncher.getDragLayer().getDescendantCoordRelativeToSelf(this, xy, true); - mLauncher.getDragLayer().mapCoordInSelfToDescendant(layout, xy); - } else { - mapPointFromSelfToChild(layout, xy); - } - } + private void mapPointFromDropLayout(CellLayout layout, float[] xy) { + if (mLauncher.isHotseatLayout(layout)) { + mLauncher.getDragLayer().getDescendantCoordRelativeToSelf(this, xy, true); + mLauncher.getDragLayer().mapCoordInSelfToDescendant(layout, xy); + } else { + mapPointFromSelfToChild(layout, xy); + } + } private boolean isDragWidget(DragObject d) { return (d.dragInfo instanceof LauncherAppWidgetInfo || @@ -2393,9 +2393,9 @@ public class Workspace extends PagedView spanY = mDragInfo.spanY; } - final int container = mLauncher.isHotseatLayout(cellLayout) ? - LauncherSettings.Favorites.CONTAINER_HOTSEAT : - LauncherSettings.Favorites.CONTAINER_DESKTOP; + final int container = mLauncher.isHotseatLayout(cellLayout) + ? LauncherSettings.Favorites.CONTAINER_HOTSEAT + : LauncherSettings.Favorites.CONTAINER_DESKTOP; final int screenId = getIdForScreen(cellLayout); if (!mLauncher.isHotseatLayout(cellLayout) && screenId != getScreenIdForPageIndex(mCurrentPage)