Commit Graph

12092 Commits

Author SHA1 Message Date
Sunny Goyal
ca6a539faa Only fetching relevant widget info during first pass
This avoids loading resources for allwidget providers when they
are not added to homescreen.

Test: Verified on device
Bug: 180867488
Change-Id: If9adde8eb035ecac75dc4e3e37cd3f0f526865e5
2021-03-01 15:33:15 -08:00
Tony Wickham
ed8f264fcb Add debug log for initInputMonitor()
Sometimes tests aren't getting input events, and this could help
verify that the input monitor is being initialized.

Also remove obsolete check that could mean we don't initialize
when we should.

Bug: 180915942
Change-Id: I811cb432b456bc67d9e7ded945db36eb227f5071
2021-03-01 15:29:52 -08:00
Steven Ng
c7537713ca Add widget description to WidgetCell
Full picker: https://screenshot.googleplex.com/8Dij79K8Pq2KWdm.png
Bottom picker: https://screenshot.googleplex.com/5f9TLra49dYJjLB.png

Test: Manually launch full and bottom widget pickers and observe
      description is only shown for widgets but not shortcut.

Bug: 179797520
Change-Id: I5bfde056906a4a0f4fff9bc9a488f808365173b3
2021-03-01 23:17:32 +00:00
TreeHugger Robot
f6987b0be1 Merge "Add tracing to track every allApps rebind" into sc-dev 2021-03-01 17:40:12 +00:00
Samuel Fufa
565975ad89 Merge "Show typeahead hint for app results" into sc-dev 2021-03-01 14:18:04 +00:00
Yogisha Dixit
741fae9ea2 Move widget files into widget folder + add tests.
I will use the newly created LauncherAppWidgetProviderInfoTest in a follow-up CL to add tests for the newly added widget sizing APIs.

Test: Automatic: Ran all robolectric tests in launcher3,
      Manual: Added a widget, edited the widget, removed the widget
Bug: 179807199
Change-Id: I540b2dbe284c6eb5aa2466a1d13a9581ee59425b
2021-03-01 13:59:52 +00:00
Steven Ng
05cc458dbf Merge "Show widget previews in their expected cell sizes" into sc-dev 2021-03-01 10:10:15 +00:00
TreeHugger Robot
023657ec21 Merge "Adds dump method to ModelDelegate." into sc-dev 2021-02-26 23:38:09 +00:00
Samuel Fufa
a18abf55b4 Add tracing to track every allApps rebind
Bug: 159671700
Test: presubmit
Change-Id: I1c7507ac2175d6e2f4514e4ad51c356aa75dd6e9
2021-02-26 16:40:27 -06:00
TreeHugger Robot
3be39aa0b9 Merge "Update ArrowPopup to accommodate more rounded dialogs." into sc-dev 2021-02-26 22:17:40 +00:00
Andy Wickham
bb993c484a Adds dump method to ModelDelegate.
This allows delegates to include additional data in log dumps.

Bug: 181351828
Test: Checked that data was found in a bug report and
adb shell dumpsys activity com.google.android.apps.nexuslauncher

Change-Id: I7a63430202ff899ac885a544c558e1248d2ce829
2021-02-26 13:36:07 -08:00
thiruram
e9fe7f2789 [AA+] Logs LAUNCHER_ALLAPPS_ITEM_LONG_PRESSED event.
Bug: 178562918
Test: Manual
Change-Id: I6f195b7bdfa222332a250379bb7667501cbee762
2021-02-26 20:46:14 +00:00
TreeHugger Robot
a9cb2fb476 Merge "Adds a removeChangeListener to FeatureFlags$BooleanFlag." into sc-dev 2021-02-26 20:21:51 +00:00
Jonathan Miranda
e1d06c5ccd Merge "Check for developer option on resuming settings activity." into sc-dev 2021-02-26 19:06:32 +00:00
thiruram
1bfd24e13f [AA+] Fixes duplicate LAUNCHER_ALLAPPS_SWITCHED_TO_MAIN_TAB logs.
LAUNCHER_ALLAPPS_SWITCHED_TO_MAIN_TAB is logged when transistioning from AllApps search results view to all apps view.

