Commit Graph

1095 Commits

Author SHA1 Message Date
Sunny Goyal
211496e3d8 Merge "Removing some obsolete features" into tm-qpr-dev 2022-08-22 20:27:45 +00:00
Thales Lima
3906192135 Merge "Show resize handle on cancel widget drop" into tm-qpr-dev 2022-08-16 15:02:54 +00:00
Sihua Ma
2d675e8ab0 Merge "Resize preview for correct clipping" into tm-qpr-dev 2022-08-16 00:15:06 +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
Andras Kloczl
eb6a154230 Fix widget jump bug when moved to invalid place
When dropTargetLayout is null we don't need to
animate the widget to the closest location but
move it back to its original position.
Test: manual
Bug: 236135424

Change-Id: I50a793732cd9656605fdc9908f71ff0efa7e69e9
2022-08-09 10:53:33 +02:00
Thales Lima
84fa75cc7d Show resize handle on cancel widget drop
Fix: 233834133
Test: manual on handheld and large screens, until we have create a way to resize widgets in TAPL b/241385885

Change-Id: I427dfaadd219d33a5371c3ae92c4e2311d3d3c6a
2022-08-05 10:30:37 +00:00
TreeHugger Robot
89b8f65277 Merge "Account for span greater than 1 in getReorderRadius" into tm-qpr-dev 2022-08-03 14:12:45 +00:00
Sunny Goyal
c5c7da9a8b Removing some obsolete features
PROMISE_APPS_NEW_INSTALLS = true
ENABLE_QUICKSTEP_WIDGET_APP_START = true
FOLDER_NAME_SUGGEST = true
ENABLE_PREDICTION_DISMISS = true
HOTSEAT_MIGRATE_TO_FOLDER = false
ENABLE_DEEP_SHORTCUT_ICON_CACHE = true
ENABLE_THEMED_ICONS = true
ENABLE_ALL_APPS_EDU = true
EXPANDED_SMARTSPACE = false

Bug: 241141733
Test: Presubmit
Change-Id: I72c0c20ab7e214994dc3c3665c90e85d45991a7a
2022-08-02 13:38:38 -07:00
Sebastian Franco
6e1024e161 Account for span greater than 1 in getReorderRadius
Fix: 239963678
Test: Making sure the reorder preview is being drawn when moving a widget
Test: atest ReorderWidgets
Change-Id: Id32919821ac9177b3428261354d361c52b8f9e2d
2022-07-29 13:47:33 -07:00
Schneider Victor-tulias
1dbffe0af7 Remove unused logs
Fixes: 240173459
Test: Started launcher
Change-Id: I853d9a50a0c34a7fdda87ea20d46a9f7ac7542e3
2022-07-29 13:06:24 -07:00
Shikha Malhotra
bc9b08fdd1 [Cherry pick merge conflict] Updating visibility of some members for easier extensibility
This change is causing a merge conflict with ag/19441591. Hopefully only a cherrypick is needed.

Bug: b/218186980
Test: Manual Testing that Launcher3 compiles and works
Change-Id: Id85486ef763ce9a04b83fef44542b2eb3e0e599d
(cherry picked from commit c487e1b4c5)
2022-07-27 20:33:29 +00:00
vadimt
f6ef879cf4 Moving all sources that are shared between Launcher and TAPL in one directory
This will help SysUI test team (who uses TAPL) to set up Gradle build for their tests.

Bug: 202567877, 234414088
Test: presubmit
Change-Id: I3d923ea4b54d1a4c3d2b345be09692727d30433e
2022-07-27 20:18:46 +00:00
Abhilasha Chahal
cb32935281 Allow overriding DragController and drag use cases
Test: Manually verified Launcher3 works fine
Bug: 233864888
Change-Id: Ifb2fe19c0a2b332862b36b1ac0100e0f5301a5a6
2022-06-29 17:29:47 +00:00
Sebastian Franco
930531f669 Make Talkback anounce which page is the icon being move on.
Adding a third argument for the talkback string.

Fix: 230593493
Test: Move an item using Talkback and it should mention the row,
column and page where you can drop the item.

Change-Id: Id3d4435e9ef3348278643e6e2a1cd1e8bf5157b7
2022-06-22 17:17:38 -07:00
Jon Miranda
46ecc0ca08 Pause expensive view updates before setting hw/sw layers.
Prevents widgets from updating mid animation.
Also pauses view updates during app close animation.

