Commit Graph

469 Commits

Author SHA1 Message Date
Alex Chau
f3c6e6fcf3 Merge "Consider two panel in home to overview transition" into sc-v2-dev am: 376b09ade2 am: 07cbd6659f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16330826

Change-Id: I45a672b684a2857e92aa9ea829be487fa915c152
2021-11-24 21:07:45 +00:00
Alex Chau
6095333370 Consider two panel in home to overview transition
- Get the value from DeviceProfile directly

Fix: 202444558
Test: manual
Change-Id: Ifadbbf34c8103d7275b8b4043dcae47d1168ae83
2021-11-24 18:11:45 +00:00
Alex Chau
af43216f0d Merge "Use only current density to check isTablet" into sc-v2-dev am: 7ba828c1a9 am: 8d3d6b1961
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16306379

Change-Id: I66dd05d8c193cebfafa2095f986d8ea2bc3f9c57
2021-11-19 20:58:15 +00:00
Alex Chau
2998307cd6 Use only current density to check isTablet
- Removed DeviceProfile.allowRotation and use DeviceProfile.isTablet instead, which only uses current density to calculate its value
- Reverted default allow_rotation preference handling to before ag/14234761

Fix: 203817448
Test: isTablet is set correctly in different screen sizes
Change-Id: Ic6c8dfc774e7787f62d489ad27720a7644c1e8c7
2021-11-19 15:27:01 +00:00
TreeHugger Robot
813292ffa9 Merge "Revert "Add feature flag to control two panel home in portrait"" into sc-v2-dev am: 42f111dc27 am: 54dd53876c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16279502

Change-Id: Ic254c821aea315d861b526b7f61e256256652f03
2021-11-17 18:42:22 +00:00
TreeHugger Robot
42f111dc27 Merge "Revert "Add feature flag to control two panel home in portrait"" into sc-v2-dev 2021-11-17 17:47:16 +00:00
Alex Chau
9012582ef7 Revert "Add feature flag to control two panel home in portrait"
This reverts commit b1c36ce938.

Reason for revert: experiment no longer requried
Bug: 197723099

Change-Id: I585fa4364ab5326a19b099a80a1a02a66370d84f
2021-11-17 14:16:58 +00:00
Alex Chau
5544cd254e Merge "Update overview clear all button to be larger" into sc-v2-dev am: 67ddd0fefd am: 9184e1f3f4
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16183382

Change-Id: Ic9b9ca681e0030b3076f3607788c42b0f2a89019
2021-11-05 12:13:02 +00:00
Alex Chau
56bd257478 Update overview clear all button to be larger
- Tuned the size and corner radius
- Tuned the margin from screen edge
- Tuned the vertical position

Bug: 204153113
Test: manual
Change-Id: Ibf3df599b31c7ecc2c9c951fc89e7e09c90253ef
2021-11-04 16:02:17 +00:00
Pratyush
9afe1ea212 Make hotseat bottom a launcher config
The changes are required for the bottom placement of QSB on lily
devices. This enables lily devices to tweak the required factors to
adjust the placement of QSB

Bug: 190080582
Bug: 184060190

Test: Tested the changes manually
Change-Id: Ibd80db5d78a5792963407a0b03af7e4f40717e08
2021-10-13 11:13:27 +00:00
Thales Lima
83bedbfe97 launcher: refactoring variables into arrays
There are a lot of variables that can be merged together into arrays
following some optimizations done in other places.

Bug: 191879424
Test: checking cell size and extra space in dumpsys
Change-Id: I1d73fbb5da2df2345ced7f46df5bae5d75d9d6b1
2021-10-08 13:36:56 +01:00
Thales Lima
78d00adcbe launcher: create more space options
The grid doesn't have a constant space between cells anymore, so we need
new attributes for the different spaces in different situations.

Bug: 191879424
Test: checking cell size and extra space in dumpsys
Change-Id: I4b6aae5b3fea281490c00cd13d0cd3a25372f21b
2021-10-05 12:26:05 +01:00
Thales Lima
d90faab655 launcher: create attrs for more horizontal margin options
According to new specs, margins are different depending on orientation
and fold/unfolded. Also change the name of the variable to
horizontalMargin, since it applies the same padding to both sides.

