Commit Graph

126 Commits

Author SHA1 Message Date
Tracy Zhou
72f1afcf02 Delete TaskbarStateHander
Bug: 204220602
Test: N/A
Change-Id: I6c26b4d3b8acb35750be56986555350e84f31ecb
2021-10-26 13:26:27 -07:00
Tony Wickham
8791e7de11 Add FallbackTaskbarUIController
- Refactor TaskbarManager to accept StatefulActivity instead of BaseQuickstepLauncher
- Update the new StatefulActivity in onOverviewTargetChange()
- Cleanup LauncherTaskbarUIController a bit to avoid initializing TaskbarActivityContext, TaskbarDragLayer, and TaskbarViewController in the constructor, and instead get these from mControllers after init()

Test: No change in behavior
Bug: 188790554
Change-Id: Ic4d69d73deb6dada416876eb265db57803c3adfd
2021-10-21 10:53:46 -07:00
Sunny Goyal
2a528a43c1 Delaying taskbar loading until user setup completed
> Also keeping it stashed while all-set activity is visible
> Creating a shared state (simiar to saved instance state) for taskbar
> Keeping taskbar stashed while all-set activity is visible

Bug: 194786060
Bug: 201782272
Test: Manual
Change-Id: Iab5e082243a206772266aece62d3028f5acb6400
2021-10-19 12:38:02 -07:00
Alex Chau
90d24f4b9b Switch to rest state when display changes
Fix: 199463580
Test: Unfold device from overview (both from app and from home), overview should close
Change-Id: I7786f3ec46857075e123fa2a093c7b55ca616fc1
2021-09-30 17:26:05 +01:00
Vinit Nayak
a26e4f8e43 Unbind service only if it was bound
Removed unused SplitPlaceholderView

Fixes: 200004580
Change-Id: I54ee819260ad6e4e6da2d3efafd38bad0336486e
2021-09-27 14:56:45 -07:00
Jerry Chang
d3ceb3dc88 Reset floating split task view after remote animation finished
Move reseting floating task view for entering split after remote
animation finished to prevent the floating task view disappear before
opening split task view being visible and causing flicker.

Bug: 199377815
Test: Manual check the flicker disappear
Change-Id: I4a864335972842570c61291a7a0c423edeb74578
2021-09-23 16:01:18 -07:00
Alex Chau
8f990b94a2 Merge "Keep insets stable when taskbar is destroyed/recreated" into sc-v2-dev 2021-09-22 13:34:12 +00:00
Tony Wickham
7eb5b53865 Keep insets stable when taskbar is destroyed/recreated
- Calculate nav bar insets ourselves. Currently when taskbar is going to be present, we use taskbarSize as the nav bar insets. This is consistent with other existing calculations, but going forward we should instead always use the nav bar size instead of taskbar size, given we don't want taskbar to inset launcher (since taskbar is hidden).
- Also update tappable insets to be 0 in gesture mode. Test: Swipe to all apps, ensure there's no background protection at the bottom.

Test: Rotate device, no visual jumps
Test: Stash taskbar, quick switch a couple times without settling, and swipe up to overview; no jank due to reapplyState()

Bug: 198798034
Fixes: 197232424
Fixes: 197212581
Change-Id: I4c2bb5816dbb214846bd9f2a46c6f759c0545911
2021-09-21 13:52:36 -07:00
Evan Rosky
cab41ed670 Register remote transitions on activity start
Was only registering once, but launcher can stop/start
its activity (eg when changing gesture modes), so we
need to try and re-register every time

Bug: 200213691
Test: atest CloseAppHomeButtonTest
      change gesture mode and observe functional animations
