Commit Graph

105 Commits

Author SHA1 Message Date
Himanshu Gupta
ce495f13e3 Adding suport for Private Space QsTile fulfillment.
Adding logic to unlock private space and
scroll to the container after unlock event
is received by Launcher.

This change also moves pieces of Private Space
Animation to different classes, in order to make
it more robust.

Bug: 289024009
Test: atest PrivateProfileManagerTest
Flag: ACONFIG com.google.android.apps.nexuslauncher.inject_private_space_tile TEAMFOOD
Change-Id: Ica2fbc00ff3516ed5aca7fbbfc0bd2aa036a4cee
2024-01-15 18:43:27 +05:30
Holly Sun
97b1bba413 Implement Install Apps button in Private Space.
UX mock: https://www.figma.com/file/K6bIIcG882EiJNjxvSWsFT/V%E2%80%A2-Private-Space?node-id=7246%3A83750&mode=dev
UX icon spec: https://www.figma.com/file/K6bIIcG882EiJNjxvSWsFT/V%E2%80%A2-Private-Space?type=design&node-id=19979-224329&mode=design&t=50SDFdomAtonNU4V-0

Video: https://drive.google.com/file/d/1VtTzxR46dLiaozOo6sOHADv1qTcBOwDP/view?usp=sharing
Screenshot:
https://screenshot.googleplex.com/3ShcUozVrkGMHbc
https://screenshot.googleplex.com/3F4c3yzJ7RUpma7

Reason to use PrivateSpaceInstallAppButtonInfo: reuse `VIEW_TYPE_ICON`, which needs an AppInfo.

Bug: 308064949
Test: manual
Flag: ACONFIG com.android.launcher3.private_space_app_installer_button development
Change-Id: I3fb27fae8324d4b276816b17f9b0a2d9b6f33ed2
2024-01-10 14:28:33 -08:00
Brandon Dayauon
17477dbf42 Fix right-bottom corner edge to curve in PS container.
This happens when there isn't enough apps to fill in the private space container.

* Added test to check the correct regions are being set depending on the apps in the list.
* Need to set ROUND_BOTTOM_RIGHT to the last app item and the decorator would take care of it.
* Changed to use mNumAppsPerRowAllApps that is already set in ctor.

bug: 316116551
Test: manual/presubmit/photos:
before: https://screenshot.googleplex.com/4Uo5Vtu3a6MDuGa
after: https://screenshot.googleplex.com/878g8yv5LgPsHaL
Flag: None
Change-Id: Ic481628b824c75e5578f3129e3a48f575c6a3655
2024-01-05 13:54:46 -08:00
Brandon Dayauon
98bf9f7532 Apply the expand animation on Private Space
- Using the refactoring that took place in ag/25414154

Bug: 299294792
Test: Verified SearchTransitionController didn't regress by turning off BACKGROUND_DRAWABLES flag.
- Verified QL highlight still works
- video: https://drive.google.com/file/d/15yjBWofebn6m7VgEnLK6kEYqhC_adJQ3/view?usp=sharing

Flag: ACONFIG com.android.launcher3.Flags.private_space_animation DEVELOPMENT

Change-Id: Ib6229b404b48616966f3e6ab6884099b6e4b4023
2023-12-11 11:27:31 -08:00
Himanshu Gupta
739b3c9f22 Enabling Private Space Container in Launcher.
This CL adds the following:
1. Adds filtering and addition of Private Profile apps in main user
all apps recycler view
2. Enables decoration of Private Profile apps
3. Enables hiding Private Space container based upon a settings entry.

