Merge "Fix flaky RuntimeException in CellLayout." into udc-qpr-dev am: 06ca4d9c6e am: 12c0933c6a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/24212787 Change-Id: Ibfce519ee888b3652e76eac6ac1b60d75c92867b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
committed by
Automerger Merge Worker
commit
9dfffc7df1
@@ -2735,11 +2735,13 @@ public class CellLayout extends ViewGroup {
|
||||
}
|
||||
|
||||
public boolean isOccupied(int x, int y) {
|
||||
if (x < mCountX && y < mCountY) {
|
||||
if (x >= 0 && x < mCountX && y >= 0 && y < mCountY) {
|
||||
return mOccupied.cells[x][y];
|
||||
} else {
|
||||
}
|
||||
if (BuildConfig.IS_STUDIO_BUILD) {
|
||||
throw new RuntimeException("Position exceeds the bound of this CellLayout");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user