Bug: 191879424
Test: manual and checking paddings in HSV
Change-Id: I8990c02b928a22b9f3b0cf3cbc3abf08df4daa9d
2021-09-30 14:06:56 +01:00
Thales Lima
f8182da6c5 Merge "launcher: create paddings for foldables" into sc-v2-dev 2021-09-30 09:19:22 +00:00
Samuel Fufa
abb827b376 Merge "[Foldable] Apply max width to AllApps in unfolded state." into sc-v2-dev 2021-09-29 22:07:42 +00:00
Thales Lima
7a6752da51 launcher: create paddings for foldables
This creates a new padding file that bring some foldables up to spec
with VisD. For 2 panel layouts it now uses workspace margin instead of
cell layout padding.

Bug: 191879424
Fixes: 200035429
Test: checking paddings in HSV
Change-Id: I11b8e1afd76f535368d4c26e31630ce496171e13
2021-09-29 11:53:29 +01:00
sfufa@google.com
de0132939b [Foldable] Apply max width to AllApps in unfolded state.
Since we are applying the same iconWidth in AllApps as Workspace in unfolded state, this change restricts AllApps to span only the area required to display AllApps contents and not span full available width. Unfolded/phone behavior remains the same.

Bug: 199959857
Bug: 194259694
Test: visual
Change-Id: Ie5658d566f20e825e666ef17db79a87b07dc2936
2021-09-24 15:18:01 -07:00
Pierre Barbier de Reuille
578deba57d Correct the computation of the cell size.
The previous computation ignored the left/right padding of the cell
layout.

Fix: 200968203
Test: Manually
Change-Id: I5a017b90c11e2cd710f16fece5cdae902ccb1e72
2021-09-24 14:18:28 +01:00
Tony Wickham
21970ccd29 Remove nonOverlappingTaskarInsets
- Override our insets in LauncherRootView to explicitly only care about nav bar size, ignoring any insets due to taskbar.
- Previously we used nonOverlappingTaskbarInsets to belatedly subtract from measurements in e.g. DeviceProfile, but now we can revert most of those calculations since we effectively subtract taskbar insets at the root.

Test: visual in different orientations and navigation modes, and testPressHomeOnAllAppsContextMenu to ensure REQUEST_WINDOW_INSETS still works for automated tests
Fixes: 200607741
Change-Id: I8de5a268c686a1354b4beaa30e101bab6bed5af9
2021-09-21 13:52:43 -07:00
Thales Lima
d1df5fcaac launcher: use scalable grid in 4x4
Many changes are required to make scalable displays work correctly on
foldables. This first one is making sure that the correct number of
columns is used when calculating the used width for scalable grid. The
spaces around the workspace are not final yet.

Bug: 191879424
Test: manual
Change-Id: Idc41ed004580f1f86d8f9595d005abc72301b1e3
2021-09-17 10:43:42 +01:00
Alex Chau
b1c36ce938 Add feature flag to control two panel home in portrait
Bug: 197723099
Test: manual
Change-Id: I20d7751e09053dc90c495f398334431f390f64bf
2021-08-25 11:54:08 +01:00
Alex Chau
2683bd7728 Merge "Support different task icon margin for grid tasks" into sc-v2-dev 2021-08-18 08:41:42 +00:00
Vinit Nayak
ca1d523734 Merge "Add GroupedTaskView for gestures in staged split." into sc-v2-dev 2021-08-17 23:26:53 +00:00
Vinit Nayak
17c4b33db6 Add GroupedTaskView for gestures in staged split.
* Currently only works for portrait 50/50 split
* Have gesture swipe animation flow use multiple
TaskViewSimulators, one for each app in split
* Added new APIs in shell to query for actively running
tasks to determine if we're in split screen
* Lots of UI polish needed during gesture
* Launching into staged split after live tile ends
not implemented yet.

Bug: 181704764
Change-Id: Ib90e99e1e10b19121e8709385e1334b9380d6502
2021-08-17 13:46:43 -07:00
Alex Chau
eaa6d682d4 Support different task icon margin for grid tasks
- Focused and non focused grid now have differnt margin between icon and snapshot
- The overall margin above snapshot is still the same
- Invoke updateChildTaskOrientations when focus task changes to update the margin
- Also lowered the row spacing according to spec