Flag: ACONFIG com.android.launcher3.Flags.enable_private_space DEVELOPMENT
Bug: 289223923
Test: Ran Launcher3 tests
Change-Id: I33dc55a3a39e75d3fc336ca6a488b282e2dd322c
2023-11-15 15:08:59 +00:00
Holly Sun
19f6525546 Refresh mNumAppsPerRowAllApps when device profile changes.
The return value of SrollableLayoutManager#getItemsHeight is wrong, which is caused by the return value of `incrementTotalHeight` (https://source.corp.google.com/h/googleplex-android/platform/superproject/main/+/main:packages/apps/Launcher3/src/com/android/launcher3/util/ScrollableLayoutManager.java;l=151-163). In AllAppsGridAdapter#incrementTotalHeight (https://source.corp.google.com/h/googleplex-android/platform/superproject/main/+/main:packages/apps/Launcher3/src/com/android/launcher3/allapps/AllAppsGridAdapter.java;l=172), `item.rowAppIndex` is still the staled value after app grid change / device fold & unfold. This value is calculated in AlphabeticalAppsList (https://source.corp.google.com/h/googleplex-android/platform/superproject/main/+/main:packages/apps/Launcher3/src/com/android/launcher3/allapps/AlphabeticalAppsList.java;l=276-280). The mod `mNumAppsPerRowAllApps` is staled. So add an setter in `AlphabeticalAppsList` to update `mNumAppsPerRowAllApps`.

Bug: 262003765
Bug: 284940820
Test: manual
Flag: N/A
Change-Id: I74a99a3dc58ee45f066bcefb3e9c56be02b62f82
2023-08-03 09:39:18 -07:00
Brian Isganitis
e9eacb38fa Cleanup raw usage of AllAppsStore.
Test: Compiles
Bug: 287523421
Flag: No
Change-Id: I35cdb1b281f251b74305129b583f29cdb29e15a6
2023-07-11 18:41:45 -04:00
Sunny Goyal
3c2ee27a01 Fixing work tab is not updated when work-mode changes
Bug: 263399769
Test: Verified on device
Change-Id: I94d8f20bc70f2299d11d539d4821ba7e13253522
2023-01-05 14:53:28 -08:00
Sunny Goyal
af95ddbadc Fixing search behavior in Launcher3
> Showing no-result found only when there are no results
> Removing unnecessary view inflation in RecyclerViewPool for
  various search vide types
> Removing unused market-search link and no-empty-result illustration

Bug: 240343082
Bug: 207573083
Test: Verified Launcher3
Change-Id: Ia44799cd2385ea5dc837ef25732ca237975abde7
2022-07-28 22:05:30 -07: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
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
TreeHugger Robot
4bd36a37a7 Merge "Implementing support for item diffing instead of creating out the complete UI on every update" into tm-dev 2022-05-04 23:11:04 +00:00
Sunny Goyal
3c5a08ada1 Implementing support for item diffing instead of creating out the
complete UI on every update

Bug: 229860311
Test: Verified locally
Change-Id: I5712b5d76878a0ed72cc1392ede59b3778b7a1dc
2022-05-03 16:24:46 -07:00
Sunny Goyal
32084d49d3 Replacing ItemInfoMatcher with predicate
This removed unnecessary componentName lookups when it
is not required. Many checks just rely on IDs and
userHandle

Bug: 231153610
Test: Presubmit
Change-Id: Ief93954abc5861062a9f55dc2ef181d3de106c62
2022-05-03 10:07:22 -07:00
Sunny Goyal
3091f0a4fe Removing ununsed append logic in search
Bug: 229860311
Test: Manual
Change-Id: Id6a72784b186fc5f0aaeac52f2a66fa35711fe4c
2022-04-29 09:49:50 -07:00
Anushree Ganjam
fa693be19f Merge "Revert "Refactors Search results into separate RV for Toast."" into tm-dev 2022-04-28 04:52:01 +00:00
Anushree Ganjam
5cc7ff0990 Revert "Refactors Search results into separate RV for Toast."
This reverts commit 6729f0b950.

Reason for revert: This change caused b/230648542.

Please see https://b.corp.google.com/issues/230648542#comment5 for the video after reverting this change.

Bug: 206905515
Bug: 230648542

Change-Id: I85f063c56cad137c05b810204244bba7e8f94ee7
2022-04-28 01:37:49 +00:00
Sunny Goyal
52f4c16a94 Revert^2 "Removing some unused code from All-Apps"
13ae6784b5

