Commit Graph

70 Commits

Author SHA1 Message Date
Fengjiang Li e884c2c79f Support predictive back from all apps to home
bug: b/238475505
Test: manual

Change-Id: Ibf4f7f41a26b044a538e2cd566d2297ed88f1b99
2023-01-11 22:55:28 +00:00
Brandon Dayauon 9d38a3fd10 Add logging to work mode switch
Add logging to the work button on work profile, logging when button
is extended and collapsed

bug: 263817965
test: presubmit
Change-Id: I3194d0a1567a9ee995497391350ed5be4b08c3db
2023-01-05 01:40:30 -08:00
Brandon Dayauon c9672b9002 Extend/shrink work button when scrolling
most of the change was from this CL: ag/19223926
moved scroll listener definition to WorkProfileManager.java
Added feature flag

bug: 194188980
test: Video - https://drive.google.com/file/d/18UM7UDNQz-Z8Q2Sh8VEKHm9LXRVJaWFM/view?usp=sharing
Change-Id: Ib80784e0f5108b28658141ca5e495a27fab34a3c
2022-12-20 14:38:40 -08:00
Andy Wickham 9cdba2f395 Adds additional top padding in All Apps with floating searchbar.
This is by UX/PM request.

Test: Manually with and without work profile on phone and tablet
with floating search enabled and disabled.
Bug: 213954333

Change-Id: I024aed629ab6f09b3dfd22a39c2149974863538e
2022-12-15 15:29:46 -08:00
Sunny Goyal adb364a104 Unifying multiple all-apps implementations
> Using a single layout for the all-apps content
> Removing some unnecessary themes
> Fixing search chashes in SecondaryDisplayLauncher

Bug: 259733681
Test: Existing TAPL tests verify that Launcher/AllApps work properly
Change-Id: Icd5310316499cd421bc039cdbd4d398b813cd477
2022-12-14 11:27:12 -08:00
Andy Wickham 29b95b58ba Merge "Adds header protection on tablet all apps panel." into tm-qpr-dev 2022-12-12 19:08:37 +00:00
Sunny Goyal 54fa110bba Removing some unnecessary interfaces and merging them to ActivityContext
Bug: 259733681
Test: Everything compiles
Change-Id: If6b530f6e589a851cf8554f5de0849843bd66dd4
2022-12-08 10:15:55 -08:00
Andy Wickham 0adad24408 Adds header protection on tablet all apps panel.
Removes background and manually draws it while drawing scrim. Then
draws header protection on top as needed.

Currently this only applies to all apps from Launcher, as Taskbar
doesn't seem to use the same scrim flow. So taskbar adds the same
static background that was previously used.

Demo videos: https://drive.google.com/drive/folders/11PyFsrLV6-QhU_E-zD3s5bfzZK2nOU87?resourcekey=0-E41uw5TP9xuqTifLAs71yw&usp=sharing

Test: Manually on phone and tablet with dark/light mode, floating
search bar on/off, work profile present/absent, taskbar/home entry
Bug: 240670050

Change-Id: I81dcc956d9dbbc7552c8a227a49741bcf71eed71
2022-12-06 18:31:33 -08:00
Andy Wickham 493831af1a Fixes for floating search bar (e.g. background protection).
- Adds background protection for the search bar
 - Views animating based on keyboard now support manual swipes.

Bug: 213954333
Bug: 259004115
Bug: 251460671
Test: Manual
Change-Id: I055766126fb46a8e8b48907e442c9e54aaa4badf
2022-12-06 17:59:53 -08:00
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
Holly Sun a793fc6e2c Bring up IME and focus on input when scroll to top.
Do this behind a feature flag AND only when "Always show keyboard" is selected or in prefix state.

Bug: 218846025
Test: keyboard shown when swiping up for QSB and AA+ (both main and work). Keyboard not shown when either the feature flag or Always show keyboard is disabled.
Change-Id: I3df2e0e44a8313eaf749cd6b91b7f9d0b9b80ec3
2022-11-02 15:19:23 -07:00
Holly Jiuyu Sun 381ba3319d Merge "Log a-z apps count." into tm-qpr-dev 2022-10-25 17:50:19 +00:00
Sunny Goyal f34811d3a3 Revert "Revert "Updating the scroll calculation from recyclerView to avoid view inflation""
Test: ABTD
https://android-build.googleplex.com/builds/abtd/run/L52600000956969786

This reverts commit cee6ddf3de.

Reason for revert: Fixed in ag/20239136

