Commit Graph

5192 Commits

Author SHA1 Message Date
Tracy Zhou e2dc985f59 Reset primary and secondary translation of mLiveTileSimulator after settling into Overview
Fixes: 181929353
Test: manual
Change-Id: I1ca36f77f0efc32803f5128eedd21b89e2b1d2b5
2021-03-04 22:43:50 -08:00
Tracy Zhou 162ed05ac9 Add NavigationModeFeatureFlag
3 Button mode doesn't use recents animation so live tile would not work on 3 button mode before migration to recents animation happens.

Bug: 169694902
Test: manual
Change-Id: I9574c624f3d220834fa18e910637cd64460adb0c
2021-03-03 10:52:12 -08:00
Tony Wickham 4092352a99 Merge "Add debug log for initInputMonitor()" into sc-dev 2021-03-03 16:42:33 +00:00
Alex Chau aa47630ecd Merge "Show TaskView as grid in large screens" into sc-dev 2021-03-03 10:08:01 +00:00
Tony Wickham b96cf5cdf2 Fix some issues with TwoButtonNavbarTouchController
- Use same swipe height as the tests use to get to Overview
- Use mStartState instead of fromState when determining
  target state, to disallow swiping through states, i.e.
  from NORMAL to OVERVIEW back to NORMAL in one long swipe
  up gesture. Instead, now swipe up from NORMAL goes to
  OVERVIEW and swipe up from OVERVIEW goes to NORMAL.

Fixes: 177316094
Change-Id: Ic8e9c8650d4cf11eec344802e3569413bfd5d7bc
(cherry picked from commit a24b9ff69d)
2021-03-02 18:14:03 +00:00
Alex Chau b794ea64c7 Show TaskView as grid in large screens
- Introduced gridProgress to RecentsView/TaskView ofr animating into grid
- Introduced gridProgress dependant translation and scale properties in TaskView
- Animate running task into grid with TaskViewSimulator
- Remove overview actions (for now) but keep clear all button in large screens
- Adjust ClearAllButton translation to acoomodate for grid
- Use screen width +-50% to calculate task visibility
- Use the position where TaskView is on screenEnd as pageScroll
- TODO: Handle separate recents activity

Doc: go/foldables-launcher-overview
Video: http://dr/file/d/107Aydii1LoFCwP63nWG3Twr2PBDE5ZgD/view?resourcekey=0-aUjdnx8ezimS9tmAgao9ag
Test: Test Launchering overview and launching overview from apps with folloiwng combination:
- large / small screen sizes
- portrait / landscape
- thumbnails from different screen sizes / orientations
Bug: 174464863
Fixes: 181509346

Change-Id: I4b691cde774f2e37532b68ba83c6eed399f2332e
2021-03-02 17:10:45 +00:00
Yogisha Dixit a6554759aa Merge "Move widget files into widget folder + add tests." into sc-dev 2021-03-02 09:30:02 +00:00
Tracy Zhou f543e6cf9c Merge "Check if the recents animation is still running and whether the app being restarted is the live tile app in mLiveTileRestartListener" into sc-dev 2021-03-02 06:44:40 +00:00
Tony Wickham ed8f264fcb Add debug log for initInputMonitor()
Sometimes tests aren't getting input events, and this could help
verify that the input monitor is being initialized.

Also remove obsolete check that could mean we don't initialize
when we should.

Bug: 180915942
Change-Id: I811cb432b456bc67d9e7ded945db36eb227f5071
2021-03-01 15:29:52 -08:00
Yogisha Dixit 741fae9ea2 Move widget files into widget folder + add tests.
I will use the newly created LauncherAppWidgetProviderInfoTest in a follow-up CL to add tests for the newly added widget sizing APIs.

Test: Automatic: Ran all robolectric tests in launcher3,
      Manual: Added a widget, edited the widget, removed the widget
Bug: 179807199
Change-Id: I540b2dbe284c6eb5aa2466a1d13a9581ee59425b
2021-03-01 13:59:52 +00:00
Alex Chau 8c575c378e Remove smallestScreenSize from configChanges
- Remove smallestScreenSize so Launcher activity restarts when screen size changes to pick up new smallestSize dependent values e.g. R.bool.allow_rotation

