Commit Graph

469 Commits

Author SHA1 Message Date
Thales Lima
fcb6a5fc06 Merge "Improvements for All Apps on different display sizes" into tm-qpr-dev 2023-02-08 10:02:17 +00:00
Pat Manning
cbedc7ed08 Merge "Move overview actions to task menu when no focused task." into tm-qpr-dev 2023-02-03 13:51:54 +00:00
Jon Miranda
2b25ded506 Update notification dot renderer when we update the taskbar icon size.
Test: swipe to home with an app that has a notification dot
      observe no jump in dot size
Bug: 264709741

Change-Id: I5d56fe57e74ed7b094477ecd8727152f3f522042
2023-02-02 23:10:42 +00:00
Pat Manning
7b8f766b85 Move overview actions to task menu when no focused task.
Bug: 265641913
Test: manual
Change-Id: I03a88275b399940468246a69365f76f7deda724e
2023-02-02 11:37:15 +00:00
Thales Lima
e9273ea743 Improvements for All Apps on different display sizes
Bug: 262912817
Test: DeviceProfileAlternativeDisplaysDumpTest
Change-Id: I50e980183b4d5c1a46cca8f1c867b866b9eae4b5
2023-02-01 11:34:12 +00:00
Thales Lima
d852d65693 Create attr for padding between icon and text in cells
Bug: 265210314
Test: DeviceProfileDumpTest
Change-Id: I00af790d0c21c35f1cbce1362e63d3ab8259244a
Merged-In: I00af790d0c21c35f1cbce1362e63d3ab8259244a
2023-01-26 22:50:18 +00:00
Nicolò Mazzucato
1207e773e2 Merge changes I2c1e440b,I805d56d4 into tm-qpr-dev
* changes:
  Add OPTIMIZE_MEASURE flag to QuickSteplauncher window
  Log device profile changes in perfetto traces
2023-01-19 19:42:26 +00:00
Nicolo' Mazzucato
cb7bd50247 Log device profile changes in perfetto traces
This is needed to easily spot unwanted DeviceProfile changes in perfetto traces, as each one causes many new inflation and slows down the ui thread considerably.

Test: recorded trace with this log
Bug: 258214245
Change-Id: I805d56d4dfe1c08d7f28215c0462d01fcaece84e
2023-01-17 14:54:11 +00:00
Alex Chau
85d664efaa Use transient taskbar size/margin to calculate taskbar position for persistent taskbar
- DeviceProfileTest should use persistent taskbar in 3-button mode

Fix: 260596114
Test: DeviceProfileTest
Change-Id: Iadcca218dab2bc2eedc006c86dbbe3f9a0fa5e51
2023-01-16 17:00:46 +00:00
Alex Chau
06f36e8568 Reduce icon/text simultaneously when cellHeight is not enough for largest display size
- Follow-up of http://ag/20691430
- Reduce iconDrawablePaddingPx to further recover space
- Then proportional reduce both iconSizePx and iconTextSizePx
- This will result in larger icon/text size in px when going from larger to largest for most devices
- For extremely large desnity (> largest for most devices), iconSizePx/iconTextSizePx will inevitably reduce due to smaller availalbe space

Fix: 264149604
Test: test different density between larger and largest, check that icon/text size continues to grow in px
Change-Id: I1633566b9372acf1393c7e997598cb3e46c4a507
2023-01-10 18:11:59 +00:00
Alex Chau
37292eb230 Merge "folderChild icon and text size should follow the respective configuration" into tm-qpr-dev 2022-12-20 19:01:14 +00:00
Alex Chau
0d4f1ac30e folderChild icon and text size should follow the respective configuration
- Use mTypeIndex instead of always INDEX_LANDSCAPE or INDEX_DEFAULT to make sure they follow the workspcae icon/text size

Fix: 262446829
Test: DeviceProfileDumpTest
Change-Id: I9fc37b41114a34e35108330a8d599556bff77eef
2022-12-20 12:36:05 +00:00
Alex Chau
1b276a1ba7 Add transientTaskbarMargin above taskbar in overview
- Also removed transient_taskbar_two_panels_size and use sw720dp override instead, to be consistent with how we handle small vs large tablet in overview
- Also made isTransientTaskbar mockable so we can test that in DeviceProfileDumpTest