Change-Id: I29f1eb647c2168d753e37f57657906979c5518be
2021-09-20 13:41:01 -07:00
TreeHugger Robot
25a1e0b913 Merge "Rebind TISBinder if service killed during connection" into sc-v2-dev 2021-09-15 00:31:23 +00:00
Vinit Nayak
c64c3cf488 Rebind TISBinder if service killed during connection
Fixes: 198845519
Change-Id: I6af79af5591e2dca941ca4428c550169a178479c
2021-09-14 11:26:00 -07:00
Lucas Dupin
01c362bb6c Dump DepthController internals
Add DepthController to dumpsys, so it's easier to debug any future
issues.

Bug: 198732728
Test: adb shell dumpsys activity com.google.android.apps.nexuslauncher
Change-Id: Ifa7fe1d7fcb375cacc907d0da9524a2ee2a2677d
2021-09-10 22:57:24 +00:00
Nick Chameyev
6b53e3101e Merge "Add taskbar icons unfold animation" into sc-v2-dev 2021-09-03 11:19:22 +00:00
Nick Chameyev
4dd4159fdc Add taskbar icons unfold animation
Adds 'move from center' animation for taskbar icons when
unfolding foldable devices.

Moves unfold transition progress provider from quickstep
launcher activity to TouchInteractionService to widen
the scope when this provider is available to cover
both launcher activity and taskbar.

Launcher activity and taskbar get their own instances
of unfold transition progress provider using
ScopedUnfoldTransitionProgressProvider wrapper.
This wrapper allows to get transition progress provider
that emits events only when clients are ready to handle them.

Bug: 193794563
Test: manual
Change-Id: I27581bd4e145a74f526bf60f2a545e56ded322f9
2021-09-03 10:25:52 +01:00
Vinit Nayak
57e261ceef Quickswitch with staged split
* UI polish/animations needed.
* One known bug (b/198310766), temp work around is to
swipe up to home.

Bug: 181704764
Test:
* Open apps in staged split and quickswitch
between GroupedTaskView and fullscreen apps.
* QS to fullscreen app and then go into overview
and re-launch split screen tasks
* QS to fullscreen app, wait 5 seconds,
swipe into overview, no GroupedTaskView shown

Change-Id: I0ce10a944d86be5c927eeaaef922559a40f39923
2021-09-02 11:44:36 -07:00
Tracy Zhou
86bd1dce8d Clear command queue of OverviewCommandHelper on home tap
Fixes: 194934483
Test: manual
Change-Id: Id83b341245793c38c305e6ada5581ac4e49527a7
2021-07-29 17:23:01 +00:00
Lucas Dupin
87d752062e Add depth to -1 screen
Wallpaper will zoom out as you drag the overlay

Test: manually pull overlay
Fixes: 192502999
Change-Id: I9067b70d10497d4e16a5ef601161fbedfa9307e1
2021-07-28 12:36:31 -07:00
Vinit Nayak
7903758d08 Animate SplitPlaceholderView when entering split from overview
Bugs tracked in b/181704764

Bug: 181704764
Test: Tested on phone and large screen in multiple orientations

Change-Id: I07509006ae3d1f4425dc5119d0c8ed52b41a3bc2
2021-07-22 20:12:26 +00:00
Vinit Nayak
297d2cdd44 Re-try binding to TouchInteractionService if service is killed
For problem explanation, see b/190339338#comment26.
When the binding dies, this attempts to retry
binding to the service with a backoff duration of
(1000 * 2^N)ms where N is # of attempts.

Bug: 190339338
Test: Taskbar seems interactable more consistently.
Manually failed the binding a couple times to see
retry mechanism and verified by logging locally.

Change-Id: Ia76207d0b2ef30b425ee1d7c66d7dee453bca7d8
2021-07-08 13:05:38 -07:00
Tracy Zhou
d09ebe660f Enable live tile in 3 button mode
- Previously we rely on whether launcher is resumed as a signal to see what "toggle" means. This no longer works since launcher is not resumed in Overview. Instead, we need to check the live tile signals.
- Use screenshot doesn't propagate after setting a new current task. So followed the logic around mRunningTaskIconScaledDown to work it out.
- Get rid of NavigationModeFeatureFlag, pending on 3rd party launcher change ag/14409355

