Commit Graph

90 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
12771e002c Merge "Revert "Revert "Allow transient taskbar to unstash over soft ime""" into tm-qpr-dev 2022-11-16 20:18:27 +00:00
Jon Miranda
f641ddd27e Revert "Revert "Allow transient taskbar to unstash over soft ime""
This reverts commit c8c81a3425.

Reason for revert: fix tests by not auto stashing when ime comes up, but still allow taskbar to show if user initiaties it

Bug: 255818649
Change-Id: Id3ab27dcc205e5a72dbd0481e3eabc10b2e1b643
Test: pull up ime, swipe to reveal taskbar
2022-11-16 16:13:26 +00:00
Sam Dubey
b6acf00e3c Merge "Revert "Allow transient taskbar to unstash over soft ime"" into tm-qpr-dev 2022-11-16 15:20:30 +00:00
Sam Dubey
c8c81a3425 Revert "Allow transient taskbar to unstash over soft ime"
This reverts commit 9787ae6ad9.

Reason for revert: Breaking launcher tests on Tablet

Bug: 259347305

Change-Id: Idfd9e412f143370b6b8a4c6f86aac94d17bc1846
2022-11-16 11:31:55 +00:00
Jon Miranda
49c7469672 Merge "Allow transient taskbar to unstash over soft ime" into tm-qpr-dev 2022-11-15 23:59:16 +00:00
Jon Miranda
9787ae6ad9 Allow transient taskbar to unstash over soft ime
Bug: 255818649
Test: pull up ime, swipe to reveal taskbar
Change-Id: Ibae77c8a29d06093823f2421fbf851979f9babed
2022-11-14 11:30:55 -08:00
Jon Miranda
f0349354ec Revert "Revert "Add TaskbarModeSwitchRule to test both transient/persistent taskbar.""
This reverts commit e7011d2b87.

Reason for revert: attempt to fix test issues

- Instead of using SharedPrefs which can be flaky anyways,
  we pass along a boolean to test transient taskbar when
  we are in the test harness

Bug: 257549303
Test: TaplTestsTaskbar
Change-Id: I7c15a97363adc377f29853c1fe60b1960c77bfc3
2022-11-10 11:11:14 -08:00
Jon Miranda
e7011d2b87 Revert "Add TaskbarModeSwitchRule to test both transient/persistent taskbar."
This reverts commit d5a6b5f688.

Reason for revert: Breaks tests due to "SharedPreferences in credential encrypted storage are not available until after user is unlocked"

Bug: 258256906
Change-Id: I1de69249685f9d2e71183357cf3eda8d443c7d97
2022-11-08 21:56:52 +00:00
Jon Miranda
d5a6b5f688 Add TaskbarModeSwitchRule to test both transient/persistent taskbar.
- Lays the foundation for transient taskbar tests.
- Does not add flags that would add ACTION_OUTSIDE in tests.
  We can address testing this functionality in a separate CL

Bug: 257549303
Test: TaplTestsTaskbar
Change-Id: I44acc5e589b959e6d4bc93fdc369e503c54e7d87
2022-11-07 14:18:37 -08:00
Jon Miranda
7e8195081e Update insets for transient taskbar
Bug: 252905206
Test: manual
Change-Id: I03bd493dbe63274c8e90cb5e415127a1dd93e9b8
2022-11-03 17:16:48 -07:00
Jon Miranda
575d699edc Revert "Revert "Add a way to stash/unstash transient taskbar.""
This reverts commit afc3bff10b.

Reason for revert: fixing launcher tests broken by original change

We'll only add flags for transient taskbar case

Bug: 256988243
Bug: 256987492
Change-Id: I8915ef5345816316bfb71efc9fc667e4e8db824c
2022-11-02 11:07:27 -07: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
Alex Chau
38dae63910 Only support manual stashing while in app
- For taskbar in overview, don't allow stashing

Fix: 253042515
Test: With taskbar in overview, long press do nothing. Taskbar is still stashable in app
Test: Without taskbar in overview, taskbar still transform to nav handle in overview
Change-Id: I8f353a473a8570df72acda2338c4b984a69dc5c0
2022-10-12 18:16:50 +01:00
TreeHugger Robot
5c4b6b50d7 Merge "First pass at Taskbar layout UI polish for SUW" into tm-qpr-dev 2022-10-12 02:27:37 +00:00
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
Alex Chau
2e72e4cda6 Fix taskbar in overview touch and stash behavior
- When taskbar is unstashed in Launcher (e.g. overview), make the unstashed height touchable
- When AllApps button is pressed in taskbar overview, also stash taskbar

Bug: 245320601
Test: manual
Change-Id: Iadd0bea13cf9a779c68e953d25f21f663c15865a
2022-10-06 21:37:56 +01: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