Bug: 260596114
Test: DeviceProfileDumpTest
Change-Id: I3c2236b95d91246e9581531478e3c97601cfb2ec
2022-12-19 17:23:27 +00:00
Thales Lima
6a59006592 Polish hotseat and taskbar with 3 buttons
Change margin spaces and logic of how many items the hotseat and taskbar should show.

Fix: 246424857
Test: DeviceProfileDumpTest
Test: HotseatWidthCalculationTest
Change-Id: I8ec71c56a0aa362483c43d6400c762d12cf45f5b
2022-12-17 11:20:21 +00:00
Alex Chau
a68164d89e Set iconsSizePx of Taskbar's DeviceProfile directly
- After ag/20691430, iconScale no longer scale app icons (I should rename it later, after QPR2), so we'll need to set the desired iconSize directly for Taskbar's DeviceProfile
- Extracted setting iconSizePx and testSizePx out of updateIconSize, as they are no longer affected by scaling. This allows TaskbarActivityContext to set desired iconsize and then call updateIconSize

Bug: 256976071
Test: Test Taskbar icon size in different density
Change-Id: I741c178b59e0d8ecb4c63689e68767622329379c
2022-12-15 17:05:12 +00:00
Alex Chau
ab800f71d0 Temporarily use 1f bottomSheetDepth for multi-display
Bug: 259893832
Test: Manual and DeviceProfileDumpTest
Change-Id: I196958e6f9f889de003b4d3a22a176bfd7e49511
2022-12-14 18:17:18 +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
Sunny Goyal
54fa110bba Removing some unnecessary interfaces and merging them to ActivityContext
Bug: 259733681
Test: Everything compiles
Change-Id: If6b530f6e589a851cf8554f5de0849843bd66dd4
2022-12-08 10:15:55 -08:00
Jon Miranda
a4aaf1aced Add transient taskbar sizing for twoPanel devices.
Bug: 259712417
Test: on two panel device, on tablet device
Change-Id: Iae273b6bbfb254288c234aa5882f39eb0b6a88b1
2022-12-01 16:28:29 -08:00
Thales Lima
171ee669de Fix test and DeviceProfile dump
The test  was parsing the paddings file with the wrong context passed to the dump method.

Fix: 259998761
Test: DeviceProfileTest
Change-Id: Ia5c243348d7334387bd7a15c3e496a1dc81570a5
2022-11-22 15:57:42 +00:00
Thales Lima
ae0d7ef782 Increase icon size to be closer to spec
Also change paddings because spaces changed

Bug: 258463609
Test: DeviceProfileDumpTest
Change-Id: Iaee433ea3fb5ef633ad428699ce230317021b170
2022-11-18 12:38:14 +00:00
Alex Chau
905e0f1637 Update overview to fit transient taskbar
Bug: 245320601
Test: manual
Change-Id: Ie2085811ef25dc03a3765559c9a0ee37e38aa38e
2022-11-16 17:02:12 +00:00
Alex Chau
1feadf7d81 Merge "Improve spaces for folders" into tm-qpr-dev 2022-11-08 16:51:50 +00:00
Thales Lima
b35faed6e7 Improve spaces for folders
Bug: 214582832
Test: DeviceProfileTest
Change-Id: I7c5cae0792d51baf111d0aec46be302ac6ca9994
2022-11-07 18:23:48 +00:00
Jon Miranda
7e8195081e Update insets for transient taskbar
Bug: 252905206
Test: manual
Change-Id: I03bd493dbe63274c8e90cb5e415127a1dd93e9b8
2022-11-03 17:16:48 -07:00
Jon Miranda
184a04266d Add transient taskbar UI
This change is only for the visual appearance of the
transient taskbar.

Bug: 252905206
Test: manual
Change-Id: I4990b20b39089a0c27ec2a72dd3010cf64ddba1d
2022-10-25 13:46:19 -07:00
Jeremy Sim
8edca84cd5 Merge "Prevent doubling up on split placeholder insets" into tm-qpr-dev 2022-10-20 20:59:49 +00:00
Jeremy Sim
0ac4708396 Prevent doubling up on split placeholder insets
This patch makes it so that the split placeholder uses only one inset for buffering the top of the icon: either the default split placeholder inset, or the device's built-in screen inset.

