Commit Graph

73 Commits

Author SHA1 Message Date
Vinit Nayak
2081742cb7 First pass at Taskbar layout UI polish for SUW
Bug: 231906478
Change-Id: I5d55d1e33f928d4b8034c356565a0f9d8bc5c3fb
2022-10-12 00:04:27 +00:00
Schneider Victor-tulias
418b1f8e82 Merge "Allow Taskbar stashing for external tests" into tm-qpr-dev 2022-09-22 17:25:24 +00:00
Schneider Victor-tulias
e64a8cfb20 Allow Taskbar stashing for external tests
Moved Taskbar stashing enabling logic to QuickstepTestInformationHandler to allow external tests to use the Taskbar API

Test: TaplTestsTaskbar
Bug: 240129939
Change-Id: I0ede8e4767cbe068328997a3afd51f9d5df2799a
2022-09-21 10:44:23 -07:00
Nicolo' Mazzucato
52909d0b5f Fix taskbar instrumentation crash
This was crashing when there were no views in the taskbar. Now, we're using getDragLayer, that will be always there.

Bug: 245690391
Test: TaskbarExpandCollapse
Change-Id: I4475adb0c6c425fca54af02bb071ed3e5f42d927
2022-09-20 14:01:40 +00:00
Winson Chung
3f649ef892 Update Launcher for removed shared wrappers
- Launcher can reference system code directly now

Bug: 219861883
Test: Builds/Presubmit
Change-Id: I3f656b6c7fce93243ccb7591e52441e99137dec6
Merged-In: I3f656b6c7fce93243ccb7591e52441e99137dec6
2022-09-14 17:14:32 +00:00
Tony Wickham
e74569e935 Fix taskbar stash state not persisting properly across recreate
Because we check supportsVisualStashing() in
TaskbarStashController#init(), we need to avoid using
TaskbarUIController to provide that value since TaskbarUIController
isn't initialized until a bit later than the other controllers. So I
moved the logic from supportsVisualStashing() back to
TaskbarStashController, but still allow TaskbarUIController to override
it (e.g. for DesktopTaskbarUIController).

After that fix, I noticed that force stopping launcher (to test the fix)
would briefly show the taskbar background before resetting the stashed
state. This is also due to LauncherTaskbarUIController not being ready
immediately, since that's what sets FLAG_IN_APP due to launcher being
paused. To work around this, I set FLAG_IN_APP to true by default in
TaskbarStashController#init(), since that is the most common case, and
taskbar background/stashed handle isn't shown on home anyway.

Test: Force stop launcher while taskbar is stashed, verify it recreates
as stashed without background flicker; same when changing wallpaper
color on home or in app; also tested when taskbar isn't stashed and in 3
button mode for good measure
Test: testHideTaskbarPersistsOnRecreate
Fixes: 235986838

Change-Id: Ie55bd70e8288d5ad7433dde970f18c176831d747
2022-08-30 13:42:04 -07:00
Vinit Nayak
8a3d05587e Show 3 button nav on phone in Taskbar (1/2)
* TODO: Landscape/seascape support,
        Separate nav spacing out into
        separate class/add tests

Bug: 219035565
Change-Id: I8f5c007f04ea4d6df15962772806356181d764ff
2022-08-09 13:25:50 -07:00
Vinit Nayak
7db37b3d94 Use Taskbar window for phones (only works on gesture nav) with flag
* Try to avoid re-creating TaskbarActivityContext to
avoid re-inflating taskbar views
* Toggle via Flipper App (key 1101)
OR adb shell setprop persist.wm.debug.hide_navbar_window 1 && adb reboot
TODOs
* Only works for gesture nav, not 3 button
* Sampling on phone doesn't always work.

Bug: 219035565
Change-Id: I2a015f99d5f1fe86d7261eec9fd898bd4480ff9f
2022-08-01 17:48:09 -07: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
Schneider Victor-tulias
3f6c473164 Fade out the taskbar icons when animating to overview in 3 button nav.
Bug: 231213105
Test: from home, opened recents, then went back home, then went back to recents, resumed an app, then went back to recents and resumed the same app (both in 3-button and gesture nav)