Fixes: 185934639
Test: (1) Toggle overview from home screen and toggle back to fullscreen. (2) Toggle overview from app and keep toggling.

Change-Id: Iffaea18afb2179b5bb7dadda49e56efefa5658bc
2021-07-01 18:40:56 -07:00
Pat Manning
99191fdf3f Hide overview on fold/unfold when live tile is active.
Test: manual
Fix: 184846394
Change-Id: I97ae328234bf0932712c7cf3ca97813cae7c46a7
2021-06-24 16:18:03 +00:00
Sunny Goyal
9ffb0f803b Merge "Fixing TaskView.launchTask.onEndCallback is not called" into sc-dev am: eb3367796a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15032513

Change-Id: I0b76512550814f23fde9c95a59e90e50280e3dde
2021-06-22 18:20:46 +00:00
Sunny Goyal
696c612964 Fixing TaskView.launchTask.onEndCallback is not called
Sometimes onAnimaitonCancelled can be called without onCreate. Calling
onEnd in this case so that the sate is cleared

Removing additional subclassing for the runner

Bug: 190856140
Test: Manual
Change-Id: If105cb343cab446a4eac90a45184ce50c6e4c485
2021-06-21 16:06:40 -07:00
Sunny Goyal
6e1ce8ccb8 Fixing out of order taskbar callbacks
OnCreate can come before onDestroy for a previous activity which can
cause the callbacks for taskbar to get cleared

Bug: 190170303
Test: Presubmit
Change-Id: I48334605384d4604043a50ffc3d137f84575148a
2021-06-18 12:44:38 -07:00
Jonathan Miranda
47f8a1c3ef Merge "App Shortcut menu bug fixes and polish." into sc-dev am: c846245f1b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14985072

Change-Id: Icba377c0032eee2dacec8a3c4364fa5b958880b7
2021-06-16 18:19:16 +00:00
Jon Miranda
229c4c3235 App Shortcut menu bug fixes and polish.
- Widget is its own item.
- Change order of icon order.
- Update grab handle colors

Bug: 188095695
Test: long press on apps with/without widgets, long press apps on workspace/
      all apps/search

Change-Id: Iabb9b4b3f3a928103b9d62601f22e74ef2325d7c
2021-06-15 18:59:51 -07:00
Wei Sheng Shih
f077df5aef Merge "Pre-set splash screen as icon-style when launch activity from Launcher." into sc-dev am: c3db44bbce
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14773251

Change-Id: Icc117227086edadc83c34fa12242674c4f6b961c
2021-06-08 12:29:50 +00:00
wilsonshih
0fe2342445 Pre-set splash screen as icon-style when launch activity from Launcher.
Specify icon style splash screen when launch activity from Launcher.

Bug: 188023621
Bug: 189293785
Test: Start application from Launcher/Recents.
Change-Id: I13b7cd67576cf8822e86ff90971d6bb1a24d1a91
2021-06-07 11:58:45 +08:00
Sunny Goyal
57b2279dcb Taskbar layout update
> Calculating the hotseat padding statically
> Animating taskbar views individually when animating to home
  instead of a layout animation
> Moving all navbar buttons to a separate layout/controller and independent
  of Launcher
> Fixing RTL layout for taskbar and nav bar

Bug: 187353581
Test: Manual
Change-Id: If21696f38beee328f553e467394776a8e8ed4c3e
2021-06-03 16:10:02 -07:00
Josh Tsuji
b7735b450e Merge "Adds launcher-side support for the SmartSpace shared element transition." into sc-dev am: bdb4ed711c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14471950

Change-Id: I4812a5728ec39d06aab9350780f86600133555fb
2021-05-27 00:49:58 +00:00
Josh Tsuji
bdb4ed711c Merge "Adds launcher-side support for the SmartSpace shared element transition." into sc-dev 2021-05-27 00:29:01 +00:00
TreeHugger Robot
89c8b063eb Merge "Overview - Remove the space withheld for proactive chips" into sc-dev am: d98a784d0e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14706422