Bug: 178562918
Test: Manual
Change-Id: Ie02e23ae9eaabad719ad2a1fc8f08a9e4c36936f
2021-02-26 18:57:57 +00:00
Samuel Fufa
81bf29c998 Show typeahead hint for app results
Preview: https://drive.google.com/file/d/1_qB-HDVfqqzPOhnuq5Hj9grhh69av7xf/view

Bug: 180545101
Test: Manual
Change-Id: I0649fa0e19f850fdc4de3776f6ac9f450bb0501b
2021-02-26 12:26:41 -06:00
Steven Ng
11773f47d2 Show widget previews in their expected cell sizes
1. Show widget previews in their expected cell sizes.
2. Update the bottom picker to use a table layout rather than
a horizontal scrollbar.
3. Move the title and cell size description to the bottom of
the preview.

Test: Run AddConfigWidgetTest
      Manually open full and bottom widgets picker and observe
      widget previews.
      Video: https://drive.google.com/file/d/1K8A8hK5B4FgPTsX3cb-Yt4a_VjI0pk-w/view?usp=sharing
Bug: 179797520
Change-Id: I938612cb2e2477ce4a3a2d6c8891a0a36fc0978c
2021-02-26 17:47:32 +00:00
TreeHugger Robot
21803095ee Merge "Add a header container view to the widgets full sheet" into sc-dev 2021-02-26 17:45:12 +00:00
Jon Miranda
45cb6a8739 Check for developer option on resuming settings activity.
Test: Turn system dev option off, check pref is gone in home settings
      Turn system dev option on, check pref is visible in home settings

Change-Id: I71d90aa5840571e908228552e498ab3a82a3352d
2021-02-26 11:18:19 -05:00
Alina Zaidi
4ffd4f03c6 Merge "Refactor SearchAlgorithm and SearchCallback interface to work on generic search result type." into sc-dev 2021-02-26 15:44:37 +00:00
Steven Ng
167f81b931 Add a header container view to the widgets full sheet
A header container view will contain
1. A horizontal bar: for indicating the popup view can be dragged
   to dismiss:
2. A title view: a title of the widgets full sheet popup view.
3. A search bar: for widgets / shortcut search. Since we will be
   making the fallback search algorithm available in AOSP, the
   search bar will now live in the Launcher3 codebase.
4. Recommended widgets (coming soon...)

This CL also added a scroll effect which gradually collapses the
title view when the user scrolls down the recycler view. The title
view will gradually restore its height when the user scroll to the
top of the recycler view.

Test: Manually test widgets pickers in work profile and non work
      profile setup. Verified the fast scroll bar works well in
      both setup.
      With searchbar: https://drive.google.com/file/d/19grUHL_LspLhMD_5p6-i0CiMW1FpflmD/view?usp=sharing
      Without searchbar: https://drive.google.com/file/d/1KRPgEAESHUhJDo1UJsQN80JO1c9Y8Nhl/view?usp=sharing

Bug: 179797520

Change-Id: If0016e3b3c693414897140e7912531ed9bd5deef
2021-02-26 10:03:36 +00:00
Andy Wickham
75845ed9a8 Adds a removeChangeListener to FeatureFlags$BooleanFlag.
This will help us avoid leaks, etc.

Also changes ENABLE_SMARTSPACE_ENHANCED back to a DeviceFlag

Bug: 181194850
Bug: 181077020
Test: atest NexusLauncherOutOfProcTests:com.android.launcher3.memory.MemoryTests -- --abi armeabi-v7a
Change-Id: I6f54af3e6b6302a073b8b7d448ff72b05a803d8f
2021-02-26 07:41:45 +00:00
Zak Cohen
452005a14e Update ArrowPopup to accommodate more rounded dialogs.
Adjusts layouts to accommodate more rounded dialogs, includes adding a
new rounded triangle drawable that can be clipped by a rounded rect.



Bug: 179922117
Test: checked all instances and RTL
Change-Id: I4c2f0ead0fd56eba14ffd9b82f0c100f7d92ef5b
2021-02-25 16:59:55 -08:00
Jon Miranda
e126d72fa8 More grid changes, closer to final specs.
* Added isScalable, minCellWidth, minCellHeight, and borderSpacing attrs