Change-Id: I83b1b33cafb95353f36a126b93fcaf3b536d3bf4
2022-07-19 11:35:37 -07:00
Nicolò Mazzucato
5529b23fbb Merge "Add jank monitoring for taskbar appearing and disappearing" into tm-qpr-dev 2022-06-28 15:15:35 +00:00
Nicolo' Mazzucato
8256537fdb Add jank monitoring for taskbar appearing and disappearing
Bug: 228969045
Test: record a perfetto trace and make sure the interaction is there
Change-Id: Id220f8eef5b08fb69410e08c230f867ffe21d126
2022-06-28 08:28:35 +00:00
Tracy Zhou
015adda83c Stash task bar when ime switcher is showing
Bug: 226489759
Test: connect to physical keyboard and select a typable field, and make sure the task bar is stashed
Change-Id: Ie1cf753f793dc9cb350e57e9448c2913260992ca
2022-06-25 16:26:13 -07:00
Schneider Victor-tulias
766f2fc346 Coordinate the SUW All Set page first reveal with the taskbar unstash to hotseat animation.
Bug: 220096988
Test: manual
Change-Id: I1f517b322e5c18f825be8b51ebb560a4a195b666
2022-05-13 11:17:10 -07:00
TreeHugger Robot
f1a4296cd0 Merge "Tune AllApps dismiss animation" into tm-dev 2022-05-03 11:23:46 +00:00
Schneider Victor-tulias
9b6babf839 Translate the 3 navigation buttons to/from their in-app position when animating to/from the -1 screen, all apps and widgets.
Bug: 221455508
Test: opened all apps, widgets, -1 screen, notifications shade and keyboard in various combinations and orders; locked screen, launched app, returned home with the back/home buttons, opened overview
Change-Id: Ia0b406aacf72b34bd6b7ff1c01278ab6895a7da4
Merged-In: Ia0b406aacf72b34bd6b7ff1c01278ab6895a7da4
(cherry picked from commit 9c1a452a1d)
2022-05-02 18:45:01 +00:00
Schneider Victor-tulias
c0b30dc266 Fix taskbar 3-button truncation on rotate
- Fixed truncation issue in overview and home on rotation
- Fixed 3 buttons translating incorrectly when switching to/from overview

Fixes: 205057824
Fixes: 215482458
Test: Manual
Change-Id: I0b89010a2b6ed03a34c3443fc6e1edc81f8d9f20
Merged-In: I0b89010a2b6ed03a34c3443fc6e1edc81f8d9f20
(cherry picked from commit 8aa99c72b1)
2022-05-02 18:12:00 +00: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
Tony Wickham
aed0c4d73e Defer onIsStashedChanged() until all controllers are initialized
Test: N/A
Fixes: 230133882
Change-Id: I27df993a08327d28669963e3cecfaa133daf11c9
2022-04-22 17:28:35 -07:00
Tony Wickham
a681cf6abe Migrate from InsetsInfo.contentInsets to WindowManager.LayoutParams#providedInternalInsets
- This allows us to distinguish taskbar's ITYPE_EXTRA_NAVIGATION_BAR insets from its ITYPE_BOTTOM_TAPPABLE_ELEMENT insets
- Set nav bar insets as before (contentInsets)
- Set tappable elements insets the same, except when taskbar is stashed, in which case set to 0

Test: TaplTestsTaskbar; manually stash/unstash taskbar, open IME, open Calculator (which uses tappableElement() insets) and Contacts (which uses systemBars())
Fixes: 215411414
Change-Id: If00f7a590b0780715d5b8159f5135054364ce84e
2022-04-21 16:15:41 +00:00
Brian Isganitis
4ad53f1268 Defer unstashing taskbar on all apps close if gesture in progress.
This behavior is more consistent with how we update taskbar stashing when IME is dismissed.

