Commit Graph

10915 Commits

Author SHA1 Message Date
Tony Wickham
7ba547cd2d Folder support in Taskbar
- Add TaskbarActivityContext which allows shared Launcher elements to
  "just work" using existing generic ActivityContext.
- TaskbarContainerView extends BaseDragLayer<TaskbarActivityContext>.
- Inflate FolderIcon and Folder using TaskbarActivityContext to be
  shown in TaskbarContainerView.
- Use TaskbarActivityContext's DeviceProfile to determine icon size
  instead of overriding in styles. This also ensures that normal
  BubbleTextView icons have the same size as FolderIcons.

Test: Place a folder in home screen hotseat, ensure it shows up in
taskbar and can be opened, and that apps inside it can be launched
or dragged.
Bug: 171917176

Change-Id: Ic25d2f84bcd7e3399c88989305ea565497c030d9
2021-02-16 15:07:01 -08:00
Tony Wickham
1906cc33f9 Refactor Folder to use ActivityContext and BaseDragLayer
These are the more generic versions of Launcher and DragLayer, so
that Folders can be used in other surfaces.

Test: Open and close Folders on home screen, ensure works properly
Bug: 171917176
Change-Id: I39b9aedbd8319ca61ea0e776bc95eab585e023d5
2021-02-16 15:06:50 -08:00
Sunny Goyal
e9110af0e0 Merge "Fixing dragView not getting removed on returning home" into sc-dev 2021-02-16 22:13:33 +00:00
Jonathan Miranda
8dd4ddc7ae Merge "Add border spacing and fixed cell height to grid." into sc-dev 2021-02-16 18:38:38 +00:00
Andy Wickham
9199fd1831 Merge "Adds CONTAINER_QSB to be used for QSB data." into sc-dev 2021-02-16 05:35:56 +00:00
thiruram
c96873caad [AA+] Log LAUNCHER_ONSTOP & LAUNCHER_ONRESUME events with AllApps session InstanceId.
* Transitions between AllApps and App screen logs LAUNCHER_ONSTOP & LAUNCHER_ONRESUME events. This change add InstanceId specific to the current AllApps session to these logs; this will help to regenerate AllApps session from logs on the server side. This should only affect logs from AllApps screen, but not others.

* Removes LiveSearchManager.allAppsLogger method as it may create confusion with 2 methods for logging into Statsd

* Moved AllApps entry and exit logs to Launcher.

Bug: 178562918
Test: Manual
Change-Id: I5fab941777a3dfd2e9b19c0efd5b06d3884222ef
2021-02-15 23:56:52 +00:00
Steven Ng
d2526d6a9a Merge "Make all widgets collapsed in the full widget picker by default" into sc-dev 2021-02-15 22:18:24 +00:00
Steven Ng
e92bc55d12 Make all widgets collapsed in the full widget picker by default
Changes:
1. Add a WidgetListHeader view for showing icon, app name and a subtitle.
2. Only WidgetListHeaders are always visible to users in the full widget
   picker.
3. Only one widgets list from an app is visible in the full widget picker
   at any one time.

Test: Auto: run add robolectric tests under widget/picker
      Manual: Open full widgets picker. Then, expand and collapse apps.
      Video: https://drive.google.com/file/d/1gzfeEm5IOAu0qHsO77OTS2eMfU7CHJiL/view?usp=sharing

Bug: 179797520
Change-Id: Idac58be23dfeafcb79b3c61b4972d3addb462de1
2021-02-15 17:46:38 +00:00
Hyunyoung Song
106aa0d6f1 Merge "Apply Silk/ colorBackground(Floating) to AllApps" into sc-dev 2021-02-13 04:14:49 +00:00
Sunny Goyal
9cc6ecfa11 Fixing dragView not getting removed on returning home
Bug: 179330150
Test: Verified on device
Change-Id: Id0baadac36b700bd1c57382b0024c248063f9127
2021-02-12 13:08:04 -08:00
Andy Wickham
19ab177d1b Adds CONTAINER_QSB to be used for QSB data.
Also updates some related generics definitions for
better/simpler compile-time checks.