Change-Id: I06a4c9cc6beba4fc87b4a9375872c68e71e1c5f6
2022-04-27 03:22:58 +00:00
Andy Wickham
6729f0b950 Refactors Search results into separate RV for Toast.
This will help enable transitions between A-Z apps lists and
search results because both can be seen simultaneously and
manipulated independently.

Some high level items of the refactor:
 - SearchRecyclerView is added; logic that populated the main
   (personal) tab with search results was simply redirected to
   this RV instead.
 - BaseAllAppsContainerView added isSearching() method. Returns
   false, and ActivityAllAppsContainerView overrides (as search
   is handled there).
 - Renamed BaseRecyclerView to FastScrollRecyclerView to better
   describe what it does. SearchRecyclerView extends this, but
   returns false for supportsFastScrolling().
 - AlphabeticalAppsList#mAllAppsStore is now optional, so the
   Search RV doesn't need to store/listen to apps. Note this
   doesn't affect the predicted app row which is still updated
   if one of the predicted apps is uninstalled (I tested this).

Future work:
 - Determine why dispatchRestoreInstanceState is not called for
   BaseAllAppsContainerView. Save is called, e.g. on rotation.
   Effect of restore not called: rotating while searching goes
   back to A-Z list.
 - Keep suggested apps in Header while searching. Currently they
   are rendered in the SearchRV above search results, as before.
 - Potentially extract Personal/Work tabs to move independently of
   header.
 - AlphabeticalAppsList is a misleading name because it can also
   contains search results. However, things are pretty intertwined
   between that and BaseAllAppsAdapter (effectively a circular
   dependency), so I figured cleaning all that up was out of the
   immediate scope of this refactor, which is mainly meant to
   unblock transition work.

Bug: 206905515
Test: Manually checked for regressions, ran tests.
Change-Id: I4d3757c8a8f9b774956ca6be541dd4fcdad1de13
2022-04-24 17:36:48 -07:00
Sunny Goyal
13ae6784b5 Revert "Removing some unused code from All-Apps"
Revert submission 17866780-cancel-request

Reason for revert: wrong icons

Reverted Changes:
Iedc98e5ef:Cancelling previous request and clearing UI when a...
I72394fb42:Removing some unused code from All-Apps

Change-Id: I2ecefcaf07e6105a10f86b8dc19f75089e45a3e0
2022-04-22 19:53:37 +00:00
Sunny Goyal
3946ecd441 Removing some unused code from All-Apps
Bug: 229860311
Test: Verified on device
Change-Id: I72394fb421679688f87cdbf725859ec35529a59e
2022-04-20 09:54:48 -07:00
Abhilasha Chahal
dfd154f18d Use numAllAppsColumns to calculate height of all apps icons
Additionally opens up access of some fields to allow them to be overridden.

Test: Manually verified that Launcher3 layout does not change

Launcher3 APKs: https://drive.google.com/drive/folders/1hBcZU9xou4tZJxbTmkya_LyBbD2oYuwV?resourcekey=0-R0I1IQ2rSUIEfPjW8S_ppA&usp=sharing

Bug: 216150572

Change-Id: I4b97a7e9e15973fc5aa70a4b98f0b73dd5bf3c17
2022-03-23 21:09:54 +00:00
Andy Wickham
2efb7b6247 Fixes a list equality check and adds a refreshResults() method.
Previously, the lists being compared could point to the same
object (e.g. from a separate class like ZeroStateResultProvider),
thus always being equal. This prevented the RecyclerView from
updating in certain cases.

Also added an option new method to SearchUiManager which can be
used to trigger a refresh.

Bug: 207651359
Test: Manual
Change-Id: I9c7f02fcd9dfb91326eccf1d4eb8692904702ab0
2022-03-09 17:17:24 -08:00
Abhilasha Chahal
9c7096c8ac Revert "Revert "Extract out common adapter logic to support diff..."
Revert^2 "Fixing AdapterItem import"

1a27c278d6c6594b552b620b4d2b67e68bef23f2

