Commit Graph

254 Commits

Author SHA1 Message Date
Winson Chung
39def7300e Fix issue with floating rotation button being in the wrong corner (launcher)
- Add option for the rotation button to be positioned to the right
  when in ROTATION_0

Bug: 265197526
Test: atest FloatingRotationButtonPositionCalculatorTest
Test: foldable-folded (floating rot button in sysui, natural rot=rot_0)
      foldable-unfolded (floating rot button in launcher, natural rot=rot_0)
      tablet (floating rot in launcher, natural rot=rot_270)
Change-Id: I856a0be2e10fceb34254cd58ceb58dfa8a1819bd
2023-01-26 20:41:54 +00:00
Sihua Ma
04c89fe38e Merge "Add QuickstepWidgetHolder for widget handling" into tm-qpr-dev 2022-12-19 18:22:38 +00:00
Sihua Ma
1db8bc2467 Add QuickstepWidgetHolder for widget handling
Fix: 235358918
Test: Manual
1. Rebooted the device and verified that widgets are still updating properly
2. Changed the theme from dark to daylight, then from daylight back to dark and verified that widgets are working
3. Kept the device on for several days and verified that widgets are still updating
4. Turn on auto-rotate for the launcher, open any app then exit, verified that widgets will not vanish and reappear
5. Add & remove widgets from the screen, added widgets are still updating

Change-Id: I98ee902f7d16b47bd77626201a4fefc897ba17a0
2022-12-16 11:56:36 -08:00
Sunny Goyal
adb364a104 Unifying multiple all-apps implementations
> Using a single layout for the all-apps content
> Removing some unnecessary themes
> Fixing search chashes in SecondaryDisplayLauncher

Bug: 259733681
Test: Existing TAPL tests verify that Launcher/AllApps work properly
Change-Id: Icd5310316499cd421bc039cdbd4d398b813cd477
2022-12-14 11:27:12 -08:00
Mady Mellor
10856068bc Remove floating task button from taskbar
Not POR to have a button in taskbar for this so removing this bit
of the prototype.