Bug: 220939231
Bug: 230617085
Bug: 226171754
Test: manual

Change-Id: I0138d57e6a7b2c22fd9a029e971b3e27c7e9f22e
2022-06-02 12:21:01 -07:00
Pinyao Ting
6a41d56b50 Log the reason why a WorkspaceItemInfo was removed
In the past we've seen a WorkspaceItem disappeared from the workspace
but wasn't able to determine why it was removed. This CL includes the
reason why it was removed in the error log, which hopefully would help
us debugging similar issues in the future.

Bug: 231239260
Test: make
Change-Id: Iba3d57568c9b3e011a6b65b26f0d4170d42fe1a5
2022-05-16 20:17:47 +00:00
Sunny Goyal
f0ff70a2a5 Adding support for easily extending Launcher DragAndDrop support
Bug: 232165524
Test: Verified locally
Change-Id: I3b4f37bc9914de55330662edd678e6fdd0eafece
2022-05-11 21:34:08 +00:00
Sunny Goyal
f76524151d Merge "Replacing ItemInfoMatcher with predicate" into tm-dev 2022-05-03 20:04:55 +00:00
Sunny Goyal
32084d49d3 Replacing ItemInfoMatcher with predicate
This removed unnecessary componentName lookups when it
is not required. Many checks just rely on IDs and
userHandle

Bug: 231153610
Test: Presubmit
Change-Id: Ief93954abc5861062a9f55dc2ef181d3de106c62
2022-05-03 10:07:22 -07:00
Alex Chau
f39cc126bf Tune AllApps dismiss animation
- Avoid overriding interpolator in AllAppsTransitionController.setStateWithAnimation as it's no longer needed and it'll wrongly override interpolator for ANIM_ALL_APPS_FADE
- Override ANIM_ALL_APPS_FADE to FINAL_FRAME in QuickstepAtomicAnimationFactory for tap deadzone to dismiss animation, also added EMPHASIZED_ACCELERATE for the dismiss animation
- Tuned dismiss animation across form factors to 300ms

Fix: 220336617
Test: manual
Change-Id: I4b3e827b503dcb1dd39f0bd99d4c1dd5ffdba0f3
2022-04-29 20:31:26 +01:00
Andras Kloczl
0056e95d8e Change home dragging logic for dead zones
- If a dragged item is not over a valid drop target
then we don't highlight anything and on drop we move
it back to its original position.
- Instead of checking if the dragged item is over the
hotseat view, now we check if the item is over the hotseat
shortcuts.
- Smartspace is a dead zone

Test: drag items from different workspaces, allapps, widget
  picker etc. to all parts of the screen and verify which
  view is targeted and where the item gets dropped.
  Check on phone/foldable/tablet.
Bug: 228201267
Change-Id: I18de576ea300d58ae645e511b238e0b946b5595a
2022-04-26 16:28:11 +01:00
Sihua Ma
da8759ae29 Showing alert dialog when shortcut version higher than the App
Creating an AlertDialog when the disabled reason of the shortcut is DISABLED_REASON_VERSION_LOWER, which happens when the backed-up shortcut was created from an application that has a version higher than the one installed on the device. The AlertDialog will direct the user to the play store and update the application.

Test: Manual
Fix: 224796975
Change-Id: I0125fada60b48176775de6782ba03ee6790904aa
2022-04-14 01:34:44 -07:00
Andras Kloczl
07111f25f4 Change page snapping logic for large screen devices
Use 15% of the screen width instead of 40% of the page
width currently used for phones.

Test: try page snapping on Launcher home
Bug: 213305066
Change-Id: I6a525100bf942c5089f580a27250c425ca95cf00
2022-04-12 20:23:23 +01:00
Shikha Malhotra
0f2e1b6714 Added provision to switch the PageIndicator in specific Launchers
Please see the related CL in LauncherLilyGoogle where pagination is
implemented as persistent dots.

Bug: b/218187058
Test: manually test thet Launcher3 features work correctly
Change-Id: Ic20aa92249b1bbe3c4ab7810683b54648a181722
2022-04-08 11:47:46 +00:00
Pat Manning
08610ca583 Adjust workspace grid and cellLayout paddings.
This is a partial revert of ag/17540098

