Fix NPE (issue 10708277)
Change-Id: I76cc74ae4e75bb9a0c1437c2f7d1c27b2fc6afd7
This commit is contained in:
1 parent
c05d313e5a
commit
1003be9e62
1 file changed
+5
-13
@@ -1704,19 +1704,11 @@ public class Workspace extends SmoothPagedView
|
||||
protected void getOverviewModePages(int[] range) {
|
||||
int count = mScreenOrder.size();
|
||||
|
||||
int start = -1;
|
||||
int end = -1;
|
||||
//
|
||||
for (int i = 0; i < count; i++) {
|
||||
if (start < 0 && mScreenOrder.get(i) >= 0) {
|
||||
start = i;
|
||||
}
|
||||
if (start >=0 && mScreenOrder.get(i) >= 0) {
|
||||
end = i;
|
||||
}
|
||||
}
|
||||
range[0] = start;
|
||||
range[1] = end;
|
||||
int start = hasCustomContent() ? 1 : 0;
|
||||
int end = getChildCount() - 1;
|
||||
|
||||
range[0] = Math.max(0, Math.min(start, getChildCount() - 1));
|
||||
range[1] = Math.max(0, end);
|
||||
}
|
||||
|
||||
protected void onStartReordering() {
|
||||
|
||||
Reference in new issue
Block a user