Bug: 194194694
Test: manual
Change-Id: I25267bef19d5a8b1dc1cf96fc1babdc3ebc39330
2021-08-17 18:33:21 +01:00
Tony Wickham
40f86763bc Merge changes from topic "taskbar-crop-tasks" into sc-v2-dev
* changes:
  Extend taskbar color to entire screen in overview
  Use WindowBounds#insets instead of WindowInsets in DeviceProfile
2021-08-17 14:52:50 +00:00
Tony Wickham
635e180e56 Extend taskbar color to entire screen in overview
Only when taskbar is unstashed in apps:
- Scrim workspace with the taskbar color when opening apps and in BackgroundAppState
- Crop opening apps to above the taskbar
- Crop TaskViews to above the taskbar during gestures

If taskbar is stashed in apps, behavior is the same as before, i.e. no scrim over the wallpaper and no cropping of tasks.

Added a field DeviceProfile#taskbkarPresentInApps to distinguish these cases. LauncherTaskbarUIController and TaskbarStashController ensure this value is set appropriately.

Test: Ensure tasks don't appear behind taskbar when it's unstashed; set ENABLE_SCRIM_FOR_APP_LAUNCH = true to test the whole screen scrimming when opening an app

Bug: 196257194
Fixes: 190681228
Change-Id: I481501457a5a6d49c380feea3db3b4058e4cf3f8
2021-08-16 16:50:52 -07:00
Tony Wickham
f5ce2f624d Use WindowBounds#insets instead of WindowInsets in DeviceProfile
This reports more consistently and is cheaper.

Test: Log windowBounds.insets.bottom vs windowInsets.getSystemWindowInsetBottom() and note that the former is correct after fold/unfold even though the latter starts reporting 0
Bug: 196874770
Change-Id: I41eb0ab51d3761a988e680cd6d61e40bcacf567f
2021-08-16 16:45:12 -07:00
Alex Chau
1e4484669d Remove widget panel
- Remove all usage of LEFT_PANEL_ID and fixed left panel code
- For preview renderer, load screen 0 + screen 1 instead
- Added a split display specific default workspace layout, with a placeholder app to pass test before we implement page pairing(b/196376162)
- Known issue: If screenId 1 is deleted, right panel will disappear from Wallpaepr & Style because there is no screenId 1. Will be resovled after page pairing(b/196376162)

Bug: 175939730
Test: manual and TaplTestsLauncher3#testWorkSpace
Change-Id: Icac1c94165c14a49c17897c45355b6cdc4d87e91
2021-08-13 21:48:35 +01:00
Andras Kloczl
30fe9152d5 Update two panel specific launcher home icon sizing
Test: manual
Bug: 191879424
Change-Id: I4f51616004d78036ad801298bb5ba72af8de3f30
2021-08-12 18:46:01 +01:00
Jonathan Miranda
86d80936ac Merge "Update extra space allocations for taller devices." into sc-dev am: dd16ecbc61
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15457550

Change-Id: I8fe398bacbdc11a3ba6d43829c1be75248249740
2021-08-05 18:42:44 +00:00
Jon Miranda
a56cb84141 Update extra space allocations for taller devices.
- Take less space from cells
- Distribute some of the empty space above the workspace
- Already confirmed from previous testing that these thresholds
  only affect taller devices

Bug: 194688362
Test: long press on app icons,
      test drag and drop bounds
      test drop target bounds
      test folder opening bounds
      test all grids on taller devices

Change-Id: If90b7663ab4afedca1193bdd73a0ae38a1f25243
2021-08-04 12:00:36 -07:00
Alex Chau
ac9df38e9f Make icon drawable for non-focused grid tasks smaller
- Center the icon drawable in center of IconView with and allow a smlaler size to be set

Bug: 194194694
Test: dismiss focus task, swipe from app etc.
Change-Id: I2855249b13e2ccdb45f101bfb7afef4311f7b46f
2021-08-03 17:36:15 +01:00
Jonathan Miranda
4edf78695d Merge "Add more restrictions on whether we increase the hotseat size for tall devices." into sc-dev am: 4a17e66166
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15412628