Bug: 202971709
Test: manual
Change-Id: Ia49e48f336bcca906aae6b014d88f10421b83d0c
2022-04-06 13:10:50 +01:00
Stefan Andonian
bae4a72d30 Merge "Show correct drop targets for All-apps predicted item drags." into tm-dev 2022-04-04 20:13:29 +00:00
Stefan Andonian
c62a4dae5f Show correct drop targets for All-apps predicted item drags.
This change fixes a bug where, after a user drags and drops a
predicted app from the all apps page once, dragging that item again
results in the "Remove" drop target being shown rather than the
"Do Not Suggest" drop target.

Bug: 221057278
Test: Verified correct drop down targets were present after fix when
dropping all apps prediction item on workspace multiple times in a row.

Change-Id: I95940eeebbd547861fcdfbb5d02769b82446184d
2022-04-04 17:32:32 +00:00
Pat Manning
5575dfeaad Merge "Revert "Adjust edit state drop targets, workspace scaling, and m..."" into tm-dev 2022-04-01 02:05:41 +00:00
Sebastian Franco
b6b4069aa4 Fix widget drop animation in 4x5 grid
For the 4x5 grid we add insets to the widget and the
 animation wasn't accounting for it.

I'm using this shell function to quickly change the
animation speed

```
function anim-speed() {
	adb shell settings put global window_animation_scale $1
	adb shell settings put global transition_animation_scale $1
	adb shell settings put global animator_duration_scale $1
}
```

anim-speed 1 # for regular speed
anim-speed 10 # for really slow speed

Fix: 194227752
Test: Put down a widget in 4x5 and the animation should match,
sometimes is to fast but you can slow the animations with adb and see
the difference

Change-Id: I182729de39c0d0b12231d07e337dddca6fccf5c0
2022-03-30 21:18:18 +00: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
Jon Miranda
7ebe209c21 Add debug logs for bad launcher state.
Bug:223498680
Bug:221658803

Test: manual
Change-Id: I138a7ab031269009fa8ca492cd0bd48085aa4e68
2022-03-10 20:25:38 +00:00
Adam Cohen
f2f302bcf6 Fix DnD logic for determining current drag screen / panel
=> we want to use the extremum of finger location and object
   center for snapping to a new screen (max when snapping to right,
   min when snapping to left)
=> when selecting a panel within the current screen, we want to
   rely strictly on the object center to determine selection; there
   is plenty of space to be consistent here, and extremum logic
   could cause thrashing back and forth with no page movement.

Test: Manual. See videos in b/221104663. On two-panel and one-panel
      test dragging a widget between different screens with
      different starting positions of where the widget goes down.

Bug 221104663

Change-Id: I8f0f13f07b753752087a90c4bacb76cfbf7aa5bf
2022-02-24 16:13:12 -08:00
Andras Kloczl
2dacbee028 Fix incorrect accessibility announcement on two panel home
- Divide total pages by panelCount if two panel is active
- Increment target column when moving an item to right panel

Test: manual
Bug: 200009004
Change-Id: Ia8d2d760dc5e8b413e5b1150c049f7fa3ec26513
2022-02-23 22:35:12 +00:00
Schneider Victor-tulias
bce63e06ed Merge "Fix taskbar icon dragging issues" 2022-01-25 19:03:06 +00:00
Josh Tsuji
231c9229bf Adds Launcher in-window animations, and reworks how the unlock flow works.
Bug: 197636887
Test: atest SystemUITests
Change-Id: Idab7249e4a761040863578d546f0831794efaf4a
2022-01-21 10:41:00 -05:00
Schneider Victor-tulias
312b68fde4 Fix taskbar icon dragging issues
- Fixed icons disappearing when initiating dragging
- Fixed incorrect icon location when initiating dragging after rotating the screen to an orientation other than what launcher started in

Fixes: 215418478
Fixes: 214025075
Test: dragged icons from the workspace and taskbar
Change-Id: I848138af28802f7d806708c77c25b8de307c70d8
2022-01-20 14:56:01 -08:00
Alex Chau
9fee3fd379 Allow column size of search container to be configured
- Added numSearchContainerColumns in grid-option to control search container's width, defaults to numColumns if not specified