Bug: 180803696
Test: Ensure rotation preference is respected when switching between large and small screen

Change-Id: I58f856a97effa8e35236d013300181c5d332b25a
2021-03-01 12:20:26 +00:00
Tracy Zhou fd1d752347 Check if the recents animation is still running and whether the app being restarted is the live tile app in mLiveTileRestartListener
mLiveTileRestartListener is originally used to render the animation to launch the app that's the live tile app (for example, settings is the live tile app and we can launch settings from notification shade).

However, we don't want this callback to be triggered when the recents animation is finished / live tile is ended because the default animation in that case won't be skipped.

The other scenario that we don't want the animation to be rendered here is when the restarted app is not the live tile app. This can be repro'ed in this scenario - launch any app and go to live tile; launch settings; swipe up from settings; launch the previous live tile app. In this case, we rely on the mLaunchOtherTaskHandler take care of the rendering of this animation.

Fixes: 181372992
Test: manual
Change-Id: I41b63ce5163f1ac136bf8b5909907a3f84d937d8
2021-02-26 18:32:13 -08:00
Hongwei Wang 4f3e8ef3f2 Merge "Skip window transform if SwipePipToHomeAnimator's running" into sc-dev 2021-02-27 00:05:05 +00:00
Hongwei Wang 9140af12d2 Skip window transform if SwipePipToHomeAnimator's running
Launcher tries to set the window transform on the recents animation
leash when it's settled on end target, which might conflict with
SwipePipToHomeAnimator and causes flash/flick at the end of the
transition. Simply skip the window transform since
SwipePipToHomeAnimator is the one solely responsible for updating the
leash in this case.

Bug: 179720719
Test: repeatedly enter PiP from ApiDemos with autoEnterPip enabled
Change-Id: Ia98675c21e3bd898cd11cf6ed97f6eaadcb11a42
2021-02-26 14:11:45 -08:00
TreeHugger Robot a9cb2fb476 Merge "Adds a removeChangeListener to FeatureFlags$BooleanFlag." into sc-dev 2021-02-26 20:21:51 +00:00
Vadim Tryshev e1ea6cf754 Merge "Waiting for the state of views to settle after orientation change" into sc-dev 2021-02-26 19:37:06 +00:00
Andy Wickham 75845ed9a8 Adds a removeChangeListener to FeatureFlags$BooleanFlag.
This will help us avoid leaks, etc.

Also changes ENABLE_SMARTSPACE_ENHANCED back to a DeviceFlag

Bug: 181194850
Bug: 181077020
Test: atest NexusLauncherOutOfProcTests:com.android.launcher3.memory.MemoryTests -- --abi armeabi-v7a
Change-Id: I6f54af3e6b6302a073b8b7d448ff72b05a803d8f
2021-02-26 07:41:45 +00:00
vadimt 5f21f104f0 Waiting for the state of views to settle after orientation change
Presumably, we currently have flakes when immediately
after orientation change, we check for the presence of certain
views, and they are still not present.

Test: presubmit
Bug: 181057446
Change-Id: I6dbcb757a47c19728d4096283da6710f6dd5aa02
2021-02-25 18:50:49 -08:00
Evan Rosky be5fdb08a5 Merge "Update input-monitors to accept unrotated coordinates" into sc-dev 2021-02-25 17:53:57 +00:00
Sreyas Rangaraju 036b585475 Merge "Fix DWB cutting off above inset when translating down." into sc-dev 2021-02-25 01:47:25 +00:00
Samuel Fufa 226c4af911 Merge "Restore divider between app predictions and apps" into sc-dev 2021-02-24 20:50:10 +00:00
Tony Wickham 2fb22af840 Merge "Ensure taskbar visibility callbacks are called in init()" into sc-dev 2021-02-24 17:16:45 +00:00
Tony Wickham 7801bf68d1 Merge "Make RecentsView INVISIBLE instead of GONE" into sc-dev 2021-02-24 17:15:58 +00:00
Samuel Fufa b984cf7fa6 Restore divider between app predictions and apps
Screenshot: https://screenshot.googleplex.com/89jJLU3JXV8tRXM
Bug: 180017741
Test: Manual
Change-Id: Iab1764fe94340f120770054cf5a59bd3ed9e45a4
2021-02-24 10:31:57 -06:00
Sreyas 25992f12e5 Fix DWB cutting off above inset when translating down.
Bug: 180979788
Test: Manual
Change-Id: I08577db4149b339fa217cab6401250a3fca10e65
2021-02-23 19:10:47 -08:00
Tony Wickham 752ebfcef2 Ensure taskbar visibility callbacks are called in init()
We're initializing the correct values, but the callback only runs if
the value is different than the default value of 0. Thus we weren't
updating the visibility according to the value 0 in init().