Test: manual - enable floating tasks on tablet and check if there's
               a button in taskbar (there shouldn't be).
Bug: 237678727
Change-Id: Ifb57f6528946f89592649afda84101e4f9cbb198
2022-10-31 11:56:14 -07:00
Mady Mellor
78c899314e Add a button for floating tasks to taskbar (behind a flag)
Test: manual - build launcher3, enable the feature flag on tablet with
               a valid app installed, open an app, observe that there
               is NO button in taskbar because launcher3 doesn't have
               populated config
Bug: 237678727
Change-Id: Ic261608898eb9a9220cffacd0c6060a32c10a74f
2022-09-20 10:41:12 -07: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
Sukesh Ram
1b4869fcbc Add app predictions to secondary display app drawer & fix tab UI.
Bug: 233926067
Test: Manual
Change-Id: I2f45a4b30964b365bf149e8864a3af2ea909a237
(cherry picked from commit 9e5fe63a22)
Merged-In: I2f45a4b30964b365bf149e8864a3af2ea909a237
2022-08-30 22:30:03 +00:00
Jon Miranda
da8c0f9926 Make windows transform into icons quicker for certain devices.
Bug: 240671690
Test: manual
Change-Id: Ie36a68c1e92443ca453778df6b8f7549d6e1f7e1
2022-08-08 16:58:04 +00:00
Thales Lima
b8c0595d42 Add new hotseat bottom margin options
This changes how the hotseat height is calculated and by consequence how spaces are distributed in the workspace as well. This is the first of a series of changes that will improve and streamline workspace calculations.

Bug: 228998463
Fix: 234023782
Fix: 230191631
Fix: 232914299
Fix: 236238226
Test: manual, HSV and comparing to mocks
Change-Id: If021e8ba2c7c24c0bf9f27a1aa7aa946792ed04f
2022-07-05 15:33:47 +01:00
Andras Kloczl
c2bd15fd2a Fix slow page animations on large devices
- Change non-fling page snap animation duration
- Change fling gesture related minVelocity

Test: Scroll between home pages, allapps, folder pages
Bug: 229073876
Change-Id: Ib39187ec9c832e65dd0b71f8f4a00e1b636423a4
Merge "Hide web settings, if web suggestions is disabled" into tm-dev

Change-Id: Ib39187ec9c832e65dd0b71f8f4a00e1b636423a4
2022-05-12 12:56:41 +01:00
Shan Huang
4ce2b40f91 Polish the back to home gesture animation to match the spec.
Bug:228533817
Test: Enable back animation from FlagFlipper (Predicitve Back Animation)
and swipe back on Flag Flipper. Try in both portrait and landscape mode.

Change-Id: I7792dc5079698c1b5a7dd3cd06344ba46c4a2da6
2022-04-15 19:26:11 +00:00
Pat Manning
de25c0db36 Adjust edit state drop targets and workspace scaling per device type and orientation.
This is a partial revert of ag/17540098

Bug: 202971709
Test: manual
Change-Id: I0a642f932afd75e47ce11a2c1ee94643d1a67e0c
2022-04-05 20:56:03 +00:00
Brian Isganitis
63c32cab98 Create ResourceBasedOverride for SearchSessionManager.
This override will allow Launcher3 to initialize and control a search session implementation.

Bug: 216683257
Test: Manual
Change-Id: I43d4793ef176cfd8e074961286356b96f9222ca9
2022-04-04 17:02:41 -07:00
Pat Manning
e372366bb3 Revert "Adjust edit state drop targets, workspace scaling, and m..."
Test: manual

Revert submission 17004675-edit-state

Reason for revert: b/226274309
Reverted Changes:
Ib50509b6f:Adjust edit state drop targets per device type and...
Id1817cd3c:Adjust edit state drop targets, workspace scaling,...

Change-Id: I22863d7735f49f6a040a17cf56cc66f20a3e0986
2022-03-28 08:24:54 -04:00
Pat Manning
1acf2b18af Adjust edit state drop targets, workspace scaling, and margins per device type and orientation.
Bug: 202971709
Test: manual
Change-Id: Id1817cd3c7e7bfa5b0aa8aa20565b791ad871f64
2022-03-18 17:43:28 +00:00
Shan Huang
581429b3dc Launcher side implementation of gesture seekable back to home animation.
This is a two part animation. The first part is an animation that tracks gesture location to scale and move the leaving app window. Once the gesture is committed, the second part takes over the app window and plays the rest of app close transitions in one go.

This animation is used only for apps that enable back dispatching via {@link android.view.OnBackInvokedDispatcher}. The controller registers an {@link IOnBackInvokedCallback} with WM Shell and receives back dispatches when a back navigation to launcher starts.

Apps using the legacy back dispatching will keep triggering the WALLPAPER_OPEN remote transition registered in {@link QuickstepTransitionManager}.

Bug: b/195946584
Test: m -j
Test: Swipe back to home on pre-T and T apps, at different life cycle
stages.

Change-Id: I615c5171cd875130f10346fa3ca2a8e9670176cf
2022-03-11 00:11:21 +00:00
Sunny Goyal
187b16cb91 Updating window manager estimation logic:
> Moving the code from ApiWrapper to Resource overlays for better maintainability
> Accounting for display cutouts in insets estimation
> Using same logic in display controller and view inset dispatching

Test: Verified on device
Bug: 221961069
Change-Id: I78466353563692ce3f7512b0146ef8b61ef14bc0
2022-03-09 11:15:58 -08:00
Jon Miranda
3ad2e4e350 Cleanup dead code from old all close prototype.
Bug: 209856611
Test: compiled
Change-Id: Ie94587467442ea00f949241fec41d10fb8c5a527
2022-01-24 17:56:44 -08:00
Pratyush
d51057a5d4 Making second argument configurable in wallpaper intent function
Bug: 190080582
Test: Build and Flash on device
Change-Id: I1cc78622d4faaca0aec0be04c28e893eb9d2d0f0
2021-11-18 10:40:28 +00:00
Jon Miranda
029a644a6e Remove PROTOTYPE_APP_CLOSE feature flag and associated code.
Flag was never enabled, safe to remove.

Bug: 200999899
Test: manual
Change-Id: Ie2646d8c4b9a1c40fac1bfd7dadf4ec714171aec
2021-10-29 16:07:29 -07:00
Jon Miranda
13519e4402 Significantly reduce gesture feedback when swiping up to home screen.
- Uses overscroll damping logic to reduce the velocity
- The start to target rect interpolation can be from the
  start, center, or bottom of the rect depending on where the item
  is on the workspace. This reduces the  amount of distance needed to
  travel between, which helps further reduce gesture feedback.

Bug: 173107751
Test: test closing app that is on:
      -  top row of home screen
      -  middle of home screen
      - in hotseat

Change-Id: I055dd61ca3491807109ff2f6c501bf710c8d340f
2021-09-23 20:13:40 +00:00
Jon Miranda
8d3d2757e2 Play window close animation to home for most app to launcher scenarios
- Animates into icon/widget location on workspace (when applicable)
- Excludes unlock animation
- Excludes when user goes back to to All Apps state

Bug: 197656197
Bug: 197450256
Bug: 197656915
Test: go in app, swipe back to land on home
Change-Id: Icdf680bd88599f1b6288822a177087283668431c
2021-09-21 20:19:23 -07:00
y
8dcd7e0ce7 [Search] Update AllApps header protection
- Disables header protection on AOSP
- Fades in/out search box pill instead of sudden movements
- Work tabs protection shows and hides based on scroll position

Bug: 194106968 [APK attached]
Test: Manual
Change-Id: I5532847ddba3d4555003b0934b8fc846dc5a5cc7
2021-08-29 22:56:54 -07:00
Samuel Fufa
e79b469986 Allow AllApps to restore current selected tab on activity recreate
This CL also fixes:

- Wrong tab selection on RTL
- Fixes header protection hydraulic scroll issue
- Work toggle button text background contrast

Bug: 186005219
Bug: 191250799
Bug: 191227662
Bug: 191349226
Test: Manual
Change-Id: I3777474c954ed0d542ac38ff552367904be147d3
2021-06-17 16:59:56 -05:00
Jon Miranda
32ff76cb4e Adding color back to popup container.
For Color exctraction now occurs in groups:
- System shortcuts
- Deep shortcuts
- Notifications

For home setting popup, each DeepShortcutView will have its own
extracted color.

Bug: 188095443
Test: manual
Change-Id: I7e209f863ff180b8f017aeb2a73c6f1a51842e68
2021-06-10 19:15:24 +00:00
Jon Miranda
7d2dfcfb3f Add WorkspaceRevealAnim, successor to StaggeredWorkspaceAnim.
- Added support for widgets for the new close animation.
- This anim is used with the new app close.
- This anim is not compataible with the old app close, so we need to
  keep StaggeredWorkspaceAnim in case we turn the app close flag off.

- We will also use this anim in the lockscreen to launcher anim, will
  connect them in a follow up CL.

Bug: 188413065
Bug: 173107751
Test: manual
Change-Id: Icab3fd700f2c268bb1c4509a37466e4e6748f789
2021-05-17 23:04:07 +00:00
Jon Miranda
b3a267b58a Tuning app close, and turn on flag.
- Tracks centery, slowed things down a bit

* We will be replacing StaggeredWorkspaceAnim with
  another animation, but I'm keeping it here in
  case we decide to turn the flag off later on.

Bug: 173107751
Test: manual
Change-Id: I5cd54ec374ad07c4912aff125a905b3b1dc7ebd5
2021-05-12 15:04:15 -07:00
TreeHugger Robot
95ff5cf63e Merge "Handle config changes in Launcher" into sc-dev 2021-05-11 10:58:48 +00:00
TreeHugger Robot
c790dab946 Merge "Set swipe_up_rect_xy_stiffness back to 200 for existing app close anim." into sc-dev 2021-05-11 00:29:04 +00:00
Alex Chau
a02eddc144 Handle config changes in Launcher
- This is practically a revert to http://ag/c/13687966/5 and refactored to use DisplayController.DisplayInfoChangeListener
- Make Launcher handle size and density change so transition is less janky when screen size changes
- Added fix in RecentsView to update state and TaskView when display profile changes
- Removed 720dp specific resoureces
- Removed unused widget_section_indent
- Removed unnecessary all_apps_background_canvas 600dp override that is not needed in AllApps+
- Moved remaining dp specific into DeviceProfile
- Simplified allowRotation logic to use single variable in DeviceProfile to determine if allow rotation is enabled by default

Fixes: 180803696
Test: manual
Change-Id: Iea0a7d1a0e14dc3613152dd3b3887450a2e1fc2f
2021-05-10 18:50:02 +01:00
Jon Miranda
94e43bd7d8 New motion for ArrowPopup open/close.
Bug: 175329686
Test: long press on apps where container opens above & below
      and where container is aligned left & right

Change-Id: I09bbf57b6e19cc6f022b9a96fb48d8c4ae080813
2021-05-07 19:33:22 -07:00
Jon Miranda
8fbf5cd263 Set swipe_up_rect_xy_stiffness back to 200 for existing app close anim.
Bug: 173107751
Test: manual
Change-Id: Ic878a2f788c35bffe97d83cb364d3878638272a1
2021-05-03 15:58:43 -07:00
Sunny Goyal
19ff728b92 Adding support for determining split layout for launcher.
> Simulating the windo wmanager API to get available device
  profiles until final API
> When a device has multiple internal displays, and with both
  tablet and phone possibilities, it uses a split workspace layout

Bug: 186160341
Bug: 175782275
Test: Manual
Change-Id: Ieff2329acac7cdd6b9abe6f96cd459cd45bd0efe
2021-05-03 14:48:28 -07:00
Adam Cohen
0c4d278ed2 Don't fade out active page outline during drag-and-drop
=> Keep page backgrounds stable and only slightly modify the alpha + add stroke for active page
=> Don't shrink cell outlines to be too small (issue in hotseat on some devices)
=> Reduce cell radius to 22dp

Bug: 185163323
Test: manual

Change-Id: Ic17999f5672a3355dceeb25af923f02e960389d9
2021-04-29 23:09:56 +00:00
Sunny Goyal
4ed0fb5074 Removing dependency on wallpaper colors and using theme resources
Bug: 184676715
Test: Manual
Change-Id: Ie9a9a784c4a8a8cd484bfd8ea463deedcd4deed6
2021-04-27 16:29:08 -07:00
Jon Miranda
c9ad2dd6c7 Add new app close implementation.
- We remove the fling completely
- We set damping to 1 for x/y springs so there is no
  bounciness, and updated the stiffness and bounds to tighten
  up the path to the final location.
- During the animation, we translate all launcher content
  down
- When the x/y springs, and rect animator all finish,
  we use a spring to bounce the launcher content back up

- Added AppCloseConfig so that the entire animation can
  be defined in one location, with getter methods so that
  all the involved parties of the animation can access the
  current value.
- The animations are all defined linearly, and then
  interpolated over using a 3 point curve.

Building behind feature flag as we tune the values.

Bug: 173107751
Test: manual, visual
Change-Id: I83ad0fa2c4234cf30004240d43e191354595adc8
2021-04-22 16:11:11 -04:00
Adam Cohen
f7ca3b4e3f Update drag and drop visualizations
=> Remove the bitmap-based icon outline
=> Add simple cell based location preview of drop location
=> Round corners of page outlines
=> Get rid of page background for focused page
=> Update colors to use system accent color

Bug: 185163323

Test: manual

Change-Id: Id604c59201536967e25236f305eeeb0aafc9c022
2021-04-15 12:45:24 -07:00
Sunny Goyal
572aca4ce2 Moving some common functionality to IconLoaderLib
Bug: 183641907
Test: Manual
Change-Id: Icfc7ebb140e4e1678b0715beee2e0e513e707b9e
2021-03-25 10:06:53 -07:00
Sunny Goyal
da2ecb3095 Merge "Adding support for listening for app launch animation completion" into sc-dev 2021-03-11 21:36:43 +00:00
Sunny Goyal
b65d766d88 Adding support for listening for app launch animation completion
Bug: 181165935
Bug: 179065491
Test: Verified on device
Change-Id: Ifa6a91560cb31b4dfb72a0f582607e873d8a002d
2021-03-10 15:53:21 -08:00
Pierre Barbier de Reuille
ab33b76dce Launcher changes to support dynamic coloring on static widgets.
Bug: 179783721
Test: By hand using the AppWidgetDynamicColors widget
Change-Id: I27863cac31f2f6c29f5a717ff8d4492325f936fb
2021-03-10 22:04:35 +00:00
Jon Miranda
e126d72fa8 More grid changes, closer to final specs.
* Added isScalable, minCellWidth, minCellHeight, and borderSpacing attrs

When isScalable is true, we use set workspace cell values to
minCellWidth/minCellHeight and then scale the cell values to
fit the available space. This allows us to have consistent
aspect ratios when two devices match the display/grid options.

This is different from the dynamic grid, which calculates
cell values based on iconSize/textSize/etc and then allows
the cell width to be as wide as space allows.

I adjusted some variables so that they will auto adjust
based on another value, indepenent from whether the
grid isScalable or not. An example of this is the folder
label text, where it's always set to be 1.14x of whatever
the workspace icon text size is. This is so we don't need
to add a bunch of more variables to DisplayOption/GridOption.

Bug: 175329686
Test: - switching between device profiles,
      - testing folder open/close
      - testing in multiwindow
      - testing in landscape
Change-Id: Ia469ae0d65b518469ef264b726db46f4a3210056
2021-02-25 17:34:56 -05:00
Samuel Fufa
2ea01e4871 Separate QSB from on device search
Bug: 175125073
[Preview attached to BR]

Change-Id: If967d95e32b58263ede5eb8a3c1b773cef789f28
2020-12-09 12:46:30 -06:00
Winson Chung
f99351888c Revert "Revert "Merge commit '8d14dbe041199d611839140f1c9285fd4174e9f4' ...""
This reverts commit 087a9e39b6.

Change-Id: I05b17a6e4aaaef6de3c2fa26aad45a39eb2833f9
2020-10-23 09:27:48 -07:00
Alistair Delva
087a9e39b6 Revert "Merge commit '8d14dbe041199d611839140f1c9285fd4174e9f4' ..."
Revert "Merging from ub-launcher3-master @ build 6877130"

Revert "Merging from ub-launcher3-master @ build 6877130"

Revert "Merging from ub-launcher3-master @ build 6877130"

Revert submission 12738409-merge_ub-launcher3-master_6877130

Reason for revert: Introduced crashes to global presubmit

Reverted Changes:
I624658ce6:Merge commit '8d14dbe041199d611839140f1c9285fd4174...
Iccd2f1e3a:Merging from ub-launcher3-master @ build 6877130
I791d64951:Merging from ub-launcher3-master @ build 6877130
Icdd32ab01:Merging from ub-launcher3-master @ build 6877130

Bug: 169963211
Change-Id: I77a4ae59e823147beae8dd7cb9b54ccdace2c7f4
2020-10-05 14:46:26 +00:00
Hyunyoung Song
95786e077d Good riddance UserEventDispatcher
Bug: 165675920
Bug: 161381246

TL;DR;;
- nano -> lite proto
- add all the missing logs to WW
- pin item related logging fix
- Removed logging for assistant

sgrep "com.android.launcher3.userevent.nano." | cut -f1 -d: | xargs sed -i -e 's/userevent\.nano\./userevent\./g'

Change-Id: Ie2a49fdd891cacbd7ef40a1dc9e41ff0574c7517
2020-09-27 13:41:49 -07:00
Sunny Goyal
4484015f48 Simplifying AppFilter
Change-Id: I36217a42aa67f2b3bc3a3226ace2ef7e194956a6
2020-09-08 16:31:17 -07:00
Sunny Goyal
0fc3d1275a Moving hotseat predictions to ModelDelegate
Bug: 160748731

Change-Id: I8db7856a17e0b6ca45b4d5ec3513f788f22db11a
2020-08-17 08:43:07 -07:00
Sunny Goyal
8b74cc761b Moving all-apps predictions to Launcher model
Predictions are loaded and managed by Launcher model and follow
the model lifecycle. They are then bound to the callback which
handles the UI

Bug: 160748731
Change-Id: I4a3ea0698d80fafe94afb4ce66ffa7f4a6a91c68
2020-07-29 13:07:52 -07:00