When isScalable is true, we use set workspace cell values to
minCellWidth/minCellHeight and then scale the cell values to
fit the available space. This allows us to have consistent
aspect ratios when two devices match the display/grid options.

This is different from the dynamic grid, which calculates
cell values based on iconSize/textSize/etc and then allows
the cell width to be as wide as space allows.

I adjusted some variables so that they will auto adjust
based on another value, indepenent from whether the
grid isScalable or not. An example of this is the folder
label text, where it's always set to be 1.14x of whatever
the workspace icon text size is. This is so we don't need
to add a bunch of more variables to DisplayOption/GridOption.

Bug: 175329686
Test: - switching between device profiles,
      - testing folder open/close
      - testing in multiwindow
      - testing in landscape
Change-Id: Ia469ae0d65b518469ef264b726db46f4a3210056
2021-02-25 17:34:56 -05:00
Andy Wickham
d6844dcb7f Merge "Revert "Changes ENABLE_SMARTSPACE_ENHANCED to be a DeviceFlag."" into sc-dev 2021-02-25 21:02:34 +00:00
Andy Wickham
0779f74049 Revert "Changes ENABLE_SMARTSPACE_ENHANCED to be a DeviceFlag."
This reverts commit f480a87423.

Reason for revert: Broke tests

Change-Id: I508e1db58b7973a60e350aa679b9b6f5fe4ecbd1
2021-02-25 20:06:08 +00:00
Alina Zaidi
331140f665 Refactor SearchAlgorithm and SearchCallback interface to work on generic search result type.
Test: Manually tested that 'All apps' search works fine
Bug: b/157286785
Change-Id: Id4b7fb133149e9211f871b46b47d5853ec0e0050
2021-02-25 12:05:41 +00:00
thiruram
8e16391b49 [AA+] Log LAUNCHER_ALLAPPS_FOCUSED_ITEM_SELECTED_WITH_IME event.
Bug: 178562918
Test: Manual
Change-Id: Id40f80aae652dcc6c16ad35a003c91fd97750608
2021-02-25 01:15:05 +00:00
TreeHugger Robot
729761e4e0 Merge "Replace the no preview layout check with Resources.ID_NULL(0)" into sc-dev 2021-02-25 01:12:27 +00:00
Pierre Barbier de Reuille
4fb5d4d3ca Merge "Launcher changes for go/widget-size-specification" into sc-dev 2021-02-24 23:24:20 +00:00
Andy Wickham
39ba7604b0 Merge "Changes ENABLE_SMARTSPACE_ENHANCED to be a DeviceFlag." into sc-dev 2021-02-24 22:42:08 +00:00
Steven Ng
fb853435f4 Merge "Replace horizontal ScrollViews with tables in the full widgets picker" into sc-dev 2021-02-24 22:22:31 +00:00
Steven Ng
fdeee141d9 Replace the no preview layout check with Resources.ID_NULL(0)
TODO: open up the RemoteViews(ApplicationInfo) API so that Launcher
      can inflate a layout from a work profile app.

Test: Before this CL, install tasks app in work profile. Observed
      crash when tapping Tasks header in the widgets picker.
      After this CL, no crash observed when tapping Tasks header in
      the widgets picker.

Bug: 181061277
Change-Id: I16c2b9aec5f4cabf15da35fea09f68c10797f5fa
2021-02-24 22:01:06 +00:00
Samuel Fufa
226c4af911 Merge "Restore divider between app predictions and apps" into sc-dev 2021-02-24 20:50:10 +00:00
Pierre Barbier de Reuille
b2526feb24 Launcher changes for go/widget-size-specification
Makes sure the launcher:

1 - Send the list of actual sizes the widget in all situations.
2 - Gives the current size to the framework on inflation.

Also needed to guard the new border changes introduced in
http://ag/13532637 with the corresponding flag.