Bug: 210127246
Test: manual
Change-Id: I0c2594f0eeab8844dcff9468e603282a09fae0bd
2021-12-10 17:55:51 +00:00
Jon Miranda
52ee4ec4aa Merge "Play return to icon animation if user swipes back to All Apps." into sc-v2-dev 2021-12-06 18:17:52 +00:00
Jon Miranda
c4a99bff04 Play return to icon animation if user swipes back to All Apps.
Bug: 205187702
Test: open app in all apps, swipe back to go back to all apps
Change-Id: I9e79c8365fdf667321343aaac2f8d77cb60a316a
2021-11-23 11:27:42 -08:00
Tony Wickham
49da26f636 Merge changes I36871463,I691a5cbb,I62105c1c into sc-v2-dev
* changes:
  Update reorder and folder creation radii
  Fix misaligned folder creation drag over target
  Update CellLayout.DEBUG_VISUALIZE_OCCUPIED to include drag over targets
2021-11-17 22:08:28 +00:00
Andras Kloczl
953eb8041e Fix LauncherProvider newScreenId issue
Remove maxScreenId from LauncherProvider and whenever we need
a new screenId, query the database to calculate a new screenId.
Also converted and refactored AddWorkspaceItemsTaskTest
and added some extra test cases.

Test: manual & AddWorkspaceItemsTaskTest.kt
Bug: 199160559
Change-Id: I185f6823fed171d778af0130497f5ffaf89c0a70
2021-11-12 19:56:07 +00:00
Tony Wickham
1278490ac0 Update reorder and folder creation radii
- Before, dragging anywhere in the cell (including space between cells) would trigger a reorder. Now, we compute the radius to the closest cell edge
- For creating folders on icons, we split the difference between the reorder circle (above) and the icon size

Test: enable DEBUG_VISUALIZE_OCCUPIED and manually drag to ensure works as described above
Bug: 204406063
Change-Id: I368714634ed42a930fd16849f2bde1589df1aa63
2021-11-08 12:04:30 -08:00
Tony Wickham
3cfa5edc93 Fix misaligned folder creation drag over target
Previously, the folder creation distance was based on the center of the cell, rather than the *visual* center, i.e. around the icon. Updated to use existing getWorkspaceVisualDragBounds() to handle this.

Test: with DEBUG_VISUALIZE_OCCUPIED=true, ensure green circles are centered around the app icons; manually drag and drop to check the drawn regions are correct
Bug: 204406063
Change-Id: I691a5cbbfc18c88436b88b7bda42f7920b9a5750
2021-11-04 13:40:05 -07:00
Tony Wickham
0ac045fe23 Update CellLayout.DEBUG_VISUALIZE_OCCUPIED to include drag over targets
Instead of just drawing the occupied cells in red, now we draw the occupied cells based on drag over regions:
- Dragging over the red regions will reorder the cell
- Dragging over the green regions will create/add to a folder

Test: visual with internal flag on
Bug: 204406063
Change-Id: I62105c1c1a1101b6cd6f9fd222980d03ba6d8b84
2021-11-04 13:27:56 -07:00
Steven Ng
91b46d1ba3 Update all home screen widgets size upon workspace inset change
Test: Add a clock widget to the home screen. Then, change the navigation
      gesture. Go to home screen to confirm the clock widget is rendered
      as expected in the portrait. Then, rotate the device to landscape.
      Confirmed the clock widget is rendered correctly in the landscape.
Fix: 202837404
Change-Id: I93b70c53f10c8150131b183defc8baf01e5924a8
2021-11-04 12:00:03 +00:00
Alex Chau
920be89b26 Clean up IllegalStateException for page pairing
Fix: 198820019
Test: manual
Change-Id: Ic691f781b20d664c57a26370aae479ab68508303
2021-10-25 15:20:16 +01:00
Schneider Victor-tulias
16e04e29d2 Generalize the icon popup menu types.
Generalized popup menu types and logic to allow wider uses outside of launcher.

Bug: 198438631
Test: long pressed launcher icons and pressed menu options
Change-Id: Iadcbb1796496c0061dcee362784e426ff55dc94a
2021-10-19 16:06:16 -07:00
Thales Lima
9a6b20f0cb Merge "launcher: create more space options" into sc-v2-dev 2021-10-05 15:38:57 +00: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