Commit Graph

44 Commits

Author SHA1 Message Date
Samuel Fufa a60d1f9be7 Migrate from Plugin SearchTarget to API search Target [2/3]
- Adds support for android.app.search.SearchTarget in plugin while maintaining plugin SearchTarget support
- Introduces SEARCH_TARGET_LEGACY temporary to switch between plugin and sdk variants.
- Maps resultType and layoutType pairs to the appropriate view

Bug: 177223401
Test: Manual
Change-Id: If8d4bb7c21c47a12447dcb0c56eed8781bd21e54
2021-01-13 12:35:51 -06: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 1f79eeda76 Remove hardcoded itemTypes from SearchTarget
- Introduces componentName and userHandle members to SearchTarget
- SearchTargetEvent now has searchTarget member
- Builder pattern for SearchTarget and SearchTargetEvent
- Search backend should add headers manually instead of launcher inferring sections

Bug: 171026321
Test: Manual
Change-Id: I28e0455e82b925277a17703b9aa061c8f9f15262
2020-10-17 15:41:45 -07:00
Hilary Huo de9a5e109d [pixel-search] Change Nasa actions title name
Change-Id: I3e44513d797d867b97664ff2ee46a8e33d020e99
2020-09-29 15:31:04 -07:00
Hyunyoung Song f271139682 Thumbnail/Suggest view type support remote action
Bug: 169330678


Change-Id: I629d3e6b1622bf71e0174eb2489e976ef98875ad
2020-09-29 02:03:48 -07:00
Samuel Fufa 02be2a43f5 Support Remote actions
Bug: 168846477
Test: Manual
Change-Id: I7b9dc96bc7a8ccb25ccb4b7135880768256f1ef3
2020-09-24 14:28:49 -07:00
Samuel Fufa f01064953b Track search results with position and search Identifier
Bug: 169087008
Test: Manual
Change-Id: I54c74093b90e5aea03a7810f55fcc32f0ddf8dda
2020-09-23 01:04:26 -07:00
Hyunyoung Song e62c6edc5e Merge "Add thumbnail viewtype to SearchTarget Bug: 168825522" into ub-launcher3-master 2020-09-22 20:12:58 +00:00
Hyunyoung Song b3a0f1ffc0 Add thumbnail viewtype to SearchTarget
Bug: 168825522

Change-Id: I012665ef5e5ac66f37f9bdb37d55cc47726b29a9
2020-09-22 10:54:33 -07:00
Hyunyoung Song 35a0c59021 Add window focus / visibility changed signals to AllAppsSearchPlugin
Change-Id: Ieb48e398cca85dd4343e37fef0015f5e4fece86f
2020-09-21 15:49:24 -07:00
Hyunyoung Song 5e182b60c6 Add launcher state and activity lifecycle in AllAppsSearchPlugin
Bug: 165678938

Change-Id: Ica7c70ad66dcc1442ff5d0c638aaf0f1ada0fc36
2020-09-16 23:25:51 -07:00
Samuel Fufa f4eb70c96e Setup logging pipeline for search results
Bug: 168121204
Test: Manual
Change-Id: I4abb6c75aa0f22416616a713733bef2802b703d1
2020-09-10 17:28:42 -07:00
Samuel Fufa 7aa577d883 Show independent shortcuts from Hero view
Test: Manual
Screenshot: https://screenshot.googleplex.com/6iQGEZADXf9PtWz
Bug: 165320033
Change-Id: Ib8db1fc34da4adc39f3bec5557223a1e283380dd
2020-09-08 13:24:46 -07:00
Hyunyoung Song 5191fe9ba0 SearchTarget/SearchTargetEvent API
Bug: 165869384
Bug: 161599758

TL;DR;;
Also introduce some additional methods for
- all apps start and stop
- metrics logging

Change-Id: I666ff5a27a5f8befdb0db483ebb07344a90e96bc
2020-08-28 23:58:23 -07:00
Hyunyoung Song 6b670d62df Good riddance UserEventDispatcher [1/n]
Bug: 165675920
Change-Id: I237ed4243e1724b3c370c5660673bb3966bf4811
2020-08-24 21:19:09 -07:00
Hyunyoung Song 8cac927bdb Hookup existing AllAppsSearchPlugin interface to SearchBarController
Bug: 161801331

Change-Id: Ied575f78ad2139c6818ae5a13467b7399b9ab17a
2020-08-14 03:54:04 -07:00
Sunny Goyal 852537fd98 Using StatsLog for notifyingAppPredictor
> Adding a listener in StartsLogManager for listening to events.
  This allows events to be directored to the predictor only if
  it is already running, instead of creating it.
> Unifying the event format to be same as hotseat predictor