Test: Initialize taskbar while launcher is resumed
Fixes: 180103543
Change-Id: I3f754cac59e2bd5ad542de050e8b4c3146d5eebf
2021-02-23 17:08:40 -08:00
Tony Wickham 29016e8e46 Make RecentsView INVISIBLE instead of GONE
This ensures it gets laid out to compute things like page scrolls.

Test: Repro steps to both bugs below
- Force stop launcher, swipe up slightly, hold, and let go to return
  to the current task; ensure no jumps or jank
- Force stop launcher, swipe up and hold to go to Overview, ensure
  no jump on motion pause

Fixes: 180736503
Fixes: 175064755
Change-Id: I44581f87600b02a3c9ddefcb8c94bb3845cd9152
2021-02-23 17:02:36 -08:00
Sreyas Rangaraju 1408c6459c Merge "ShareTargets animations and styling." into sc-dev 2021-02-23 21:15:53 +00:00
Vadim Tryshev 06df8d7262 Merge "Instrumenting swiping up to all apps for jank" into sc-dev 2021-02-23 18:32:23 +00:00
thiruram d0ab1a0eed [AA+] Add WW logging for Slice actions.
Bug: 178562918
Test: Manual
Change-Id: I515ee3c0990dea2c30e68d5919568dc1773912ee
2021-02-22 20:07:29 -08:00
thiruram 97710ffbb2 [AA+] Log additional UI events with Launcher snapshot logging.
Bug: 180418845
Test: Manual
Change-Id: I74ab1faafe6c21a8fbf6992a8aebe918cc31d85e
2021-02-23 02:59:43 +00:00
Tony Wickham f3b8797f77 Merge "Increase taskbar size to match latest specs" into sc-dev 2021-02-22 23:51:04 +00:00
thiruram f8f2a6ed0a [AA+] Log tap on SearchActionItem.
Bug: 178562918
Test: Presubmit
Change-Id: I42a44de4f3cc02ca331c4f99c107891c4658995d
2021-02-22 22:39:41 +00:00
Tony Wickham 40fbc96a0a Increase taskbar size to match latest specs
Test: Ran it locally, verified it looked as expected
Bug: 171917176
Change-Id: I8a467db57b579f1ad29d2108927eef3bd10b273a
2021-02-22 11:59:43 -08:00
Hyunyoung Song dfdeddc66a Merge "Add group highlighting to AA+ result" into sc-dev 2021-02-19 20:48:37 +00:00
TreeHugger Robot aa14b19725 Merge changes Id68b6c37,I16d39d3e into sc-dev
* changes:
  Fix a couple of crashes when taskbar isn't yet attached
  Subtract taskbar size from DeviceProfile#availableHeight
2021-02-19 19:01:38 +00:00
Tony Wickham 786dd93f2b Fix a couple of crashes when taskbar isn't yet attached
- Handle back to back addTaskbarIfNecessary(). Specifically, handle
  cleanup() before the previous add was attached. This is already
  handled on WM side, just had to remove isAttachedToWindow() check.
- Add isAttachedToWindow() check to isViewInTaskbar()

Test: call addTaskbarIfNecessary() three times back to back, ensure no crash.

Fixes: 180509238
Bug: 171917176
Change-Id: Id68b6c376029eb5c651f47afa56666391c516aef
2021-02-18 15:40:33 -08:00
Alex Chau 0bd7c9bf46 Merge "Use PersistedTaskSnapshotData to calculate TaskView size" into sc-dev 2021-02-18 21:15:10 +00:00
Tony Wickham 15883891ea Subtract taskbar size from DeviceProfile#availableHeight
Normally availableHeight excludes system insets, but taskbar is added
after availableHeight is calculated. This discrepency causes some bad
calculations such as TaskView size.