Change-Id: Ia3bf9f0b3aaff0d1e2d102320e917462b38935b2
2022-03-09 17:45:45 +00:00
Sam Dubey
4f1a232cca Revert "Extract out common adapter logic to support different Al..."
Revert "Fixing AdapterItem import"

Revert submission 17044827-tm-dev-216150568

Reason for revert: Broke builds
Bug: 223609269
Reverted Changes:
I53eba3c8c:Fixing AdapterItem import
I1068e75d0:Extract out common adapter logic to support differ...
I24d8e54e8:Fix AdapterItem imports

Change-Id: I931c666db7dcb2c8eef1894b56b59ed688218def
2022-03-09 17:25:15 +00:00
Abhilasha Chahal
6badc405ad Extract out common adapter logic to support different AllApps layouts
Test: Manual tests. Refactoring, all existing tests should pass.
Bug: 216150568
Change-Id: I1068e75d0b4a33d402a7d68e237d2484ab3a1e01
2022-03-01 13:08:54 +00:00
Brian Isganitis
1664c9f418 Refactor all apps to depend on activity context.
The current AllAppsContainerView has been split into a base class and a
subclass for activities. The base class allows using all apps with an
activity context. A-Z and work profile tabs are supported, but search
and the hotseat still require an Activity.

Test: Manual. All apps should work the same.
Bug: 204696617
Change-Id: I3b146714bc11b3b3555d97623aab5d78ac836482
2022-01-24 20:24:20 -05:00
Samuel Fufa
154ad76f40 Introduce inline education for work profile
Bug: 186857875
Test: local
Change-Id: I796b04fbb3ffc714a01104107774819d35034f93
2021-06-14 01:01:42 -05:00
Sunny Goyal
ce0c857e45 Avoid rebind if data didn't change
Bug: 187531176
Test: Manual
Change-Id: I94ab7ecfbed0cb8f0fbae995b4e2ff9c9cdaa808
2021-05-07 16:16:59 -07:00
Hyunyoung Song
c07e3b3c28 Remove AA+ decorator logic from aosp code
Bug: 179495850
Test: manual

Change-Id: I7e029e4970f45a0f7c410533f85335a95e4e448c
2021-03-29 00:29:09 -07:00
Hyunyoung Song
1739c5c68e When in search mode, do not refresh rescycler view, on package update
Bug: 180570580
Test: manual

TL;DR;; when new app install happens in search mode, no reset
when new app install happens in a-z mode, recycler view refreshes

Change-Id: I8a6bf327ecd3dbef4837eca560f10016731b78e0
2021-02-22 02:32:23 -08:00
Hyunyoung Song
db9a53d9aa Add group highlighting to AA+ result
Bug: 180071886
Test: manual
Change-Id: Id1cc3d7400e1a7fe41af272d689aa9315030b420
2021-02-18 02:19:27 -08:00
Samuel Fufa
2c86122fa4 Resolve auto close on widget swipe
Bug: 172891360
Test: Manual
Change-Id: Icb384b6dc5ec9a29b6a9a7811b862a2d83ca11a7
(cherry picked from commit 5fa6f3ce503cde51687985ebc9dee6f163b9b1ea)
2020-11-17 18:34:46 +00:00
Samuel Fufa
c25bc0335b Fix OutOfBounds issue on getFocusedChild
In cases where search only shows items that don't require focus highlighting,getFocusedChildIndex returns -1.

Bug: 13023194
Change-Id: I6145ae26e3953c5fc4fd1ed1696eb931017cac0f
2020-11-11 11:31:54 -06:00
Hyunyoung Song
3a4caed1f3 Fix NPE inside getFocusdChild
Bug: 172883035
Change-Id: Iea3e07165cdaa45031ee5bbc11add5c115cab366
2020-11-09 22:19:37 -08:00
Hyunyoung Song
caa1e9c399 Search query method should support multiple consumers
Bug: 170488559
Change-Id: I64bef9523d3c3950c4ca3a4b9ce1d506d1672200
2020-10-19 22:09:10 -07:00
Samuel Fufa
114de69c98 Introduce support for play results in launcher
Introduces PluginSearchPipeline class, a plugin listener for AllAppsSearchPlugin. Coverts from List<Bundle> results from callback to AdapterItems to be rendered in SearchController.
- Moves AdapterItem to AllAppsGridAdapter