Change-Id: I0e8446e66d9a86a94b40fcbd6de14da07abe8e5c
2022-10-22 15:37:47 +00:00
Holly Sun dbd01bf6f9 Log a-z apps count.
Test: manual
Bug: 247432075
Change-Id: I9538a75bc3cb3d1e8e9089fc5e27d5d770cafb62
2022-10-18 15:57:53 -07:00
Hui Kang 2a28ae8a3f Merge "Revert "Updating the scroll calculation from recyclerView to avoid view inflation"" into tm-qpr-dev 2022-10-17 21:20:09 +00:00
Hui Kang cee6ddf3de Revert "Updating the scroll calculation from recyclerView to avoid view inflation"
This reverts commit 20bbe95ddb.

Reason for revert: Causing flake in Ironwood test: b/248295569

Test: ABTD
Before: Flaky, 14/50 PASSED
https://android-build.googleplex.com/builds/abtd/run/L33900000956890639

Revert: 50/50 PASSED
https://android-build.googleplex.com/builds/abtd/run/L49200000956887317

Change-Id: I41f4428c74e581323f90c716a7852b5e553ae27d
2022-10-17 20:37:49 +00:00
Brandon Dayauon 926d04ec14 Merge "Add variable to check if button should apply keyboard insets" into tm-qpr-dev 2022-10-08 12:15:26 +00:00
Brandon Dayauon b1840e3f36 Add variable to check if button should apply keyboard insets
bug: 251460671
test: manual
Change-Id: I90045c96c0fbf385ad8dd5978089491f3f106dd8
2022-10-07 15:32:23 -07:00
Andy Wickham e5a49f4b48 Hide FloatingHeaderView while in Search state.
This prevents touches on the profile buttons (which were already
hidden due to the header view having alpha 0, but touches were
still registered).

Fix: 248338523
Test: Manually tap where the work profile button is before and
after this change. Before: switches to work profile. Afer: does
nothing in 0 state; otherwise launches item at that position.

Change-Id: Ie30661146d25740000d7a9cbe79234ac15347253
2022-10-03 23:38:49 -07:00
Andy Wickham 14101659f7 Reduces search clipping when work profile is not present.
Basically, adds the spacing that is otherwise included by
the tab protection (which is about 4dp less than the spacing
that was previously being added).

Adds a compile-time flag to render the header at all times to
help visualize issues like this in the future. Check the
screenshots below to see some examples of this.

Screenshots: https://drive.google.com/drive/folders/1n4wwtjMwOR-eDIE1xAoG3oLXO7txpoT_?resourcekey=0-WP0RNbp7vFh2Yw1wUBZTaA&usp=sharing

Bug: 240672593
Bug: 243728487
Test: Manually checked search transition, scrolling behavior, and
highlight of the search results with and without a work profile.

Change-Id: I166d136e568c5621c81378fa09021666d95f0ffc
2022-09-23 19:36:44 -07:00
TreeHugger Robot 860657a5f2 Merge "Updating the scroll calculation from recyclerView to avoid view inflation" into tm-qpr-dev 2022-09-16 23:07:54 +00:00
Andy Wickham 5429b8fd86 Adds SearchRecyclerView as a notification dot listener.
This way app dots get updated as notifications come in or get
dismissed.

Bug: 246962476
Test: Dismissed notification while Search active.
Change-Id: I41e1b44561fb5ccd43deff342afb722cc5107330
2022-09-15 11:21:04 -07:00
Sunny Goyal 20bbe95ddb Updating the scroll calculation from recyclerView to avoid view inflation
> Updating the LayoutManager's scroll calculation instead of a separate
  implementation to better support recyclerView's calculations
> Caching the view sizes during layout to avoid view-inflation for
  unknown types
> Fixing scrollbar jump during scroll when widget list is expanded
> Fixing scrollbar never reaching end when onboarding card is displayed
  in work tab

Bug: 240343082
Test: Verified on device that new views are not inflated
Change-Id: Ied11ccf65b053691c5c126c4bf8de306ec24786d
2022-09-12 12:24:34 -07:00
TreeHugger Robot 69b9e736a8 Merge "Simplifying hideKeyboardAsync method" into tm-qpr-dev 2022-09-10 05:03:23 +00:00
Sunny Goyal 8958a7078a Simplifying hideKeyboardAsync method
Bug: 246000321
Test: Presubmit
Change-Id: I2851c49b61b662d4a5b7cd0a863f690fd74a8bd0
Merged-In: I2851c49b61b662d4a5b7cd0a863f690fd74a8bd0
2022-09-10 04:01:48 +00:00
Andy Wickham 94d5d3cb6c Support for animating A-Z <-> Search.
Demo videos (1/5 speed) and APK: https://drive.google.com/drive/folders/1qQNzcoibiFMzxYhvXc7UEHCaBhJg6SjN?resourcekey=0-OWD06iLXg3wf_eWce4rUPA&usp=sharing