Bug: 160748731
Change-Id: Ib00e6249ff642c030f00bcad5b748255e704d16a
2020-07-16 14:12:15 -07:00
Hyunyoung Song ef9a6972ce AllAppsSearch interface change Version 3
Change-Id: I79f635582075a1e33e970e4f4eb6ec653572fefe
2020-05-27 17:16:56 -07:00
James O'Leary 74a2746b35 Compose gesture integrated fully into Launcher
- Support dismissing Compose via the reverse gesture from the appear
gesture
- Use Tony Wickham's ag/10204761 with some glue code to enable the
app below Compose panning in the same direction as the gesture as
Compose peeks in
- Add feature flag to use Compose hosted in a window (permits underlying
app panning)
- Use InterpolatingVelocityTracker to fix OtherActivityInputConsumer
processing swipes in the wrong direction ~20% of the time due to a bug
in VelocityTracker (see go/quirky-bubbles)

Change-Id: I3adbaee1763f21557fb628b60d03b0a03e7079ab
2020-05-14 14:18:19 -04:00
James O'Leary 2610bfde05 Revert "Compose gesture integrated fully into Launcher"
Revert "Compose gesture integrated fully into Nexus Launcher"

Revert submission 11035205-compose_gesture_fully_integrated_launcher

Reason for revert: Broke Launcher Android Studio build, quick switch, and home gesture doesn't work if Compose is open.
Reverted Changes:
I2d97b22d5:OverscrollPlugin refactored to use onTouchEvent
Ia19a55f65:Compose gesture integrated fully into Nexus Launch...
I65aa07ac1:Compose gesture integrated fully into Launcher

Change-Id: Ic05c47eb686b3942ba519e76db32977fc568844b
2020-05-07 00:13:47 +00:00
James O'Leary d9c86d4b3b Compose gesture integrated fully into Launcher
- Support dismissing Compose via the reverse gesture from the appear
gesture
- Use Tony Wickham's ag/10204761 with some glue code to enable the
app below Compose panning in the same direction as the gesture as
Compose peeks in
- Add feature flag to use Compose hosted in a window (permits underlying
app panning)
- Use InterpolatingVelocityTracker to fix OtherActivityInputConsumer
processing swipes in the wrong direction ~20% of the time due to a bug
in VelocityTracker (see go/quirky-bubbles)

Change-Id: I65aa07ac112db8bd89cec9acfa0ce2b6ebacd43f
2020-05-06 13:40:47 -04:00
Hyunyoung Song 3d57cd68db OWNERS file for AllAppsSearchPlugin for version increment
Change-Id: I1aedc9fac5802b3a6344c9ecd758caf8099e5902
2020-05-05 20:56:54 -07:00
Alex Mang 5c6b320057 Listening to progress of all apps transition.
This will be used to synchronize keyboard popup. Also setting edittext before disabling to allow plugin to perform some cleanup

Change-Id: Ib9b4ab33d4292fe5d827c37f33c546a9fe6cb002
2020-05-01 16:47:22 -07:00
Hilary Huo 7874996823 [AllAppsSearch] Update AllAppsSearch interface to expose the activity to the plugin
Tested=Locally

Change-Id: I8986eb50fea2091d8a1aea3cc1c5ee58e3692bc6
2020-04-28 16:34:42 -07:00
Hyunyoung Song 3f82135f06 Add AllAppsSearchPlugin
Bug: 151089843

Change-Id: I6d61fb9c7855bafee731f47147b3070a1b672071
2020-04-16 11:50:04 -07:00
Jon Miranda 7edcd7803f Makes spring variable dynamic resources so that they can be changed via plugin
Bug: 147302669
Change-Id: Ia4e74ff46a4d8338a56ea75ed826b69102c42d93
2020-03-02 18:48:23 -08:00
James O'Leary a9156a05c4 Compose overscroll gesture updates
Two changes for the latest Compose prototype:
1. Pass the identity of the underlying app to the Overscroll plugin.
2. Enable the Compose gesture over an app when there's a Recents extra
card plugin active (otherwise the current app won't count as the
rightmost one).

Some changes to the gesture:
- Angle decreased from 35° to 25° to remove overlap with
Assistant gesture
- Distance increased from 8 to 110 dp. 110 dp is 2x the Assistant
gesture and roughly the same as scrubbing into an app from Home.
- Fling detection added; uses same distance threshold, 110 dp.
- If a touch was recognized as another gesture, the touch will not be
reinterpreted as a Compose gesture, no matter what touch movement occurs
- Fixes issue where Assistant + Compose could both be triggered
- Fixes issue where scrubbing apps to the left, then back to the right,
would bring in Compose. i.e. if a touch down + touch movement starts
bringing in Assistant UI elements, then, the user moves their touch
below the Assistant angle, the Compose gesture will not start
being recognized
- Gesture length required for fling lowered from 110 dp to 40 dp, per
tuning with PM.

Bug: b/146508473
Change-Id: I414573d1a92684d1d992837a5f1df522346ec211
2019-12-23 10:59:30 -05:00
Sunny Goyal ec30c5ed51 Merge "Adding utility class to load customization resources for easier prototype" into ub-launcher3-master 2019-11-28 00:23:37 +00:00
Sreyas d567b58810 RecentsExtraCard
Bug fixing / formatting