Change-Id: I2a33e9501b921f2fc393684e8ce91ee077626bf7
Test: By hand using a local widget.
Bug: 179025145
2021-02-24 20:40:41 +00:00
Steven Ng
e8d92342fa Replace horizontal ScrollViews with tables in the full widgets picker
Test: Run gnl test, AddWidgetTest
      Run Robolectric tests for widgets
      Manual test video: https://drive.google.com/file/d/1uwCtVNIlC9150kv5eEfILfP5r5M7ARYm/view?usp=sharing

Bug: 179797520
Change-Id: I2f4cdf84338a91b63967879d0c9268c312ace19b
2021-02-24 19:49:15 +00:00
thiruram
9f53d61334 [AA+] Use different launcher event to log all apps entry with device search.
Bug: 178562918
Test: Manual
Change-Id: I56357e871dd57257ccd56a073cccc7e38529c6c6
2021-02-24 10:57:20 -08:00
Samuel Fufa
b984cf7fa6 Restore divider between app predictions and apps
Screenshot: https://screenshot.googleplex.com/89jJLU3JXV8tRXM
Bug: 180017741
Test: Manual
Change-Id: Iab1764fe94340f120770054cf5a59bd3ed9e45a4
2021-02-24 10:31:57 -06:00
Samuel Fufa
c7d72e55ec Merge "Break up nasa search results" into sc-dev 2021-02-24 13:39:12 +00:00
Samuel Fufa
c2da3c60fe Merge "Allow badging with ComponentNames" into sc-dev 2021-02-24 13:38:49 +00:00
Andy Wickham
f480a87423 Changes ENABLE_SMARTSPACE_ENHANCED to be a DeviceFlag.
This lets us toggle it server-side.

Bug: 181077020
Test: Manually toggled using
adb shell device_config put launcher ENABLE_SMARTSPACE_ENHANCED true

Change-Id: I5172bf6f977729f4c1c813b1eaba3b8b34bfc44e
2021-02-23 21:57:55 -08:00
Samuel Fufa
85dfc2e032 Allow badging with ComponentNames
Bug: 180909579
Test: Manual
Change-Id: I2ee6dc2edb97ef0eb2470e7b7e8f849d451a77dd
2021-02-23 12:48:37 -06:00
Vadim Tryshev
06df8d7262 Merge "Instrumenting swiping up to all apps for jank" into sc-dev 2021-02-23 18:32:23 +00:00
Steven Ng
6936040def Merge "Add personal / work tabs for work profile widgets" into sc-dev 2021-02-23 10:58:35 +00:00
thiruram
d0ab1a0eed [AA+] Add WW logging for Slice actions.
Bug: 178562918
Test: Manual
Change-Id: I515ee3c0990dea2c30e68d5919568dc1773912ee
2021-02-22 20:07:29 -08:00
thiruram
b8bb677616 [AA+] Skip title logging when search result type is PEOPLE.
Bug: 178562918
Test: Manual
Change-Id: Ia2fb8018efcdfb6ad947c590d559094cb460ce83
2021-02-22 17:10:38 -08:00
thiruram
f8f2a6ed0a [AA+] Log tap on SearchActionItem.
Bug: 178562918
Test: Presubmit
Change-Id: I42a44de4f3cc02ca331c4f99c107891c4658995d
2021-02-22 22:39:41 +00:00
Steven Ng
391404fcb7 Add personal / work tabs for work profile widgets
Video: https://drive.google.com/file/d/1TORRNcvVM7fIvNd_WZaajLbI7D9z4VFA/view?usp=sharing


Test: Main profile only: run AddConfigWidgetTest.
      With work profile: manually launch the full widgets sheet.
      Go to the personal tab: only personal widgets are shown.
      Go to the work tab: only work widgets are shown
      Successfully add personal / work widgets from the full widgets
      sheet.

Bug: 179797520

Change-Id: Iad8b90c2af35e0580319d7a05510ec88e4f8b86c
2021-02-22 16:10:09 +00:00
Samuel Fufa
9ffaee3110 Break up nasa search results
+ replace IME feature flag launcher setting

Test: Manual
Bug: 178638266
Change-Id: Id013cd247cfa2b33cdf62ee3239ad1bacc35b5da
2021-02-22 09:10:18 -06: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