Test: Verified stashing behavior with gestures, 3-button, and bottom sheet dismiss.
Fix: 223837786
Change-Id: Ib85ebe629f33f0bddc36bbc8d99136711105b279
2022-04-11 19:54:53 -07:00
Schneider Victor-tulias
2ff0a66b8e Merge "Add logging to debug incorrect taskbar states caught by flaky tests." into tm-dev 2022-04-07 21:05:39 +00:00
Schneider Victor-tulias
1823bdba6e Add logging to debug incorrect taskbar states caught by flaky tests.
- Various TAPL tasts are flaking because the taskbar is present when navigating home. Several TAPL taskbar tests are also flaking because the taskbar is missing when opening an app. Adding logging to catch when FLAG_IN_APP is being set and why it isn't being applied.

Bug: 227657604
Bug: 225205246
Test: manual
Change-Id: Ia976bb0a6c7764e571fab3ac98ee21ff22ef7674
2022-04-06 14:26:47 -07:00
Shawn Lin
d1567efff5 Merge "Fixed cts failure of WindowInsetsControllerTests" into tm-dev 2022-04-06 02:37:24 +00:00
Tracy Zhou
0439fcdd5c Do not append additional delimiters
Fixes: 227665358
Test: N/A
Change-Id: I6ec0bca286c0824e474f04a61b7d855858490120
2022-03-31 17:15:46 -07:00
shawnlin
34aad9e022 Fixed cts failure of WindowInsetsControllerTests
If stashing taskbar is caused IME visiblity, we could just skip updating
rounded corner insets since the rounded corners will be covered by IME
during IME is showing and task bar will be restored back to unstashed
when IME is hidden.

Bug: 225765490
Test: atest WindowInsetsControllerTests
Change-Id: If8f40add0d4d9f746169d26f46f27545b4023e90
2022-03-30 18:20:32 +08:00
Schneider Victor-tulias
44aadeaef6 Fix issue cauing the taskbar to show in the all set page of the SUW.
Some missing state handling was causing the taskbar to show in the all set page of the SUW.

Fixes: 218507703
Test: build change, flashed and factory reset device
Change-Id: If3a280ef6416f0821cf6a9b1ab0a65d58c5c8221
2022-03-22 10:50:26 -07:00
Schneider Victor-tulias
fb252e7ce1 Add taskbar TAPL tests
- Added TAPL objects to support TAPL tests for taskbar features
- Added tests for major taskbar features: hiding/showing the taskbar, opening all apps, lauching apps and app deep shortcuts from the taskbar/all apps page, launching apps and app deep shortcuts in splitscreen
- These tests should only run for large devices

Design: go/taskbar-tapl-tests
Test: ran tests locally with invalid configurations and remotely
Bug: 215218813
Change-Id: I3c28c339707467414aa47fa633f87fa0c1fdee57
2022-03-10 13:02:35 -08:00
Tony Wickham
3e7415df56 Keep reporting > 0 insets on home screen
Technically mControllers.stashedHandleViewController.isStashedHandleVisible() is false on the home screen (since we unstash), so now we also check isInApp(). This ensures that we always return the same insets when on the home screen - and the insets we report are the same as when you launch an app, to ensure seamless transitions. The value itself shouldn't matter to launcher as long as it is static, since launcher overrides the insets due to taskbar anyway, but we need to keep the value static to avoid configuration change.

Test: Open a website in Chrome, stash taskbar, then launch Chrome from home screen and ensure content doesn't jump during the transition
Fixes: 221238308
Change-Id: I81e320b3a8d32ffe78441be5dd8f15a586d3b842
2022-03-04 19:29:39 +00:00
Winson Chung
7e426a3933 Merge "Provide content insets while in SUW in portrait mode" into tm-dev 2022-03-04 03:25:44 +00:00
TreeHugger Robot
4180a79d2b Merge "Use shared insets resize animation duration for taskbar stashing" into tm-dev 2022-03-04 02:22:47 +00:00
Winson Chung
ac736e7dac Provide content insets while in SUW in portrait mode
- We keep the app setup flag set, but adjust the insets to
  inset SUW itself in portrait

Bug: 219879035
Test: With both 3button and gesture nav, verify that portrait
      mode SUW is always inset
