mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 17:36:49 +00:00
Fix 2200739 - Crash when you click on an empty icon slot in 3d all apps
This commit is contained in:
@@ -1028,6 +1028,20 @@ public class AllAppsView extends RSSurfaceView
|
||||
mTouchXBorders[4] = width;
|
||||
}
|
||||
|
||||
void fling() {
|
||||
mInvokeFling.execute();
|
||||
}
|
||||
|
||||
void move() {
|
||||
mInvokeMove.execute();
|
||||
}
|
||||
|
||||
void moveTo(float row) {
|
||||
mState.targetPos = row;
|
||||
mState.save();
|
||||
mInvokeMoveTo.execute();
|
||||
}
|
||||
|
||||
int chooseTappedIcon(int x, int y, float pos) {
|
||||
// Adjust for scroll position if not zero.
|
||||
y += (pos - ((int)pos)) * (mTouchYBorders[1] - mTouchYBorders[0]);
|
||||
@@ -1051,22 +1065,14 @@ public class AllAppsView extends RSSurfaceView
|
||||
return -1;
|
||||
}
|
||||
|
||||
return (((int)pos) * Defines.COLUMNS_PER_PAGE)
|
||||
int index = (((int)pos) * Defines.COLUMNS_PER_PAGE)
|
||||
+ (row * Defines.ROWS_PER_PAGE) + col;
|
||||
}
|
||||
|
||||
void fling() {
|
||||
mInvokeFling.execute();
|
||||
}
|
||||
|
||||
void move() {
|
||||
mInvokeMove.execute();
|
||||
}
|
||||
|
||||
void moveTo(float row) {
|
||||
mState.targetPos = row;
|
||||
mState.save();
|
||||
mInvokeMoveTo.execute();
|
||||
if (index >= mState.iconCount) {
|
||||
return -1;
|
||||
} else {
|
||||
return index;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user