Bug: 178536734
Test: Manual
Change-Id: If439b64ad968f62674f856fd3ff465bf21cc9204
2021-02-11 22:16:24 -08:00
Hyunyoung Song
b3d739dfa9 Apply Silk/ colorBackground(Floating) to AllApps
Bug: 180020638
Test: adb shell setprop persist.sysui.monet 1 && adb shell am crash com.android.systemui
Change-Id: Ied508f3452a3e640495fff4d1567c3b094f54432
2021-02-11 10:52:06 -08:00
Steven Ng
fa58bfa0b7 Merge "Refactoring before adding a new view type in the WidgetsListAdapter" into sc-dev 2021-02-11 01:06:11 +00:00
Adam Cohen
12e547f2a8 Merge "Draw the workspace scrim in the LauncherRootView instead of DragLayer" into sc-dev 2021-02-10 23:33:06 +00:00
thiruram
91d4f9f007 Fix to avoid NPE with LiveSearchManager.
Bug: 179911188
Test: manual
Change-Id: Ic7f8ae7f7e2795eb18569670e166310102b7ea02
2021-02-10 23:24:32 +00:00
Jon Miranda
228877d37c Add border spacing and fixed cell height to grid.
- Border spacing is the spacing between the cells.
- Workspace cell height is now fixed, and we allocate
  all the "extra" space to three different variable height
  areas.

* Built behind ENABLE_FOUR_COLUMNS flag because it hinders the
default grid.

Bug: 175329686
Test: - set border spacing to 0 and confirm matches prior layout
      - test drag and drop still worked
      - test reordering
      - test widgets
      - test folders
      - test multiwindow

Change-Id: Ic6f3dff577d28ff214bda4b0a787ec7fd08c108b
2021-02-10 17:22:37 -05:00
Steven Ng
2f5648a911 Refactoring before adding a new view type in the WidgetsListAdapter
Changes made:
1. Model: added an abstract class for storing common information for
   entries shown in the full page widgets picker.
2. Introduced a ViewHolderBinder interface to split the logic of binding
   data to ViewHolder into separate classes.
3. Move the view holder binding of WidgetsListRow from WidgetListAdapter
   to its new class.
4. Move some widgets picker classes into a new picker package.

Test: Auto: Run WidgetsListAdapterTest, WidgetsListRowEntryTest and
      WidgetsListRowViewHolderBinderTest.
      Manual: open the all apps widgets tray and navigate the list.

Bug: 179797520
Change-Id: Iab29557842bb79156cad84d00a4c5d0db0c5aa06
2021-02-10 21:23:40 +00:00
Adam Cohen
501e139c6e Draw the workspace scrim in the LauncherRootView instead of DragLayer
=> The entire DragLayer is translated during the -1 transition which creates a janky looking edge at the top of the screen

=> By bumping the scrim up a level, we avoid this

=> Separated WorkspaceAndHotseatScrim into two separate scrims, since only part of the scrim needed to be bumped up to a level. Further, it was an overloaded class.

=> We had previously been implicitly relying on the fact that the scrim was rendered in the Workspace parent; we need to make sure to propagate workspace inavlidations to the container of the scrim. While things would still work without this change, it's more correct to leave it, as we no longer assume a hierarchy for functinoality.

Bug: 178215332

Test: manual verification. See video in bug.

Change-Id: I0a76ddf35ceea8c9635367f69380ef24f42e9479
2021-02-10 19:16:26 +00:00
thiruram
03f8dcb8a4 Add instanceId to LAUNCHER_FOLDER_CONVERTED_TO_ICON log event.
Bug: 179534152
Change-Id: I0e4cedbfc2310258ec83f5dd756f8eb71189206b
2021-02-10 10:31:24 -08:00
thiruram
7823402ec9 Fixes wrong container for LAUNCHER_ITEM_DROP_COMPLETED log event.
Bug: 179532038
Change-Id: Idfa1b82c35338a7472ff80d94fb20c69e498a028
2021-02-10 10:30:03 -08:00
thiruram
9aac07e87d [AA+] Add LAUNCHER_ALLAPPS_SWITCHED_TO_WORK_TAB & LAUNCHER_ALLAPPS_SWITCHED_TO_MAIN_TAB events.
Bug: 178562918
Change-Id: I6ae1e034dc8fbbca6fa046104ab69c1ec9f4e6da
2021-02-10 18:02:46 +00:00
thiruram
aafa8a44a3 [AA+] Add LAUNCHER_ALLAPPS_KEYBOARD_CLOSED event.
Also adds Launcher.allAppsLogger method to simplify AllApps specific user events logging.