Bug: 234882587
Bug: 243688989
Test: Manually tested a bunch of cases at 1/10 animation speed.
Such as work profile or not, suggested apps enabled/disabled,
typing during the animation, going back during the animation,
web results injected above apps, etc.

Change-Id: Id4f1a858d387bf3a7f9cf2d23564a276544abef1
2022-09-09 15:37:57 -07:00
Andy Wickham a2e9ce3b68 Merge "Notifies All Apps header when profile tab switches." into tm-qpr-dev 2022-07-19 23:22:51 +00:00
Sunny Goyal cba5f9a64e Removing unnecessary work adapter wrapper
Simplifying view type constants to make it easier to add new view types

Bug: 234008165
Test: Verified on device
Change-Id: I96589ceba362ea7e75afdfc3fe8da3be214aa682
2022-07-15 16:24:31 -07:00
Andy Wickham 85f9ce48ef Notifies All Apps header when profile tab switches.
This fixes scroll listeners which control the header from Taskbar.
In other instances of the All Apps container (i.e. from Launcher),
the search bar indirectly updates the header because resetSearch
is called, which also resets the header. Separately, I would like
to clean that up so that AllAppsContainerView does not get
controlled by the search bar (maybe as part of a larger reset
cleanup).

Fix: 236812759
Test: Manual on device with Taskbar
Change-Id: I9921e89c87d5e18e4b28854fbb373f24b4189014
2022-07-15 15:02:28 -07:00
Alex Chau a3070ea61d In AllApps search mode, only consume touch over visible container
Bug: 236360930
Test: Tap on deadzone to dismiss AllApps in search mode
Test: touch outside recycler view inside container, doesn't swipe left/right
Change-Id: I18498ea50f217231c3bb4489d6d9e95fc0e7da53
2022-06-24 11:51:11 +01:00
Hyunyoung Song 7ae633a89f Merge "Workspace should not receive touch events" into tm-dev am: 5c33ec3766 am: f30d5d1d5b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/18791871

Change-Id: Ic9e5e4ed66277eded872ace970d3b20387a07bdc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-13 17:16:47 +00:00
Hyunyoung Song 5c33ec3766 Merge "Workspace should not receive touch events" into tm-dev 2022-06-13 16:30:19 +00:00
Andy Wickham aade3dc637 Merge "Fixes Search bar padding when work profile not present." into tm-dev am: 34e8c3364a am: ef4136ad4e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/18789522

Change-Id: I2db55aaab2e0ad4ad8b2f3388f0cc7fe404a2aec
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-10 19:41:29 +00:00
Andy Wickham 34e8c3364a Merge "Fixes Search bar padding when work profile not present." into tm-dev 2022-06-10 17:07:43 +00:00
hyunyoungs e5f265c76e Workspace should not receive touch events
Bug: 234648831
Test: touch outside recycler view inside container, doesn't swipe left/right

TL;DR;;
As the definition of ActiveRecyclerView changed in latest refactor,
scrollbar existence is no longer a condition to consume
touch event if user is in isSearching state.

Change-Id: Iec97fb036ad45796a77c59d35f329744398d4953
2022-06-09 15:04:37 -07:00
Andy Wickham 5a476da75c Fixes Search bar padding when work profile not present.
The full padding was accounted for between the search bar and the
work/personal tabs, but only part of it was there when the tabs
were not shown.

Screenshot: https://screenshot.googleplex.com/8axV9QQ5Qy8MaUn.png

Test: Manually with and without work profile added. In the latter
case, nothing changed. The screenshot reflects the former case.
Fix: 233010483

Change-Id: I11b3c8cc814be48c25cbd9f454c3e122fff96fa0
2022-06-08 13:32:41 -07:00
Jon Miranda 409344de6c Merge "Play fallback animation if icon in All Apps is covered by header." into tm-dev am: 6d3d7b1a2e am: 8c733de027
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/18719804

