Commit Graph

18 Commits

Author SHA1 Message Date
Stefan Andonian
146701ca3e Move SharedPreferences code to its own class.
Bug: 251502424
Test: Code compiled correctly.
Change-Id: Iea0d6ab2999504117546ee0f7adc0c7b8b45c065
2022-11-17 17:22:47 +00:00
Jon Miranda
29f7474056 Have responsive taskbar UI during swipe up gesture.
- Makes taskbar threshold an absolute Y threshold
  instead of a distance threshold.
- Moves handle, taskbar view, and taskbar background
  during the swipe up gesture

Next CL will address transforming the nav handle <-> taskbar
and ensuring that there's a clean handoff

Bug: 246631059
Test: swipe up on taskbar, release. see bounce
      swipe up on taskbar to go home, proper icon alignment
      swipe up on taskbar, pause for overview, see bounce
      -> further movement should not move taskbar
      test launcher3

Change-Id: I141236fd72428cda7edd0ff116de1d478d18c722
2022-11-08 14:50:02 +00:00
Sunny Goyal
d859060860 Merging MultiValueAlpha with MultiPropertyFactory
Bug: 246644619
Test: Presubmi
Change-Id: Id5abc5f3169544656f1139ae17ca59e34ac65dac
2022-10-24 14:38:18 -07:00
Vinit Nayak
d6c5147524 Landscape 3 button nav on taskbar phone supported
* TODO: Seascape bar positioning, add tests

Change-Id: I542be2f2f682d8c8a9cdd9bb6c667c44ca167f3e
Merged-In: I542be2f2f682d8c8a9cdd9bb6c667c44ca167f3e
2022-10-17 13:59:18 -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
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
Tony Wickham
9a54d2aa43 Hide taskbar while VoiceInteractionWindow is visible
- Fade out icons (or stashed handle if stashed)
- Move background to APPLICATION_OVERLAY layer (behind VIW)
  - Only for gesture nav
- On home screen in 3 button mode, translate buttons down when assistant
  is invoked

Test: Invoke assistant, ensure it draws above taskbar background and
taskbar stops drawing icons or stashed handle
Bug: 225200928

Change-Id: I7807d30df8f358295b8231d89217c7413f32c6f9
Merged-In: I7807d30df8f358295b8231d89217c7413f32c6f9
2022-06-09 05:21:42 +00: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
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
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
Tony Wickham
bb6e278f14 Fix taskbar layout issues in setup wizard
- Align nav buttons (only back is enabled) to start instead of end
- Don't animate from init()
- Provide 0 contentInsets.bottom
  - Auto-stash the taskbar during setup
  - Hide the stashed handle by adding an alpha channel for home disabled
  - Report 0 contentInsets when stashed if the handle isn't visible
- Tint nav buttons according to theme

Test: adb shell am start -a android.intent.action.MAIN -n com.google.android.setupwizard/.SetupWizardTestActivity
Bug: 194786060
Change-Id: I4a40501e8aad2a38ec00398efe9ea3dbfa7428cd
2021-10-14 21:50:03 -07:00
Tony Wickham
6db0cf1e22 Merge "Aniamte stashed handle color changes" into sc-v2-dev 2021-09-30 02:17:18 +00:00
Tony Wickham
0ede0fa405 Aniamte stashed handle color changes
Test: Swipe from light background to dark background, ensure handle animates the color change
Bug: 193938970
Change-Id: I815c3a364019935bdf3d69309e695ac34b119c5e
2021-09-29 16:19:49 -07:00
Tony Wickham
a93e158352 Update stashed handle region to only include the handle
Before it included the whole width/height of the view, rather than just the outline where the handle is drawn.

Test: Swipe up from a light app on dark wallpaper, ensure handle changes color as soon as the white app background is past halfway through the handle
Bug: 193938970
Change-Id: Ic8b83f60976f05b8ff56590422bd9b2fa6140e76
2021-09-29 15:47:58 -07:00
Tracy Zhou
334cae420e Tint task bar based on sampling of colors in the area
TODO: Add transition animation

Bug: 193938970
Test: manual
Change-Id: I0ffb94e0f11d47685a268ee8d057b6997f3a2ff6
2021-08-17 23:26:28 -07:00
Tony Wickham
8a2c1cbc5a Add taskbar stashing feedforward, i.e. hint at upcoming stash/unstash
Also fix unstashing not working in 3P launchers by moving the unstash call from LauncherTaskbarUIController to TaskbarActivityContext

Test: long press taskbar background and stashed handle, watch it hint towards the new stashed/unstashed state respectively and then complete the animation when the long press is triggered
Fixes: 193926311
Fixes: 192926350
Change-Id: I0e538be9129bf5c600d07f360b8106d7077862ad
2021-07-19 14:09:33 -10:00
Tony Wickham
3fd22847ac Initial commit of taskbar stashing
- Added StashedHandleViewController to provide properties such as ViewOutlineProvider to animate the handle that's shown in place of taskbar while it's stashed
- Added TaskbarStashController to coordinate the stashed state, including orchestrating the animation across taskbar controllers
- Added TaskbarStashInput consumer to detect long press in the nav region when taskbar is stashed

Behavior:
- Long pressing taskbar background animates to the stashed state by morphing the TaskbarView into the stashed handle view and offsetting the background offscreen
- We persist the stashed state across app launches and reboot; to unstash, long press the stashed handle
- We also visually unstash when going back home

Test: long press tasbkar background when in an app to stash it, long press the resulting stashed handle to unstash; while stashed, swipe up to home to also unstash until launching another app
Bug: 189503603
Change-Id: I698eff785388dff1ef717c76879719d6af236c2d
2021-06-18 17:51:39 -07:00