Change-Id: If36cd64986cc213682af1c7b4fd3281909812c15
2019-11-11 16:19:01 -08:00
Sunny Goyal 7b97eebbe5 Adding utility class to load customization resources for easier prototype
Also adding support for grouping multiple plugins in same APK using process name

To customize resources update the defination of dymanic_resources in config.xml:
    <array name="dynamic_resources">
        <item>@color/delete_target_hover_tint</item>
        <item>@integer/config_folderDelay</item>
        <item>@dimen/all_apps_action_spacing</item>
        <item>@fraction/container_margin</item>
    </array>

Change-Id: I79c08845464510af96b16d375b424ad914657f39
2019-11-11 10:39:45 -08:00
James O'Leary 9e57e74005 QuickCaptureInputConsumer -> OverscrollInputConsumer + plugin
Test: Implemented plugin interface in Compose studiow build in
google_experimental, verified plugin shows up appropriately in
Launcher's home settings screen, verified gesture works if Compose
plugin enabled, and doesn't work if Compose plugin disabled.
Bug: n/a

Change-Id: Ica24ee8fe814ee02a1497a1bfbe7c7a24489b71e
2019-10-22 13:04:20 -04:00
Sreyas 59b148a440 Create hooks for Recents Card plugin.
This adds another card in the Recents Overview space which can show various items.

Change-Id: Ifc36639ece8aa6b554bdbd3256f4195b1b220d68
2019-10-11 11:48:22 -07:00
TreeHugger Robot a5eef260c6 Merge "Include following chagnes to custom widget plugin" into ub-launcher3-master 2019-09-26 18:56:01 +00:00
Pinyao Ting 7849482354 Include following chagnes to custom widget plugin
1. removed unsupported methods
2. auto-generate providerId
3. piggy-back context for the plugin to resolve resources

Bug: 139888225
Change-Id: If5014099eb80efd64025230037aae3d6079b69a0
2019-09-26 11:40:11 -07:00
Becky Qiu 90c303b6a7 Add OverviewScreenshotActions plugin interface and use it in TaskView.
Bug: 139828243
Change-Id: Idbefc11ef32619dd5eaaa5552088859eb2304e1e
2019-09-25 16:24:54 -07:00
Pinyao Ting f98f4d9d07 plugin for user event logging
am: fefe2c8374

Change-Id: I5052db2cd1fc0b1bfa28d3eaf986a59df63801ac
2019-09-19 08:21:45 -07:00
Pinyao Ting fefe2c8374 plugin for user event logging
Bug: 140243695
Change-Id: If9c620aa10334b26ad9b489d6544201d38439fea
2019-09-19 07:53:09 -07:00
Shashwat Razdan ae084dafd9 Added AppLaunchEventsPlugin which relays app launch/dismiss events to
all connected plugins.
Listener for this plugin is added in PredictionAppTracker which receives
all app events.

Change-Id: Iec53d20272f6a587f78e3d84666efa4f02cf6962
2019-09-16 13:27:13 -07:00
Sunny Goyal b1d7de25f8 Adding support for overlay and corresponding plugin to Launcher
Updating various task callbacks to handle overlays

Change-Id: I80077508ad35c31269c873f51f0105302a9e6a5d
2019-09-10 08:08:28 -07:00
Pinyao Ting c7a6c2979c migrate custom widgets in comply with plugin framework
Bug: 139888225
Change-Id: I8a3d0fe2689ad5ba24b19309728bbad0b6287f71
2019-08-30 12:06:22 -07:00
Danning Chen ba4077d9e0 Create a HotseatPlugin interface.
Change-Id: I382795262433879be4c4360fa12ab5bd1e41a297
2019-08-09 11:37:47 -07:00
Tony Wickham 6ec45c76cf Add FirstScreenWidget plugin interface
Bug: 115877296
Change-Id: I974300a6460677758cbe99cab3bb71339eb2928b
2018-10-22 13:20:34 -07:00
Tony Wickham 5c5c118c48 Add AllAppsRow plugin interface
Bug: 115877296
Change-Id: I750941f220d08ca9ee14067253253f6d81417101
2018-10-16 17:22:09 -07:00
Tony Wickham 76cce29d66 Add plugin support
- Add libs/plugin_core.jar
- Include plugin_core in Launcher3 build (it is already present other
  builds as part of the updated shared lib)
- Add PluginEnablerImpl that uses SharedPrefs to enable/disable plugin
  components
- Add src_plugins, where plugin interfaces will live. It has a build
  rule to create a jar that plugin projects will depend on.
- Copy PluginPreferencesFragment from sysui but using our implementation
  for PluginEnabler

Bug: 115877296
Change-Id: I3db54677eaceb10f92018c0f9d18920ad9ffac39
2018-10-10 14:02:56 -07:00