Change-Id: Iab972feeb0a9620b44a46071c7d2b37a34b1fe6e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-08 01:07:10 +00:00
Jon Miranda f58db150af Play fallback animation if icon in All Apps is covered by header.
Bug: 230707341
Test: enter all apps
      scroll so icon is covered by header
      open app, swipe back to return to all apps
      confirm fallback animation plays

      repeat but scroll so icon is not covered by header
      confirm normal animation plays

Change-Id: I56cda07f3eccc11e8909f7fb28210f65cc6e0f1d
2022-06-02 16:06:37 -07:00
Andy Wickham a1ec03bdfe [conflict] Merge "Moves Search results into a separate RV (take 2)." into tm-dev am: 4ca247a6bb am: 15dc59f8b1
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/18420827

Change-Id: Ic7e380e21342011afcbd1ada0eb453dc83eff4be
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-26 23:31:31 +00:00
Brian Isganitis 5b8e3dd34e Check if event is over All Apps correctly on large screens.
Test: Manual
Fix: 232826650
Change-Id: Ia6a0aefe1a2886ba21150c7d65be5c5d95f18141
2022-05-25 00:19:11 +00:00
Andy Wickham 2ba7797edb Moves Search results into a separate RV (take 2).
Bug: 206905515
Test: Manually verified b/230648542 did not resurface. Tested
on phone and tablet with and without work profile.

Change-Id: If724f635286b9dff2c64255f9ece3568a5cb4ea9
2022-05-24 17:10:24 -07:00
kholoud mohamed 70d63456d3 Add non null check on mViewPager
Bug: 232034849
Test: N/A
Change-Id: I304088baf84dd6f65e096f610ebe11df036ae8d3
2022-05-13 14:33:50 +01:00
Alex Chau 7c89ac5d8c Merge "Add a scrim to AllApps and Widgets" into tm-dev 2022-05-12 20:09:06 +00:00
Thales Lima 28a8b9f158 Add a scrim to AllApps and Widgets
Check the size of the scrim and draw on the bottom of AllApps and Widgets.
Add a padding to the bottom of AllApps and Widgets so content is above the scrim.
Change the color of nav buttons for better accessibility.
Correct width of the Widgets sheets to be the same as AllApps sheet.

Fixes: 221107977
Fixes: 214215594
Test: manual, HSV and Window
Change-Id: Ib7510ffcd80231de7fefcdef65b422174dd74593
2022-05-12 09:38:24 -03:00
Becky Qiu c70f286a9f [Toast] Keep keyboard up for query builder tapping
Bug: 228998087
Test: manual
Change-Id: Idf40d79e4a8929f23a91461959576840577bf005
2022-05-10 23:26:03 -07:00
Becky Qiu 9c21bc071d Merge "[Toast] Fix the NPE in isPersonalTab()." into tm-dev 2022-05-09 18:24:49 +00:00
Becky Qiu f0fd3d8e2e [Toast] Fix the NPE in isPersonalTab().
Don't set mUsingTab until replaceRVContainer is done.

Bug: 224882720
Test: manual
Change-Id: I9ebec067d06df5e890ffe3c90d49f1de51b3b981
2022-05-09 09:57:29 -07:00
Brandon Dayauon 5a726787db Merge "changed name and dimensions of work_mode_toggle button, changed outline to surface for the (x) icon.." into tm-dev 2022-05-06 21:00:08 +00:00
Brandon Dayauon e5142c5c53 changed name and dimensions of work_mode_toggle button, changed outline to surface for the (x) icon..
Fixed padding issue (tightness) between Personal/WorkTabs/EduDialog
Aligned Work Toggle button to be the same with the workTabs/eduCard
raised button up 20dp to align with specs

Fixed issue where allApps apps invade the tabs. Fixed RTL issues where it wasn't going RTL.
Fixed RTL issue for the workfab button where there was no margin on the left side of the button
Added DeviceProfile to constructor

Bug: 200810328
Bug: 224731300
Test:
	Before: https://screenshot.googleplex.com/6sRgNZQz4wKYn5n
	After: https://screenshot.googleplex.com/8hBLyDiMbMH9tn2
	After(showingLayoutBounds): https://screenshot.googleplex.com/MuVUXCegukAMzSr

Change-Id: Ibac3f5b8fe7d877c2f54a2c87f4393c1a91dc806
2022-05-06 09:52:05 -07:00
Sunny Goyal d3a841d91a Merge "Removing fading edges from recyclerView as we already have full background behing search box, and additional laying is not requred" into tm-dev 2022-05-05 05:21:11 +00:00