Change-Id: Idaaa1ab0c829f0e65ca6131cceda25f502914b10
2021-05-26 00:16:14 +00:00
zakcohen
dad8a80d19 Overview - Remove the space withheld for proactive chips
Remove the space in the ui that was being used for chips.
Centralize some of the logic around calculating the action margins to aid
that.

Bug: 179922117
Test: Local build and flash and run
Change-Id: Icd2f894c858fab475c5411f3f7c412b899d5b220
2021-05-25 15:29:08 -07:00
Andras Kloczl
55edfe55f7 Add two panel home support for page binding logic
There's a logic which prioritizes the binding for the
current page and defers the other pages' binding.
If two panel home is enabled, we want to bind both pages
together. LauncherPageRestoreHelper has been created to
contain the logic for persisting restoring and calculating
which pages to load immediately.

Test: manual + run LauncherPageRestoreHelperTest robo test
Bug: 174464691
Change-Id: I57ac3f7150303b95b272e922f44bda26f9d5ce2a
2021-05-24 23:22:06 +02:00
Sunny Goyal
f8b1c3b38e Revert "Revert "Renaming TaskbarController to LauncherTaskbarUIC..."
Revert submission 14664190

Reason for revert: Errorprone fixed in ag/14667108
Reverted Changes:
Icd1ddd43e:Revert "Renaming TaskbarController to LauncherTask...
I465013697:Revert "Moving taskbar lifecycle to TouchInteracti...

Change-Id: I1dcccb43d8206830e2b7c1974e775c94ac8c542f
Bug: 187353581
2021-05-21 07:05:31 +00:00
Sunny Goyal
d5500548dc Revert^2 "Moving taskbar lifecycle to TouchInteractionService"
430465a3d5
Bug: 187353581
Change-Id: I7b2280d16adfafd3e85ffc1d22e32d0c00d12b67
2021-05-21 07:05:02 +00:00
Winson Chung
bd2fa26bda Tweak ordering of first match search
- Tweak iteration for finding first match, go by operator priority and
  check each cell layout by order to return the first view that matches
- Also reset the launch cookie in cases where we're launching a task
  that doesn't support cookies (ie. via prediction), otherwise we may
  still try to associate it with the last launched cookie later

Fixes: 187720286
Test: Swipe up from various icon types across hotseat/workspace
Change-Id: I71c4c13c442b0884b2247589685f976eaaeb30a4
Signed-off-by: Winson Chung <winsonc@google.com>
2021-05-20 14:50:33 -07:00
Kholoud Mohamed
430465a3d5 Revert "Moving taskbar lifecycle to TouchInteractionService"
This reverts commit e215fb730b.

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/tests/view?invocationId=I13700009003387451&testResultId=TR89423459137251402, bug https://buganizer.corp.google.com/issues/188755902

Bug: 188755902
Change-Id: I4650136975b60f311499ee6ff5b27ab9a32d23d6
2021-05-20 13:32:05 +01:00
Kholoud Mohamed
bb6f6e5dae Revert "Renaming TaskbarController to LauncherTaskbarUIController"
This reverts commit 40a7421619.

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/tests/view?invocationId=I13700009003387451&testResultId=TR89423459137251402, bug https://buganizer.corp.google.com/issues/188755902

Bug: 188755902
Change-Id: Icd1ddd43e62d392f6b68b0150a1075f73106391a
2021-05-20 13:31:34 +01:00
Sunny Goyal
40a7421619 Renaming TaskbarController to LauncherTaskbarUIController
Bug: 187353581
Test: N/A
Change-Id: I44aac42c4df134fd7e6fc0c3609fdb3007cf52e3
2021-05-18 11:43:28 -07:00
Sunny Goyal
e215fb730b Moving taskbar lifecycle to TouchInteractionService
> Inflating taskbar views with a non-launcher window context
> Removing separate taskbar view in Launcher
> Handling taskbar icon clicks directly instead of going via launcher
> Fixing some relayouts during show/hide animation

