Parsing test boards from text files to be able to add more and bigger tests
It also adds an assets folder inside of Launcher3 tests. It also fixes a bug in fullReorder. Test: atest ReorderWidgets Flag: none Bug: 229292911 Change-Id: I7dadd42a3057d353326691163bb7db71a2e9dcc4
This commit is contained in:
1 parent
95b6f8c409
commit
e7c3d3d4ce
16 files changed
+398
-367
No files matched your search
@@ -179,7 +179,6 @@ public class CellLayoutBoard implements Comparable<CellLayoutBoard> {
|
||||
Map<Character, WidgetRect> mWidgetsMap = new HashMap<>();
|
||||
|
||||
List<IconPoint> mIconPoints = new ArrayList<>();
|
||||
Map<Character, IconPoint> mIconsMap = new HashMap<>();
|
||||
|
||||
WidgetRect mMain = null;
|
||||
|
||||
@@ -270,7 +269,9 @@ public class CellLayoutBoard implements Comparable<CellLayoutBoard> {
|
||||
}
|
||||
|
||||
public void addIcon(int x, int y) {
|
||||
removeOverlappingItems(new Point(x, y));
|
||||
Point iconCoord = new Point(x, y);
|
||||
removeOverlappingItems(iconCoord);
|
||||
mIconPoints.add(new IconPoint(iconCoord, CellType.ICON));
|
||||
mWidget[x][y] = 'i';
|
||||
}
|
||||
|
||||
@@ -306,8 +307,12 @@ public class CellLayoutBoard implements Comparable<CellLayoutBoard> {
|
||||
return new WidgetRect(type, widgetRect);
|
||||
}
|
||||
|
||||
public static boolean isFolder(char type) {
|
||||
return type >= 'A' && type <= 'Z';
|
||||
}
|
||||
|
||||
public static boolean isWidget(char type) {
|
||||
return type != CellType.ICON && type != CellType.EMPTY;
|
||||
return type != CellType.ICON && type != CellType.EMPTY && (type >= 'a' && type <= 'z');
|
||||
}
|
||||
|
||||
public static boolean isIcon(char type) {
|
||||
|
||||
Reference in new issue
Block a user