Test: touch nav bar when in an app with taskbar present, ensure the
task doesn't jump due to incorrect calculation

Fixes: 179478728
Bug: 171917176
Change-Id: I16d39d3e1d9708e2a64c81b1ac24466f9567d1b9
2021-02-18 11:39:10 -08:00
Hyunyoung Song db9a53d9aa Add group highlighting to AA+ result
Bug: 180071886
Test: manual
Change-Id: Id1cc3d7400e1a7fe41af272d689aa9315030b420
2021-02-18 02:19:27 -08:00
Sunny Goyal 3c5e748b36 Merge "Removing menu and dialog for custom actions hanlding. These do not work well with gesture-nav and can potentially block the Launcher UI." into sc-dev 2021-02-17 21:40:26 +00:00
Vinit Nayak 4d6b0270ab Merge "Update System settings content observer to cache values." into sc-dev 2021-02-17 17:05:59 +00:00
Alex Chau 3a06568d8b Use PersistedTaskSnapshotData to calculate TaskView size
- Disabled variable width for running task, as PersistedTaskSnapshotData is not always up to date for current task after rotating the device

Bug: 174464656
Test: Test tablet overview with different comination of portrait/landscape wide/narrow thumbnails in portrait/landscape
Change-Id: Ifa01e72020ccaf422e3975b092462de85fa19efd
2021-02-17 11:41:24 +00:00
Vinit Nayak a34af18b0e Update System settings content observer to cache values.
Existing ContentObserver will cache values and overwrite
them when the value itself is modified or caller force
updates.

Bug: 149571513
Test: Wrote unit tests, mostly for caching logic.
Not meant to test ContentObserver contract for registering an
observer.

Change-Id: I12835f6c2be27ce17f65a55c51c4ef85c63b4487
2021-02-16 20:58:53 -08:00
Vadim Tryshev b6d28e885d Merge "Switching overlays more correctly" into sc-dev 2021-02-17 03:20:55 +00:00
vadimt a9740ecc8f Switching overlays more correctly
Test: presubmit
Bug: 180114721
Change-Id: I0d8d0c70ef34ec941e28704d06f9df5f17782155
2021-02-16 23:22:36 +00:00
Tony Wickham bb4de85c25 Draw folder leave-behind when opening folder in taskbar
Previously there was only support for CellLayout to draw the
leave-behind. Added FolderIconParent interface so any parent can
draw the leave-behind, and implement that by TaskbarView.

Test: Open folder in Taskber, ensure leave-behind draws

Bug: 171917176
Change-Id: I08d1d939a34f971f893994fe05cac972d165ef53
2021-02-16 15:10:05 -08:00
Tony Wickham 7ba547cd2d Folder support in Taskbar
- Add TaskbarActivityContext which allows shared Launcher elements to
  "just work" using existing generic ActivityContext.
- TaskbarContainerView extends BaseDragLayer<TaskbarActivityContext>.
- Inflate FolderIcon and Folder using TaskbarActivityContext to be
  shown in TaskbarContainerView.
- Use TaskbarActivityContext's DeviceProfile to determine icon size
  instead of overriding in styles. This also ensures that normal
  BubbleTextView icons have the same size as FolderIcons.

Test: Place a folder in home screen hotseat, ensure it shows up in
taskbar and can be opened, and that apps inside it can be launched
or dragged.
Bug: 171917176

Change-Id: Ic25d2f84bcd7e3399c88989305ea565497c030d9
2021-02-16 15:07:01 -08:00
Sreyas 960ddb07fc ShareTargets animations and styling.
Test: Manual
Bug: 169772466
Change-Id: I5a5118e23f90c4c585ad78f054e2c3e6b5d32001
2021-02-16 13:23:02 -08:00
Sunny Goyal 384b578ab2 Removing menu and dialog for custom actions hanlding.
These do not work well with gesture-nav and can potentially
block the Launcher UI.

Instead exposing on custom actions with keyboard accelerator and
using thee internal arrowPopup for resize options
Fixing SecondoryDropTarget not sending appropriate stats log

Bug: 179854703
Test: Verified on device
Change-Id: I268690f8a937896e4350496128a38959003f8939
2021-02-16 10:45:06 -08:00