Change-Id: Iad0b6c41feaa3fb169af75c071b7f9544b42bab7
2022-03-04 00:12:41 +00:00
Tony Wickham
27d33e2994 Address some insets issues in Taskbar All Apps
- Don't report insets change to underlying app when stashing taskbar during all apps transition
- Internally override all apps insets to take stashing into account
- Don't offset all apps window by display cutouts, as we handle them internally via padding internally
- Also Fix bug where "stashing" taskbar in 3 button mode (which just fades out taskbar icons but keeps nav buttons) was reporting smaller insets to apps

Test: 1) open all apps in Calculator, ensure Calculator doesn't adjust insets and all apps has bottom content padding but no nav scrim
2) in 3 button mode, scroll to bottom of all apps and can read last row icon labels
3) enable display cutout in developer options, ensure no change to tests 1 and 2, and all apps scrim fills the screen (including behind cutout)
Fixes: 219980805

Change-Id: Ic3c6a744bc675e4ea277d22c4c0b3b353eddd905
2022-03-03 22:04:49 +00:00
Tony Wickham
ede8ad8ec9 Use shared insets resize animation duration for taskbar stashing
This is a no-op since they are the same value (by design), but using the constant directly will prevent potential divergences in the future.

Test: none
Bug: 191269755
Change-Id: I81b98045466398b7a49de872694004e526adf048
2022-03-03 18:25:59 +00:00
Brian Isganitis
a1370bfc5f Put taskbar all apps in separate overlay window and stash taskbar.
All apps should display below system UI components such as the
notification tray and power menu, so an overlay window is more
appropriate. As a result, all apps has a separate window activity
context, but some properties are delegated to the taskbar activity
context. Taskbar should also be stashed while all apps is open.

Change-Id: I593457708779d84a0ab8b949a966d247d0a2e1b7
Test: Manual
Bug: 216843189
Fix: 217383817
(cherry picked from commit 473b980bf9)
2022-02-23 15:06:56 +00:00
Tony Wickham
31a4c539d0 Only show unstash feedforward hint when long press will unstash
Test: Long press to unstash while in an app still works and shows feedforward; long pressing handle while in overview, all apps, or when IME is showing doesn't show anything.
Fixes: 218902248
Change-Id: I2c96570cab018c0e63c446793b84b210964bdb94
2022-02-11 00:29:56 +00:00
Alex Chau
6a7d1e2ad1 Don't apply nav bar insets in tablets
- With flexible inset changes in T, taskbar is no longer inseted in getCurrentSizeRange, i.e. DeviceProfile.availableHeight no longer inset nav bar size
- In order for home screen sizes to be calcualted correctly, avoid inseting nav bar in LauncherRootView
- Only apply a bottom padding with stashed taskbar size to necessarily surfaces (Overview)
- Home screen icon overlap will be fixed in separate CL

Bug: 215528237
Test: maual in tablet gesture nav and 3 buttons
Change-Id: I9bc796ba059159e819f8cd121ddabab96c8113d2
2022-02-01 13:08:49 +00:00
Winson Chung
458e842bca Merge "Revert "Temporarily disable SUW specific insets logic"" 2022-01-29 22:05:14 +00:00
Pat Manning
900ef936ad Animate icon dimming in taskbar when force showing in immersive mode.
Test: manual
Bug: 203748818
Change-Id: Iab3c65db502e7dbde3141429e9ae70eec1fabde1
2022-01-27 17:59:35 +00:00
Winson Chung
41e2824bfa Revert "Temporarily disable SUW specific insets logic"
This reverts commit 361f82b237.

Reason for revert: Latest SUW update ensures AOSP layout is same as Pixel

Bug: 204384193
Change-Id: I4eaa8e6045232c2897d97e49d532939c838dbce0
2022-01-27 17:21:48 +00:00
Schneider Victor-tulias
fa0bfee97a Add log dumps for taskbar state
Test: created bugreport and checked logs
Bug: -
Change-Id: Ic0c2330b18c8daf181ae5b236e0c4b212d630fa3
2022-01-20 14:41:25 -08:00
Winson Chung
33f1d348ab Temporarily disable SUW specific insets logic am: 361f82b237 am: 3b22691fe2
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16492581