Bug: 164699827
Test: Manual
Change-Id: I20ec147e6b3f4707cf69d62b4b4ac70a90196345
2020-08-18 11:34:09 -07:00
Hyunyoung Song
5dd045bec6 Handle IME selection focus for ENABLE_DEVICE_SEARCH
Bug: 162861289
Change-Id: I15e4eae09be2aa9f89a5157fd74c95e91e64bc53
2020-08-11 09:27:45 -07:00
Samuel Fufa
4a53c70c57 Introduce support for Hero app Section
[Video attached to bug report]

Bug: 162871508
Test: Manual
Change-Id: Ia6f5621d6220f55e6fd5e56530853c267838442c
2020-08-07 17:29:19 +00:00
Samuel Fufa
60096e990a Remove mFilteredApps
Currently, we are maintaining a list of appInfos to report the number of Accessibility recycler-view items. This could be done by maintaining an int.

Bug: 162480567
Test: Manual
Change-Id: I9de8e1d4ac6e1a674d1e19b591dedad0dd4cc536
2020-08-04 11:24:46 -07:00
Samuel Fufa
e8bea3ea7a Allow search results decoration [part 2/3]
[Video attached to bug report]

Bug: 162480567
Test: Manual
Change-Id: Iff285abde5b2a3f3f3a63e7318020cfe7572af49
2020-08-04 10:28:28 -07:00
Samuel Fufa
df10ff46bd Migrate AllAppsSearch [part 1/3]
[Video attached to bug report]

Setup DeviceSearchAlgorithm to handle on device search

Bug: 161801950
Test: Manual
Change-Id: Ib55f415f9992ceab687bbbfe904d153157541648
2020-07-28 14:48:33 -07:00
Sunny Goyal
e396abf502 Moving model data structures to a separate file
Change-Id: I77ad7a5219e72d2e0d6c1803de2ac3ed6a65a8f7
2020-04-09 13:20:39 -07:00
Samuel Fufa
8f6d141d84 Work toggle improvements
Bug:141289979
Test:Manual
Change-Id: If96845c0220816f9ffd5a5c86ec33b2674d15d1d
2020-01-31 12:07:12 -08:00
Sunny Goyal
9c2b96090b Adding SecondaryDisplayLauncher in Launcher using common listener
Bug: 141596722
Change-Id: I480bfadf592f7d0309f17c33a3fe14bb77fb5586
2020-01-30 08:27:27 +00:00
Sunny Goyal
fa39536570 Removing static reference of deep shortcut manager
Bug: 141376165
Change-Id: Ie60b82be63a8926825598c681d8b2a1b2ace6413
2020-01-02 20:13:12 +00:00
Sunny Goyal
0af5134bc5 Moving section names to model, to avoid an unnecessary hashmap
Change-Id: I9620367e0c2203b2290a4a188411ccb9174ae130
2019-08-06 15:21:36 -07:00
vadimt
1fd52d9024 Remove tracing for a fixed bug
Bug: 132900132
Change-Id: Ic4ce3669f88c932e392b7517ec9fda11384dc334
2019-07-11 16:00:12 -07:00
vadimt
5aef526e95 More logging for lab-only flake when an app doesn't start
I suspect that All Apps gets refreshed around the time of the click.

Bug: 132900132
Change-Id: I6d3053f7d8f998e08ca495c005e14ddece634164
2019-05-28 18:28:09 +00:00
Sunny Goyal
b1d222e9a7 Removing support for app prediction from Launcher3
Derivative projects can extend the FloatingHeader to add support
to custom content in all-apps screen.

Change-Id: I4e29221a72e5a077a756713a6774cda7ecde8f1b
2018-01-30 20:53:11 -08:00