Bug: 178562918
Change-Id: I57520fe1504079091f0ff2c4c74268f727ffe14f
2021-02-09 16:45:52 -08:00
Thiru Ramasamy
9012515fef Merge "Fixes NPE with LAUNCHER_ALLAPPS_EXIT log event." into sc-dev 2021-02-09 23:37:17 +00:00
Sunny Goyal
9fa3a07086 Merge "Removing released features" into sc-dev 2021-02-09 19:57:18 +00:00
thiruram
61620e7537 Fixes NPE with LAUNCHER_ALLAPPS_EXIT log event.
Bug: 179720471
Test: rnlt -until-error -t com.android.launcher3.ui.TaplTestsLauncher3
Change-Id: Ic8f91092aa060a2225c059a89a33b6877cf35f36
2021-02-09 10:52:11 -08:00
TreeHugger Robot
823c5f8bf6 Merge "Enable variable size thumbnail for large screen" into sc-dev 2021-02-09 11:26:33 +00:00
Alex Chau
7944ee5c79 Enable variable size thumbnail for large screen
- Introduced a feature flag
- Refresh TaskView size when thumbnail is refreshed or Recents resizes
- Disable edge scale down in large screens
- Added temp method to get task width/height ratio
- In fullscreen, scale down TaskThumbnailView and disable TaskView elevation
- Task boxing mechanism: http://screen/3NkePthAVUVH2Rv.png

Bug: 174464656
Test: Manually test overview and quickswitch for folded and unfolded, including with RTL.
Change-Id: I2ce24d588a246cc6a2408039a37d884021aa0800
2021-02-08 19:40:49 +00:00
thiruram
73821a9c6d [AA+] Fixes wrong container for LAUNCHER_ITEM_DROP_COMPLETED log event.
Bug: 179529616

Change-Id: Id35c952c94d8a10743f147b194d3c27e22bc5062
2021-02-08 10:11:32 -08:00
TreeHugger Robot
fd03d04ae0 Merge "Enable slice again" into sc-dev 2021-02-08 08:55:00 +00:00
TreeHugger Robot
bcf2ecc9e5 Merge "After AA+Search Edu, bring up IME" into sc-dev 2021-02-08 01:19:33 +00:00
Sunny Goyal
3186fbaed4 Merge "Adding support for keyboard based drag and drop" into sc-dev 2021-02-06 02:55:06 +00:00
Sunny Goyal
a4647b681f Adding support for keyboard based drag and drop
For keyboard DnD, we use Accessible DnD implementation.
A placeholder FloatingView draws the focus indicator
for the virtual views

Test: Visible
Bug: 178781566
Change-Id: I632fc7377dffa1e05e3f0a9c3ad18641deb5a1a4
2021-02-05 13:05:24 -08:00
Sunny Goyal
ead22a5257 Removing released features
Bug: 179224463
Test: Presubmit
Change-Id: I6aa989fa8e52398112cca2c7f4bed0ae69881f7b
2021-02-05 11:36:08 -08:00
TreeHugger Robot
1508e062e8 Merge "Postponing registering widget listener" into sc-dev 2021-02-05 19:23:29 +00:00
Hyunyoung Song
681154e533 After AA+Search Edu, bring up IME
Bug: 179154570
Test: Manual

Change-Id: I2d010103dd37b84b3672ba0d6ff5897373991585
2021-02-05 00:29:06 -08:00
Hyunyoung Song
da74a44511 Enable slice again
Bug: 179068415
Test: manual
Change-Id: Ib2e8d17d91488719eb439fd55c8b24e62338fc94
2021-02-04 20:57:59 -08:00
thiruram
4fc871f977 [AA+] Add LAUNCHER_ALLAPPS_ENTRY, LAUNCHER_ALLAPPS_EXIT events.
This would help us to define clear start and end events for AllApps sessions on the server side.