Bug: 187353581
Test: Manual
Change-Id: Ia7d44acbb770bf0345922234b3daa5cc040a5843
2021-05-17 21:47:08 -07:00
Josh Tsuji
9681849b16 Adds launcher-side support for the SmartSpace shared element transition.
This adds a new SmartSpaceTransitionController, which Launcher uses to register its SmartSpace with SysUI so that SysUI can manipulate it during an unlock animation.

Bug: 187025480
Test: manual with all the different lock types
Change-Id: I8ebf33e1a253e90f97875548113106cd828721e0
2021-05-17 16:07:41 -04:00
Tony Wickham
82d5a0681d Revert to overview coming from the side instead of bottom
Test: Visually checking all of these. As appropriate, repeat in 0, 2, 3
button modes, landscape/portrait/fake landscape, and 3P launcher
- Quick switch from home
- Home to overview
- Overview to home (swipe up)
- Overview to home (tap outside)
- Overview to home (back invocation)
- Quick switch from app
- Swipe up and hold from app
- Dismiss an app
- Empty recents
- Split select state to home
- Modal state to home
Fixes: 185411781

Change-Id: If00a22fee35c832a259bfc62808efbac5990ce2e
2021-05-14 16:06:44 -07:00
Tracy Zhou
f20a4bd9a9 Finish the recents animation when the phone goes to sleep
Fixes: 169988381
Test: manual
Change-Id: I62527ef46009a1417e67637c512b3a2fc005bcd6
2021-05-10 10:20:43 -07:00
Vinit Nayak
b2993d65b7 Merge changes from topics "taskbar3Button", "taskbarIME" into sc-dev
* changes:
  Add IME switcher/hide button bar when IME showing
  Initial commit of 3 button work
2021-05-06 20:47:41 +00:00
Tony Wickham
e8b22d5e60 When overview appears from motion pause, come up from bottom
- Add vertical offset calculations to RecentsView (in addition to
  the existing horizontal offset which has been renamed accordingly).
- LauncherState#getOverviewScaleAndOffset() now supports both
  horizontal and vertical offsets and is specified such that overview
  appears and disappears from the bottom of the screen rather than the
  side.
- Quick switch still uses horizontal offset to come from the side.
- No longer need to scroll to page 0 when translating offscreen.
- Update interpolators for overview to home transition.
- Align 2 button mode transition with 0 button mode.

Test: Visually checking all of these. As appropriate, repeat in 0, 2, 3
button modes, landscape/portrait/fake landscape, and 3P launcher
- Quick switch from home
- Home to overview
- Overview to home (swipe up)
- Overview to home (tap outside)
- Overview to home (back invocation)
- Quick switch from app
- Swipe up and hold from app
- Dismiss an app
- Empty recents
- Split select state to home
- Modal state to home

Bug: 185411781
Change-Id: Ic59b877ccc0050afd7cd478778e9eeb60e2e47f7
2021-05-05 21:08:49 -07:00
Vinit Nayak
673faf59ee Add IME switcher/hide button bar when IME showing
Bug: 180046394
Change-Id: Ic2bd919ab3d27e0a430b081c771ea8dc5827be81
2021-05-05 12:50:39 -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
Cyrus Boadway
92af1bfe5b Merge "Create return-to-home app widget animation" into sc-dev 2021-05-03 17:51:45 +00:00
Cyrus Boadway
3bdfc3cd2d Create return-to-home app widget animation
If an app has been most recently launched from an app widget, when
swiped away, the app animates to the widget's position.

This is done by attributing the app launch to the widget through
the ActivityOptions's launch cookies, and using a FloatingWidgetView
throughout the animation.

Bug: 169042867
Test: manual
Change-Id: I24c2623b5b3407504a4768b076849c47f73cbae0
2021-04-30 09:37:53 +00:00