Change-Id: Ifb92308f3c0a3fef040e3a863e9e11300ad46334
2021-07-30 20:50:28 +00:00
TreeHugger Robot
02d45252f3 Merge "Fix cell size calculation in large screen devices" into sc-v2-dev 2021-07-30 11:39:26 +00:00
Steven Ng
2a5c594855 Fix cell size calculation in large screen devices
Test: Digital clock widget is no longer cropped.
Bug: 184966000, 194784402
Change-Id: I26c406da1e10232019f34620a4d2bc0dbafcbb31
2021-07-30 11:14:11 +01:00
TreeHugger Robot
eb6391ff8d Merge "Fixing hotseat hidden in 3P Launcher" into sc-v2-dev 2021-07-29 21:51:39 +00:00
Sunny Goyal
71ef9683db Fixing hotseat hidden in 3P Launcher
Bug: 193539246
Test: Manual
Change-Id: I3e756457710f2a3909623c7eeec457319eb6c3b8
2021-07-29 13:00:19 -07:00
Sunny Goyal
e6935d895a Merge "Simplifying color extraction registration logic" into sc-v2-dev 2021-07-29 06:53:15 +00:00
Sunny Goyal
69a8eecdc9 Simplifying color extraction registration logic
> Calulating correct location irrespective of transient
  state (scale/translation)
> Removing extraction pause/resume logic
> Simplifying location calculation and registration (only use one location instead of a list)

Bug: 194732483
Test: Manual
Change-Id: I255d83761bff5e09c9fb0a5e398d0be0c1d0956f
2021-07-28 15:43:13 -07:00
Jon Miranda
80dda30f49 Add more restrictions on whether we increase the hotseat size for tall devices.
Bug: 194688362
Test: test devices that should not be affected, ensure they are not affected
Change-Id: I0e027354dbafcce30cf616998d2a7bfab516b5de
2021-07-28 14:20:59 -07:00
Alex Chau
5fd9d491b0 Tune Overview size according to VisD
- Removed modalTransformY as overview actions no longer need to move in modal view
- Moved row spacing and page spacing to DeviceProfile
- Added several tablet / orientation specific DeviceProfile params

Bug: 194194694
Test: Manual
Change-Id: Id5435e7f6fc1b6fb7c0e55e55fa240cf84c4d6da
2021-07-26 12:01:30 +01:00
Alex Chau
646f804627 Add overviewShowAsGrid to DeviceProfile
- Simplified a lot of dp.isTablet && FeatureFlags.ENABLE_OVERVIEW_GRID.get() usage

Bug: 194194694
Test: manual
Change-Id: Idfb0ad192048106bbe6f8e2a28fa5613b86e5208
2021-07-26 11:59:34 +01:00
Jonathan Miranda
8f16a7703e resolve merge conflicts of 6d9e866669 to sc-v2-dev
Add more extra space to hotseat for taller devices.

Bug: 194533368
Bug: 192520231
Change-Id: Ib4705342329767a3e4eb2781aff6cd72220e4eaa
Test: manual test on taller devices
2021-07-23 23:13:44 +00:00
Jonathan Miranda
6fbcbc7a4c Merge "Add more extra space to hotseat for taller devices." into sc-dev am: 0c7153bbdf
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15363650

Change-Id: I3ff54d0d1559305b8e501abeba31ab3cec8c37f1
2021-07-23 22:02:13 +00:00
Jonathan Miranda
0c7153bbdf Merge "Add more extra space to hotseat for taller devices." into sc-dev 2021-07-23 21:41:27 +00:00
Jon Miranda
80cddbccb6 Add more extra space to hotseat for taller devices.
Bug: 192520231
Test: manual test on taller devices
Change-Id: I3eccada67f0ba07d01f823c4156f02c3feb97f84
2021-07-23 20:01:16 +00:00
TreeHugger Robot
2ed55ed9de Merge "Folder polish: unbold folder title, ensure icons not cropped in folder." into sc-dev am: 3f062ab8b6
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15365040

Change-Id: I0fccfe7fdf32f7bcbcddb3633e34acb1c7c979f6
2021-07-23 18:23:49 +00:00
TreeHugger Robot
3f062ab8b6 Merge "Folder polish: unbold folder title, ensure icons not cropped in folder." into sc-dev 2021-07-23 18:10:48 +00:00
Jon Miranda
f33f5b3fc5 Folder polish: unbold folder title, ensure icons not cropped in folder.
- Ensure folder items are scaled to fit within the height/width in 4x5 mode.
- This bug surfaced now since  we increased the icon size.

Bug: 194356039
Test: set display to large, set font to large
Change-Id: Ie360ca67c3c91649a471bce920b2fc6a82fb9661
2021-07-22 17:19:28 -07:00