Commit Graph

17 Commits

Author SHA1 Message Date
fbaron
e4b0b71faa Make hotseat column span responsive
Flag: NONE
Test: DeviceProfileDumpTest, DeviceProfileAlternativeDumpTest, HomeScreenImageTest
Bug: 325084912
Change-Id: Ifa9e8066662a1ab053f66b8800b739d813d2dab8
2024-04-16 06:19:16 +00:00
fbaron
e69b6f49f7 Align QSB with hotseat and workspace icons
The QSB was a bit wider becuase icons visible size is a bit smaller than their actual size due to b/235886078 so we add a workaround to adjust QSB size based on the visible icon size

Bug: 281587788
Test: atest HomeScreenImageTest
Flag: NONE
Change-Id: I593ca2d588f08b830be0b2ac389c747b6f558b91
2023-12-19 13:52:45 -08:00
Winson Chung
734c6f3974 Workaround for handling single device specific state in dump tests
- There's a DeviceProfile state that is dynamic on a specific device
  class (based on a fw resource), this causes problems with the dump
  tests which compare the device profile against static prior dumps.
  For now, we can just update the expected dump based on the state
  of the resource to ensure that the current device profile state on
  this device matches.  To do this, we also need to consolidate the
  various duplicate methods to assert the current and golden dumps
  match to have a common place to adjust the expected dump.

Bug: 315230497
Test: atest DeviceProfileDumpTest
Test: atest DeviceProfileAlternativeDisplaysDumpTest
Change-Id: I5130d330878757702af07e166a669cc76452b271
2023-12-15 05:10:04 +00:00
Thales Lima
1f19c95d95 Create new hotseat spec tests
Refactor DeviceProfileDumpTest to use files instead of inline strings.

Fix: 292204436
Test: DeviceProfileDumpTest
Test: CalculatedHotseatSpecTest
Test: HotseatSpecsTest
Flag: ENABLE_RESPONSIVE_WORKSPACE
Change-Id: I5aa2891c4c68033a4dd28f84f9dd5478be17b1d8
2023-09-05 16:31:06 +01:00
Jordan Silva
d92271849c Fix hotseat border space crash GSI
Fix the calculation of the space between the icons for hotseat when the number of spaces needed is 0 or less.

Fix: 285834082
Flag: N/A
Test: HotseatWidthCalculationTest
Change-Id: I73bc1950277c01ac0ae7202c1e08bf45266b59b8
2023-08-17 16:02:01 +01:00
Thales Lima
93ee8fcb30 Decrease the padding between app icon and label
The app icon size in XMLs are 10% larger because of http://b/235886078, so we need to remove that from the padding between the icon and the label.

Bug: 235886078
Fix: 279142287
Test: DeviceProfileDumpTest
Flag: N/A
Change-Id: I2662c30252dc4e06d4767dbe7125a99a02ce2b64
2023-06-28 16:12:52 +01:00
Jordan Silva
637f4eb2f3 Update DeviceProfile to calculate responsive grid for folders
It uses the new responsive folder calculations and specs when responsive grid is enabled. The grid has to have folderSpecsId defined to use the new specifications, otherwise it will use the current scalable grid implementation.

Fix: 284155638
Test: DeviceProfileDumpTest
Test: ResponsiveHomeScreenFolderImageTest
Test: HomeScreenFolderImageTest
Flag: ENABLE_RESPONSIVE_WORKSPACE
Change-Id: I535cff4bb00e969f782447a898230fe2b2c05cc9
2023-06-21 12:18:58 +01:00
Thales Lima
0bd7a37971 Correct AllApps horizontal padding
There was one extra border space being added to handheld, which makes AllApps and Workspace icons to not align.

Fix: 284151671
Test: DeviceProfileDumpTest
Test: HomeScreenAllAppsImageTest
Test: DeviceProfileResponsiveDumpTest
Test: HomeScreenAllAppsImageTest
Flag: N/A
Change-Id: I6e4a0d93336a3c59db2a25805d90adfaf7a231cf
2023-06-08 12:09:24 +01:00
Thales Lima
ec5abba93b Add feature flag and attribute for responsive grid
This shouldn't change anything in the grids, only support the creation of responsive grids in the future. For now, to check that the flag works, turn it on and check the dumpsys. There is also a dump test created for this.

Fix: 277064696
Fix: 277064702
Test: DeviceProfileResponsiveDumpTest
Flag: ENABLE_RESPONSIVE_WORKSPACE
Change-Id: I1bef87043a100234bd661cd6ac00007fdc654116
2023-05-09 12:06:18 +01:00
Jon Miranda
9c478b6c29 Add taskbarIconSize to GridOption/DisplayOptions
- Renamed variables to make it more clear what they represent
- DeviceProfile will be source of truth for taskbar
  sizes

Bug: 265144213
Test: phone, multi-display, tablet
Change-Id: Id9c19d15a65894fd7645e0f876a4b6527b713c34
Flag: ENABLE_TRANSIENT_TASKBAR=true
2023-03-24 12:29:11 -07:00
Thales Lima
7eee74b3f8 Scale folder if it doesn't fit the screen
Scale folder attrs if a full folder doesn't fit the screen width. This will make icons and text smaller than the workspace.

As a follow-up, another bug will be created to only scale full folders instead of all folders.

Bug: 271554689
Test: manually create a full folder, change the display size to large+
Change-Id: I47dc4bd4fe0c9eae989095fc1d179b81d350ef77
2023-03-17 14:13:04 -03:00
Helen Cheuk
599109b23f 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
2023-02-24 14:40:50 +00:00
Thales Lima
69166dd054 Create a DeviceProfileDumpTest for nonquickstep
This makes sure we are still testing non scalable grids as well

Bug: 241386436
Test: DeviceProfileDumpTest
Change-Id: I06b442cf1052a952ee834f98c5005ea8e950c2f0
2023-02-13 17:31:13 +00:00
Thales Lima
1a2d4bd6f4 Create an XML parser for WorkspaceSpecs
Extract DeviceProfileTest to Launcher3 so it can be used in other tests as well, and change name of previous base test to be more descriptive.

Bug: 241386436
Test: WorkspaceSpecsTest
Change-Id: I64613bb5a23c374ed15fb6d936192236a541ab9b
2023-02-08 11:20:14 +00:00
Thales Lima
03ac377a34 Check kotlin format before uploading
This uses ktfmt on the PREUPLOAD hook to check file formatting.

Bug: 264851618
Test: manual
Change-Id: I8bdeabd9c1ed571a464707e6912419ad3190a169
Merged-In: I8bdeabd9c1ed571a464707e6912419ad3190a169
2023-01-10 13:24:43 +00:00
Alex Chau
be753137a2 Don't scale iconSize and textSize in non-default display size
- Cells should get extra space by reducing borderSpace. If that's still not enough, use 0 borderSpace and distribute the space

Fix: 256976071
Fix: 248348171
Test: manual
Change-Id: I067c1aaa553d7a84caeeb9ce21e80cfaf86a3bed
2022-12-13 16:30:14 +00:00
Thales Lima
9938c2f791 Calculate hotseat width based on available width
Navigation buttons take space on the hotseat, so hotseat width (qsb width and border space between icons) should be calculated instead of having a coded value.

Bug: 223724516
Bug: 228998463
Test: manual, changing display size
Test: manual, changing hotseatBarEndOffset value
Test: HotseatWidthCalculationTest
Change-Id: Ibd4f5ff2e06afda8e7420fb744db049d2e418e14
2022-08-04 15:21:06 +01:00