Change-Id: I797fca3adbe2fdd95b0a59607f97b4d5273f1c37
2021-12-16 22:57:14 +00:00
Winson Chung
361f82b237 Temporarily disable SUW specific insets logic
Bug: 204384193
Test: Check that SUW is inset

Change-Id: Id00f10f51b52ef8ec375f650fd44bb2c6eb31e09
2021-12-16 18:45:25 +00:00
TreeHugger Robot
3611e9d656 Merge "Ensure some taskbar states are initialized correctly" into sc-v2-dev am: 9b3b2b9c7e am: 4ab25b564e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16463952

Change-Id: I7bcf495a8774df2ac99dd6b9cf3c65f6d5f46461
2021-12-14 23:26:08 +00:00
Winson Chung
7f5e4ca06c Ensure some taskbar states are initialized correctly
- Update FLAG_IN_APP to account for setup state to ensure that the
  stashed state is correct. This needs to be done in the stash
  controller since SUW is the home activity on startup and the
  launcher state controller will not be initialized until after
  SUW finishes
- Initialize the launcher state and resumed flags in case Launcher
  restarts while another app is resumed

Bug: 204384193
Test: Run through SUW, ensure the background is not visible
Change-Id: I5ce061ad16e79226c8428339ccd0b5ac55c07205
2021-12-14 19:08:55 +00:00
Shawn Lin
39ada8ad58 Merge "Notify system to report the rounded corners that task bar draws" 2021-12-13 08:26:01 +00:00
shawnlin
beae64cd95 Notify system to report the rounded corners that task bar draws
Task bar draws fake rouned corner above itself and it should notify
system to report that fake ones to apps.

Bug: 196387239
Test: make

Change-Id: I1d9732de71fbe653ed56e468e211b1bfb4dd2b37
2021-12-13 13:33:59 +08:00
Tony Wickham
c7b8957bbb Report contentInsets only based on what they will be inside apps
This avoids changing them when going from an app to launcher (most obvious when going to overview).

This also allows us to not change insets on apps when opening/closing IME, which reduces potential jumpiness.

Finally, also use this logic for 3P launchers by calling directly from TaskbarDragLayerController instead of TaskbarUIController (which was only overridden by LauncherTaskbarUIController). This fixes some bad issues like sending fullscreen insets when opening a folder from taskbar.

Test: Open Calculator, unstash taskbar, go to overview and ensure no jump as taskbar stashes.
Fixes: 200805319
Change-Id: I4f1cc187398d0051863ff44ea90b7ab9c6aaa8f9
2021-12-10 23:47:18 +00:00
Tony Wickham
f1951ce1f7 Fix taskbar stash misalignment when going from app to overview
Keep taskbar unaligned with hotseat if we're stashing anyway

Test: Swipe up from app with taskbar present to overview, check frame by frame to ensure icons morph directly into the handle instead of above it
Fixes: 208697792
Change-Id: If3238286b3383e75eb71fbd3b97d34bb3b44340b
2021-12-06 15:15:34 -08:00
Tony Wickham
821e37b447 Stash taskbar when IME is present, including during gestures
- SysUI removes SYSUI_STATE_IME_SHOWING when starting a gesture from an app, but because unstashing has implications on the gesture transition (e.g. clips the bottom of the app), we defer handling the ime hiding until the gesture settles. Repurposed the flow that swaps the taskbar background during the gesture to support this case as well.
- Delay the unstash when IME is closing, to align with the end of the IME exit transition
- Remove TaskbarViewController.ALPHA_INDEX_IME now that we stash when IME is opening, since stashing already hides the taskbar icons
- Also support passing a starting progress to the stashed handle reveal animation, to allow it to be reversed when cancelled. For example, when returning to an app that has IME showing, we first start unstashing because we're in an app, but then we get the signal that IME is attached so we stash again almost immediately (within a frame or two).

Test: In both 3 button and fully gestural, open a keyboard in an app, ensure taskbar gets out of the way and then reappears at the end when the keyboard is dismissed
Bug: 202511986
Change-Id: I93c298a98ba369ea6310466ff3f802231c582687
2021-11-23 16:37:06 -08:00