Currently, when we determine the size of the split placeholder, we add the placeholder's default inset to the device's built-in screen inset (camera cutouts, etc.). On some devices, this causes a very large combined inset, and it doesn't leave enough room for all the other UI elements, especially when 3-button mode is active. This patch cuts out one of the insets by selecting only one of the insets to respect (the larger one).

Fixes: 241164191
Test: Manual, checked all emulated inset types on a variety of screen sizes
Change-Id: Ica0e791bf4b8b757ad3fb87ab1cf3105b97a61dc
2022-10-11 21:26:43 -07:00
Alex Chau
8949c583ee Fix positioning of split instruction and share targets with taskbar in overview
- When taskbar is in overview, overview actions has dedicated space and no need to align to nav buttons
- Add a bottom margin to split instruction and share targetse that is equal to the space below overview actions

Bug: 245320601
Test: Test split select and share target with different screen sizes
Change-Id: I6aec325da9cc4c43c84ba8bed5f0e087c57d6925
2022-10-08 10:15:58 +01:00
Alex Chau
d67ddc4920 Taskbar in overview
- Behind ENABLE_TASKBAR_IN_OVERVIEW which is disabled by defualt
- Make taskbar unstashed in overview with background visible
- Ensure taskbar is touchable in overview

Bug: 245320601
Test: Home<->Overview, Home<->App, App<->Overview, Home->Overview->App->Home, Home->App->Overview->Home, Overview->Home->App->Overview, Overview->App->Home->Overview, App->Overview->Home->App, App->Home->Overview->App
Test: Go to AllApps, call KEYCODE_HOME, go to app and taskbar should be there
Test: App->Overview->Select->Home->App
Test: QuickSwitch -> App
Test: Repeat above with ENABLE_TASKBAR_IN_OVERVIEW x taskbarStashed on/off
Test: Repeat above with gesture and 3-button
Change-Id: Ib25d68f68e89564851b226536e456d0b2f6306f8
2022-10-03 20:15:12 +01:00
Alex Chau
3d2c062567 Change wallpaper depth in widget picker
- Also changed widget picker open/close duration, refactored the values into DeviceProfile
- Generalized MultiAdditivePropertyFactory to accept aggregator as parameter

Bug: 240580498
Test: manual
Change-Id: I6886ca514593e404b8d7b0e8ed44f20ec2b77c73
2022-09-13 12:20:56 +08:00
Alex Chau
e818bcb997 Use real IDP in DeviceProfileTest
- Mock WindowManagerProxy instead of IDP in DeviceProfileTest
- Extracted NavigationMode to standalone class
- Moved parseNavigationMode to WindowManagerProxy so it can be mocked
- Moved DeviceProfileTest to internal repo

Bug: 242086027
Test: DeviceProfileTest
Change-Id: Ia5a43293b1380f04d786d2adf8503cfd10f7674a
2022-09-07 10:35:21 +01:00
Pat Manning
b11dedc254 Merge "Use full screen width for drop target buttons to support higher screen densities from truncating text." into tm-qpr-dev 2022-09-06 14:59:48 +00:00
Pat Manning
e63dd25a54 Use full screen width for drop target buttons to support higher screen densities from truncating text.
Scale oversized text down if after all computations it will still be truncated at higher densities.

Fix: 239401464
Test: manual. To follow up with screenshot test: b/241386128
Change-Id: Ie088d0631b0d13beb2d9f9d5396a56f7b971dee1
2022-08-30 14:57:42 +01:00
Thales Lima
1e8b45f8f1 Extract cell horizontal space to a method
Fixes: 229100375
Test: DeviceProfileTest
Change-Id: Ia2e560b37f4e9fbff9b5c2e7c0ef3fe710e55c29
2022-08-25 11:50:59 -04:00
Thales Lima
7b10492e88 Merge "Make folder sizes customizable" into tm-qpr-dev 2022-08-16 15:02:41 +00:00
Sihua Ma
2d675e8ab0 Merge "Resize preview for correct clipping" into tm-qpr-dev 2022-08-16 00:15:06 +00:00
Thales Lima
a08a443d63 Make folder sizes customizable
Introduce new attrs for folder sizes and update all grids to use the new attrs

