Update folder row and column for 5x5 grid to 4x4. Update dump method to include changed properties and add dump test for 5x5 grid

Originally folder row and column for 5x5 grid was 3x3. This change is to update it to 4x4 in config to increase the max number of cells displayed. It also adds corresponding test for 5x5 grid and includes numFolderRows and numFolderColumns in the dump string

Fix: 265139500
Test: DeviceProfileDumpTest
Change-Id: I09fe3eac8113a147cb895988e5424471e4e772e5
This commit is contained in:
Helen Cheuk 2023-02-23 17:15:39 +00:00
parent 8ca28c4e63
commit 599109b23f
2 changed files with 26 additions and 0 deletions

View File

@ -1597,6 +1597,8 @@ public class DeviceProfile {
writer.println(prefix + pxToDpStr("iconTextSizePx", iconTextSizePx)); writer.println(prefix + pxToDpStr("iconTextSizePx", iconTextSizePx));
writer.println(prefix + pxToDpStr("iconDrawablePaddingPx", iconDrawablePaddingPx)); writer.println(prefix + pxToDpStr("iconDrawablePaddingPx", iconDrawablePaddingPx));
writer.println(prefix + "\tinv.numFolderRows: " + inv.numFolderRows);
writer.println(prefix + "\tinv.numFolderColumns: " + inv.numFolderColumns);
writer.println(prefix + pxToDpStr("folderCellWidthPx", folderCellWidthPx)); writer.println(prefix + pxToDpStr("folderCellWidthPx", folderCellWidthPx));
writer.println(prefix + pxToDpStr("folderCellHeightPx", folderCellHeightPx)); writer.println(prefix + pxToDpStr("folderCellHeightPx", folderCellHeightPx));
writer.println(prefix + pxToDpStr("folderChildIconSizePx", folderChildIconSizePx)); writer.println(prefix + pxToDpStr("folderChildIconSizePx", folderChildIconSizePx));

View File

@ -76,6 +76,8 @@ class DeviceProfileDumpTest : AbstractDeviceProfileTest() {
"\ticonSizePx: 147.0px (56.0dp)\n" + "\ticonSizePx: 147.0px (56.0dp)\n" +
"\ticonTextSizePx: 38.0px (14.476191dp)\n" + "\ticonTextSizePx: 38.0px (14.476191dp)\n" +
"\ticonDrawablePaddingPx: 18.0px (6.857143dp)\n" + "\ticonDrawablePaddingPx: 18.0px (6.857143dp)\n" +
"\tinv.numFolderRows: 4\n" +
"\tinv.numFolderColumns: 4\n" +
"\tfolderCellWidthPx: 195.0px (74.28571dp)\n" + "\tfolderCellWidthPx: 195.0px (74.28571dp)\n" +
"\tfolderCellHeightPx: 230.0px (87.61905dp)\n" + "\tfolderCellHeightPx: 230.0px (87.61905dp)\n" +
"\tfolderChildIconSizePx: 147.0px (56.0dp)\n" + "\tfolderChildIconSizePx: 147.0px (56.0dp)\n" +
@ -206,6 +208,8 @@ class DeviceProfileDumpTest : AbstractDeviceProfileTest() {
"\ticonSizePx: 147.0px (56.0dp)\n" + "\ticonSizePx: 147.0px (56.0dp)\n" +
"\ticonTextSizePx: 38.0px (14.476191dp)\n" + "\ticonTextSizePx: 38.0px (14.476191dp)\n" +
"\ticonDrawablePaddingPx: 18.0px (6.857143dp)\n" + "\ticonDrawablePaddingPx: 18.0px (6.857143dp)\n" +
"\tinv.numFolderRows: 4\n" +
"\tinv.numFolderColumns: 4\n" +
"\tfolderCellWidthPx: 195.0px (74.28571dp)\n" + "\tfolderCellWidthPx: 195.0px (74.28571dp)\n" +
"\tfolderCellHeightPx: 230.0px (87.61905dp)\n" + "\tfolderCellHeightPx: 230.0px (87.61905dp)\n" +
"\tfolderChildIconSizePx: 147.0px (56.0dp)\n" + "\tfolderChildIconSizePx: 147.0px (56.0dp)\n" +
@ -336,6 +340,8 @@ class DeviceProfileDumpTest : AbstractDeviceProfileTest() {
"\ticonSizePx: 147.0px (56.0dp)\n" + "\ticonSizePx: 147.0px (56.0dp)\n" +
"\ticonTextSizePx: 0.0px (0.0dp)\n" + "\ticonTextSizePx: 0.0px (0.0dp)\n" +
"\ticonDrawablePaddingPx: 0.0px (0.0dp)\n" + "\ticonDrawablePaddingPx: 0.0px (0.0dp)\n" +
"\tinv.numFolderRows: 4\n" +
"\tinv.numFolderColumns: 4\n" +
"\tfolderCellWidthPx: 142.0px (54.095238dp)\n" + "\tfolderCellWidthPx: 142.0px (54.095238dp)\n" +
"\tfolderCellHeightPx: 168.0px (64.0dp)\n" + "\tfolderCellHeightPx: 168.0px (64.0dp)\n" +
"\tfolderChildIconSizePx: 108.0px (41.142857dp)\n" + "\tfolderChildIconSizePx: 108.0px (41.142857dp)\n" +
@ -466,6 +472,8 @@ class DeviceProfileDumpTest : AbstractDeviceProfileTest() {
"\ticonSizePx: 147.0px (56.0dp)\n" + "\ticonSizePx: 147.0px (56.0dp)\n" +
"\ticonTextSizePx: 0.0px (0.0dp)\n" + "\ticonTextSizePx: 0.0px (0.0dp)\n" +
"\ticonDrawablePaddingPx: 0.0px (0.0dp)\n" + "\ticonDrawablePaddingPx: 0.0px (0.0dp)\n" +
"\tinv.numFolderRows: 4\n" +
"\tinv.numFolderColumns: 4\n" +
"\tfolderCellWidthPx: 128.0px (48.761906dp)\n" + "\tfolderCellWidthPx: 128.0px (48.761906dp)\n" +
"\tfolderCellHeightPx: 152.0px (57.904762dp)\n" + "\tfolderCellHeightPx: 152.0px (57.904762dp)\n" +
"\tfolderChildIconSizePx: 98.0px (37.333332dp)\n" + "\tfolderChildIconSizePx: 98.0px (37.333332dp)\n" +
@ -597,6 +605,8 @@ class DeviceProfileDumpTest : AbstractDeviceProfileTest() {
"\ticonSizePx: 120.0px (60.0dp)\n" + "\ticonSizePx: 120.0px (60.0dp)\n" +
"\ticonTextSizePx: 28.0px (14.0dp)\n" + "\ticonTextSizePx: 28.0px (14.0dp)\n" +
"\ticonDrawablePaddingPx: 14.0px (7.0dp)\n" + "\ticonDrawablePaddingPx: 14.0px (7.0dp)\n" +
"\tinv.numFolderRows: 3\n" +
"\tinv.numFolderColumns: 3\n" +
"\tfolderCellWidthPx: 397.0px (198.5dp)\n" + "\tfolderCellWidthPx: 397.0px (198.5dp)\n" +
"\tfolderCellHeightPx: 371.0px (185.5dp)\n" + "\tfolderCellHeightPx: 371.0px (185.5dp)\n" +
"\tfolderChildIconSizePx: 99.0px (49.5dp)\n" + "\tfolderChildIconSizePx: 99.0px (49.5dp)\n" +
@ -728,6 +738,8 @@ class DeviceProfileDumpTest : AbstractDeviceProfileTest() {
"\ticonSizePx: 120.0px (60.0dp)\n" + "\ticonSizePx: 120.0px (60.0dp)\n" +
"\ticonTextSizePx: 28.0px (14.0dp)\n" + "\ticonTextSizePx: 28.0px (14.0dp)\n" +
"\ticonDrawablePaddingPx: 14.0px (7.0dp)\n" + "\ticonDrawablePaddingPx: 14.0px (7.0dp)\n" +
"\tinv.numFolderRows: 3\n" +
"\tinv.numFolderColumns: 3\n" +
"\tfolderCellWidthPx: 397.0px (198.5dp)\n" + "\tfolderCellWidthPx: 397.0px (198.5dp)\n" +
"\tfolderCellHeightPx: 371.0px (185.5dp)\n" + "\tfolderCellHeightPx: 371.0px (185.5dp)\n" +
"\tfolderChildIconSizePx: 99.0px (49.5dp)\n" + "\tfolderChildIconSizePx: 99.0px (49.5dp)\n" +
@ -859,6 +871,8 @@ class DeviceProfileDumpTest : AbstractDeviceProfileTest() {
"\ticonSizePx: 120.0px (60.0dp)\n" + "\ticonSizePx: 120.0px (60.0dp)\n" +
"\ticonTextSizePx: 28.0px (14.0dp)\n" + "\ticonTextSizePx: 28.0px (14.0dp)\n" +
"\ticonDrawablePaddingPx: 14.0px (7.0dp)\n" + "\ticonDrawablePaddingPx: 14.0px (7.0dp)\n" +
"\tinv.numFolderRows: 3\n" +
"\tinv.numFolderColumns: 3\n" +
"\tfolderCellWidthPx: 408.0px (204.0dp)\n" + "\tfolderCellWidthPx: 408.0px (204.0dp)\n" +
"\tfolderCellHeightPx: 648.0px (324.0dp)\n" + "\tfolderCellHeightPx: 648.0px (324.0dp)\n" +
"\tfolderChildIconSizePx: 120.0px (60.0dp)\n" + "\tfolderChildIconSizePx: 120.0px (60.0dp)\n" +
@ -990,6 +1004,8 @@ class DeviceProfileDumpTest : AbstractDeviceProfileTest() {
"\ticonSizePx: 120.0px (60.0dp)\n" + "\ticonSizePx: 120.0px (60.0dp)\n" +
"\ticonTextSizePx: 28.0px (14.0dp)\n" + "\ticonTextSizePx: 28.0px (14.0dp)\n" +
"\ticonDrawablePaddingPx: 14.0px (7.0dp)\n" + "\ticonDrawablePaddingPx: 14.0px (7.0dp)\n" +
"\tinv.numFolderRows: 3\n" +
"\tinv.numFolderColumns: 3\n" +
"\tfolderCellWidthPx: 408.0px (204.0dp)\n" + "\tfolderCellWidthPx: 408.0px (204.0dp)\n" +
"\tfolderCellHeightPx: 648.0px (324.0dp)\n" + "\tfolderCellHeightPx: 648.0px (324.0dp)\n" +
"\tfolderChildIconSizePx: 120.0px (60.0dp)\n" + "\tfolderChildIconSizePx: 120.0px (60.0dp)\n" +
@ -1126,6 +1142,8 @@ class DeviceProfileDumpTest : AbstractDeviceProfileTest() {
"\ticonSizePx: 141.0px (53.714287dp)\n" + "\ticonSizePx: 141.0px (53.714287dp)\n" +
"\ticonTextSizePx: 34.0px (12.952381dp)\n" + "\ticonTextSizePx: 34.0px (12.952381dp)\n" +
"\ticonDrawablePaddingPx: 18.0px (6.857143dp)\n" + "\ticonDrawablePaddingPx: 18.0px (6.857143dp)\n" +
"\tinv.numFolderRows: 3\n" +
"\tinv.numFolderColumns: 4\n" +
"\tfolderCellWidthPx: 189.0px (72.0dp)\n" + "\tfolderCellWidthPx: 189.0px (72.0dp)\n" +
"\tfolderCellHeightPx: 219.0px (83.42857dp)\n" + "\tfolderCellHeightPx: 219.0px (83.42857dp)\n" +
"\tfolderChildIconSizePx: 141.0px (53.714287dp)\n" + "\tfolderChildIconSizePx: 141.0px (53.714287dp)\n" +
@ -1261,6 +1279,8 @@ class DeviceProfileDumpTest : AbstractDeviceProfileTest() {
"\ticonSizePx: 141.0px (53.714287dp)\n" + "\ticonSizePx: 141.0px (53.714287dp)\n" +
"\ticonTextSizePx: 34.0px (12.952381dp)\n" + "\ticonTextSizePx: 34.0px (12.952381dp)\n" +
"\ticonDrawablePaddingPx: 18.0px (6.857143dp)\n" + "\ticonDrawablePaddingPx: 18.0px (6.857143dp)\n" +
"\tinv.numFolderRows: 3\n" +
"\tinv.numFolderColumns: 4\n" +
"\tfolderCellWidthPx: 189.0px (72.0dp)\n" + "\tfolderCellWidthPx: 189.0px (72.0dp)\n" +
"\tfolderCellHeightPx: 219.0px (83.42857dp)\n" + "\tfolderCellHeightPx: 219.0px (83.42857dp)\n" +
"\tfolderChildIconSizePx: 141.0px (53.714287dp)\n" + "\tfolderChildIconSizePx: 141.0px (53.714287dp)\n" +
@ -1396,6 +1416,8 @@ class DeviceProfileDumpTest : AbstractDeviceProfileTest() {
"\ticonSizePx: 141.0px (53.714287dp)\n" + "\ticonSizePx: 141.0px (53.714287dp)\n" +
"\ticonTextSizePx: 34.0px (12.952381dp)\n" + "\ticonTextSizePx: 34.0px (12.952381dp)\n" +
"\ticonDrawablePaddingPx: 18.0px (6.857143dp)\n" + "\ticonDrawablePaddingPx: 18.0px (6.857143dp)\n" +
"\tinv.numFolderRows: 3\n" +
"\tinv.numFolderColumns: 4\n" +
"\tfolderCellWidthPx: 189.0px (72.0dp)\n" + "\tfolderCellWidthPx: 189.0px (72.0dp)\n" +
"\tfolderCellHeightPx: 219.0px (83.42857dp)\n" + "\tfolderCellHeightPx: 219.0px (83.42857dp)\n" +
"\tfolderChildIconSizePx: 141.0px (53.714287dp)\n" + "\tfolderChildIconSizePx: 141.0px (53.714287dp)\n" +
@ -1527,6 +1549,8 @@ class DeviceProfileDumpTest : AbstractDeviceProfileTest() {
"\ticonSizePx: 141.0px (53.714287dp)\n" + "\ticonSizePx: 141.0px (53.714287dp)\n" +
"\ticonTextSizePx: 34.0px (12.952381dp)\n" + "\ticonTextSizePx: 34.0px (12.952381dp)\n" +
"\ticonDrawablePaddingPx: 18.0px (6.857143dp)\n" + "\ticonDrawablePaddingPx: 18.0px (6.857143dp)\n" +
"\tinv.numFolderRows: 3\n" +
"\tinv.numFolderColumns: 4\n" +
"\tfolderCellWidthPx: 189.0px (72.0dp)\n" + "\tfolderCellWidthPx: 189.0px (72.0dp)\n" +
"\tfolderCellHeightPx: 219.0px (83.42857dp)\n" + "\tfolderCellHeightPx: 219.0px (83.42857dp)\n" +
"\tfolderChildIconSizePx: 141.0px (53.714287dp)\n" + "\tfolderChildIconSizePx: 141.0px (53.714287dp)\n" +