Bug: 178562918
Change-Id: I77f236c9bc1a21e868545b1309e47d91d6fc1d96
2021-02-04 16:48:07 -08:00
Sunny Goyal
b0bff050f2 Merge "Moving slice loading on a background thread" into sc-dev 2021-02-04 23:29:42 +00:00
Sunny Goyal
79e52fc23b Moving slice loading on a background thread
> Also fixing slice icon loading, such that the request is cancelled
  if views are recycled quickly
> Loading widget label on dg thread and cancelling request if views
  are recycled quickly.

Bug: 179068415
Test: verified locally
Change-Id: Id5a524e2bf596862330a8170394aef9ffd708544
2021-02-04 13:03:33 -08:00
Schneider Victor-tulias
2fd2694b9c Merge "Fix icon flicker on transition from installing, to installed, to downloading incrementally." into sc-dev 2021-02-04 18:19:08 +00:00
Alex Chau
4e2c25a788 Ensure isTablet is only enable when simulated landscape is disabled
- Tablet UI (e.g. grid overview and two panel workspace) is built with assumption that simulated landscape is disabled, make sure this is the case in DeviceProfile
- This is usually true as swDPs is generally smaller than sw used to determine xml files

Bug: 174464656
Test: Try different combination of smallest width and Display Size, isTablet is only set when allow_rotation is true
Change-Id: I3ee1c76909f29b6f14c4032be812bb8c9ea7e827
2021-02-04 11:24:06 +00:00
Tony Wickham
d10b587003 Merge "Add recent tasks to Taskbar" into sc-dev 2021-02-04 06:30:37 +00:00
Tony Wickham
aaa42bd0e8 Add recent tasks to Taskbar
- Also adds a divider between Hotseat and Recents
- Dedupes Recents from Hotseat

Test: Open some recent tasks, ensure they are deduped
from Hotseat and also handle < 2 tasks.

Bug: 171917176
Change-Id: Ia782c6ccbcda94cfd844aad04dc3d25a3f072c2b
2021-02-03 18:54:58 -08:00
Schneider Victor-tulias
1b4d5034fb Fix icon flicker on transition from installing, to installed, to downloading incrementally.
When an app finished downloading, we assumed that its progress level was 100%. This caused flicker in apps that supported incremental downloads. Added a check for the total download progress on app installation.

demo: https://drive.google.com/file/d/11NwwhHj_4rmDFwpsb8gTX-uA5YSinjSj/view?usp=sharing

Fixes: 178745816

Test: manual

Change-Id: I08328296db2ce2c2242fc4fe87158ff4b911c659
2021-02-03 16:39:16 -08:00
vadimt
04ebcf4686 Postponing registering widget listener
For the swipe-to-home gesture, the call will happen
after the animation.

This fixes jank during swiping up from an ap
to home.

Also renaming some methods for clarity.

Bug: 175048504, 173072373
Test: tracing
Change-Id: I070b23edb633d2ac0985d5eb9f75c789f8569772
2021-02-03 23:37:53 +00:00
thiruram
f4d19f4614 [AA+] Log app launches from DeviceSearchResultContainer with instance ID.
This InstanceId is used to recreate the AA+ session on the server side.

Bug: 178562918
Change-Id: I1bba94417d3a142351e2470bb6153707d2cadb11
2021-02-03 10:17:18 -08:00
thiruram
cbeb13d6c7 [AA+] Log app launches from AA+ search result container.
This change will update westworld logs for app launches from AA+ search result. Updates log's container info from AllAppsContainer -> AllAppsPlusSearchResultContainer.

Bug: 178562918
Change-Id: I9ffca27fea42951a57640ef36717c04ff0251506
2021-02-03 10:08:57 -08:00
Hyunyoung Song
aa793ff226 Merge "Support shorter height row layout / Disable ICON_SLICE" into sc-dev 2021-02-03 16:47:02 +00:00
Hyunyoung Song
7239df7258 Support shorter height row layout / Disable ICON_SLICE
Bug: 178815297
Bug: 178128837
Bug: 178823469

Test: manual, attached screenshot on the bugreport

Change-Id: Ie69c8928f5acc430320cfc5c85547195866e829e
2021-02-03 01:25:16 -08:00
Hyunyoung Song
351aea720f Merge "Logs stack trace when IME doesn't get attached when all apps swipes up" into sc-dev 2021-02-03 08:33:05 +00:00