Fix: 214582832
Fix: 236272949
Test: atest DeviceProfileTest
Test: manual comparison with mocks
Change-Id: I638052a7f01b4951df0dd26db577167468a3c46d
2022-08-12 12:24:18 +01:00
Vinit Nayak
89be3a4c6d Merge "Show 3 button nav on phone in Taskbar (1/2)" into tm-qpr-dev 2022-08-10 03:06:53 +00:00
Sihua Ma
e04aa207f2 Resize preview for correct clipping
Before, the remote view for the widget in launcher is reused to generate a new preview. However, measuring the view without changing the scale would cause strange clippings. This CL sets the scale of the widget views by manually computing the size ratio.

Change ag/19572297 is necessary before a complete clean-up.

Test: Create a weather widget on first screen -> go to Wallpaper & style -> App grid -> tap on a different grid and verify that the clipping is correct
Fix: 228328759
Change-Id: I8242d3bcfcf30ec924552c1320e22f8a3592f1c1
2022-08-09 23:57:41 +00:00
Vinit Nayak
8a3d05587e Show 3 button nav on phone in Taskbar (1/2)
* TODO: Landscape/seascape support,
        Separate nav spacing out into
        separate class/add tests

Bug: 219035565
Change-Id: I8f5c007f04ea4d6df15962772806356181d764ff
2022-08-09 13:25:50 -07: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
Alex Chau
b0f42f03bf Merge "Adjust height of tablet AllApps base on row height" into tm-qpr-dev 2022-08-04 13:55:06 +00:00
Alex Chau
206ede9c1f Adjust height of tablet AllApps base on row height
- Also used hotseatQsbHeight for AllApps QSB height as they have to match to transform between each other

Fix: 232907846
Test: manual on different tablets
Test: atest DeviceProfileTest
Change-Id: I001d0e129db2a5de6c8ace4c3302381110da03f1
2022-08-03 15:29:22 +00:00
Sunny Goyal
f28c428050 Merge "Create less number of dot-renderers at startup" into tm-qpr-dev 2022-08-03 14:08:07 +00:00
Sunny Goyal
65190aef37 Create less number of dot-renderers at startup
Bug: 235568943
Test: Launcher starts and shows dots normally
Change-Id: I6958b9b98efb43aa280e6ce31af9c0c936610dea
2022-08-02 14:43:31 -07:00
Vinit Nayak
7db37b3d94 Use Taskbar window for phones (only works on gesture nav) with flag
* Try to avoid re-creating TaskbarActivityContext to
avoid re-inflating taskbar views
* Toggle via Flipper App (key 1101)
OR adb shell setprop persist.wm.debug.hide_navbar_window 1 && adb reboot
TODOs
* Only works for gesture nav, not 3 button
* Sampling on phone doesn't always work.

Bug: 219035565
Change-Id: I2a015f99d5f1fe86d7261eec9fd898bd4480ff9f
2022-08-01 17:48:09 -07:00
Pat Manning
5f74bfd76d Refactor DeviceProfile tests based on dump() and use real device dimensions for tests.
- Added roundPxValueFromFloat when converting dp/sp to px to deterministically round up values around .5

Fix: 240133465
Bug: 237542518
Test: DeviceProfileTest.kt
Change-Id: If4239f714487fe5bf2ef44274e2ce415bd75c86d
2022-08-01 17:54:43 +00:00
Jeremy Sim
fe5bccbf6f Merge "Update calculation method for Overview UI placement on tablets" into tm-qpr-dev 2022-07-29 18:56:40 +00:00
Jeremy Sim
1cfe6d490a Update calculation method for Overview UI placement on tablets
This update slightly changes the calculation method for Overview UI placement, in order to line up better with spec. (The previous calculation caused a small 30dp divergence on tablets.)

Bug: 236760307
Test: Manual by measuring pixels and comparing to spec
Change-Id: I94e9e7b5a6a24c37693425ac8ec71cd066003658
2022-07-28 14:05:24 -07:00