Commit Graph

130 Commits

Author SHA1 Message Date
Schneider Victor-tulias
16e04e29d2 Generalize the icon popup menu types.
Generalized popup menu types and logic to allow wider uses outside of launcher.

Bug: 198438631
Test: long pressed launcher icons and pressed menu options
Change-Id: Iadcbb1796496c0061dcee362784e426ff55dc94a
2021-10-19 16:06:16 -07:00
Brian Isganitis
6a1b0a5824 Have PopContainerWithArrow require BaseDraggingActivity.
Fix: 201978182
Test: No
Change-Id: I3ed46c07cce88b939d1a085ab62d5413ca217e5a
2021-10-05 14:38:14 -04:00
Brian Isganitis
1e34f65395 Update arrow color after all notifications dismissed.
assignMarginsAndBackgrounds updates determines the new arrow color, but
it doesn't actually update it. That is normally done in
updateArrowColor.

Test: Icon menu arrow color changes to content above it after notification
dots dismissed.
Fix: 201458705

Change-Id: I5ee40b420b03c29c197983af5968d4f2902bc59b
2021-09-29 16:29:16 +00:00
Brian Isganitis
a85ae69c72 Refactor arrow popups to allow easier code overriding and sharing.
Test: Existing menus work as intended.
Bug: 188222480
Change-Id: I7d19b06ce8bb7d765624c64c0042c4efd6faf348
2021-09-24 20:32:14 -04:00
sfufa@google.com
78e7b24eb7 Restore hidden text on Popup close
When handleClose is called with no animation, overridden closeComplete gets fired before mOpen is set to false inside the super class. This results in getOpenView(launcher, TYPE_ACTION_POPUP) returning self and breaking text visibility restore.

Bug: 183713889
Test: Long press on allapps/workspace item to show PopUp under it; on popup open, capture screenshot, start a sharing activity, return to launcher and verify popup dismissed and text restored.
Change-Id: Iae8d2c73e4b7f57708468bf47bb0983a30ebbddc
2021-09-20 06:21:59 +00:00
Jon Miranda
f3bbd98bf8 Allow users to dismiss notifications in popup view.
Bug: 193014051
Test: - dismiss notifications (left/right)
      - open popup, dismiss notification from shade
        and ensure popup gets updates
      - open popup, trigger new notification
        and ensure popup gets updated

Change-Id: Iea4d458218cbf5cb22f5f89aa0a4cc1bee18cc73
2021-08-30 20:38:16 +00:00
Jon Miranda
313b2c2d28 Update notification popup UI.
- Update UI to match specs.
- Only shows one notification (removed footer, animation code)

Bug: 175329686
Bug: 190402054
Test: open popup, dismiss notification from shade,
      open popup, click on notification
      checked RTL

Change-Id: I92672f94233d986ae5b5c54979980967308cb156
2021-06-18 22:42:44 +00:00
Jon Miranda
229c4c3235 App Shortcut menu bug fixes and polish.
- Widget is its own item.
- Change order of icon order.
- Update grab handle colors

Bug: 188095695
Test: long press on apps with/without widgets, long press apps on workspace/
      all apps/search

Change-Id: Iabb9b4b3f3a928103b9d62601f22e74ef2325d7c
2021-06-15 18:59:51 -07:00
Jon Miranda
32ff76cb4e Adding color back to popup container.
For Color exctraction now occurs in groups:
- System shortcuts
- Deep shortcuts
- Notifications

For home setting popup, each DeepShortcutView will have its own
extracted color.

Bug: 188095443
Test: manual
Change-Id: I7e209f863ff180b8f017aeb2a73c6f1a51842e68
2021-06-10 19:15:24 +00:00
Jon Miranda
35c5477d5c Remove color extraction from popup arrow, add shadows.
Bug: 175329686
Bug: 187014675
Test: manual

Change-Id: I84a3f23b7a9ceef004a2b1b66e5f8a10585bd113
2021-05-11 17:35:01 -07:00
Jon Miranda
a3c8662a56 Use separate color for popup when on top of another surface (folder/all apps).
This ensures the two surfaces contrast.

Bug: 175329686
Test: long press on item in folder
Change-Id: Ic2ac9c433ce219452024071388fa0cfb51487fb6
2021-04-26 17:59:21 -04:00
Jon Miranda
2a58d13b9b Add separate background colors to each popup container child.
- Colors interpolate between the primary and secondary popup colors
- Removed condensed height and icon scale

Bug: 175329686
Test: visual, manual checking apps with different shortcut options
Change-Id: I064c329dc8ad3ae6f408056c74372cca3ce20b68
2021-03-19 13:41:07 -04:00
Jon Miranda
c79316740b Update deep shortcut to new ui.
- Removed divider views, using margin to separate views
- Removed elevations
- Added a ViewGroup to hold all notification views, and applied an outline

Bug: 175329686
Test: visual
Change-Id: Iad70dcfdaeba6050c2b17c07f76bb7bfb728e544
2021-03-18 11:09:34 -04:00
Sunny Goyal
384b578ab2 Removing menu and dialog for custom actions hanlding.
These do not work well with gesture-nav and can potentially
block the Launcher UI.

Instead exposing on custom actions with keyboard accelerator and
using thee internal arrowPopup for resize options
Fixing SecondoryDropTarget not sending appropriate stats log

Bug: 179854703
Test: Verified on device
Change-Id: I268690f8a937896e4350496128a38959003f8939
2021-02-16 10:45:06 -08:00
Sunny Goyal
1818fb7a6e Dismissing popup if the underlying icon no longer supports it
Bug: 168641545
Change-Id: Ia4f44819af02397efaead935db3fc8e305e47ba7
2020-11-09 14:33:24 -08:00
Hyunyoung Song
95786e077d Good riddance UserEventDispatcher
Bug: 165675920
Bug: 161381246

TL;DR;;
- nano -> lite proto
- add all the missing logs to WW
- pin item related logging fix
- Removed logging for assistant

sgrep "com.android.launcher3.userevent.nano." | cut -f1 -d: | xargs sed -i -e 's/userevent\.nano\./userevent\./g'

Change-Id: Ie2a49fdd891cacbd7ef40a1dc9e41ff0574c7517
2020-09-27 13:41:49 -07:00
Hyunyoung Song
6b670d62df Good riddance UserEventDispatcher [1/n]
Bug: 165675920
Change-Id: I237ed4243e1724b3c370c5660673bb3966bf4811
2020-08-24 21:19:09 -07:00
Sunny Goyal
eaf7a95546 Changing minimum supported Launcher version to 26
Change-Id: I49fcf874430ac53c3246371e179fbd828e14e4da
2020-07-29 17:30:19 -07:00
thiruram
63bf8eedf9 Add WW log for drag events from longpress popup window.
Bug: 157765763
Sample Log: https://docs.google.com/document/d/1CBP2yTcXdFhPdNG5ZmWFKSgd8mDbMevY-akVlUXPLDo/edit#bookmark=id.368csp9y1pwc

Change-Id: I73024f2c8010e77b6f89829fda64130f54ff81f1
2020-06-01 21:55:25 +00:00
Tony Wickham
cf7552af3f Add tooltip when long pressing system shortcut icon
If we only show the icon view (rather than icon + label),
show the label on long press.

Bug: 148707493
Change-Id: I14ab45b43203375b573e5e5d937ad5ebfb016d83
2020-04-10 13:28:53 -07:00
Sunny Goyal
e396abf502 Moving model data structures to a separate file
Change-Id: I77ad7a5219e72d2e0d6c1803de2ac3ed6a65a8f7
2020-04-09 13:20:39 -07:00
Jon Miranda
ff65674a10 Remove accessibility long click option if no long click action occurs.
Bug: 149370403
Change-Id: Ifdbd673a53229c76a99f7b8ef9569db7195481a2
2020-04-01 12:02:07 -07:00
Adam Cohen
650869973a Refactor / Cleanup / Simplify a bunch of dnd related rendering / animation
Addresses:
=> Fix folder icon drop location mapping (was very far off)
=> Fix BubbleTextView drop animation shifted by a few pixels
=> Get rid multiple unnecessary calls to setDragMode(none), was breaking
   some of the reorder flow; still some issues to address here.
=> Fix folder icon parallax (didn't work when the folder had a dot)

Test: manual

Change-Id: I5959cf341996f75d30212353ec096ed25bf40ea5
2020-03-21 01:26:09 +00:00
Samuel Fufa
a579ddc9c8 Refactor logging to capture Target hierarchy
Instead of creating a fixed number of targets, we now pass an ArrayList
of targets to. Any class implementing
LogContainerProviders#fillInLogContainerData can setup it's own target
and add it to the ArrayList, It can also pass the ArrayList to other
LogContainerProvider to capture full Target hierarchy.

Bug: 147305863
Change-Id: I0063c692120fb9e1cff2d8902c5da972d0623418
2020-03-06 13:49:19 -08:00
Andy Wickham
27d3c595cf Makes all ArrowPopups AccessibilityTargets.
This currently includes the menu that pops up when
long pressing an app icon in Launcher or Search, or
long pressing Smartspace. Previously, only the menu
for Launcher apps grabbed accessibility focus after
the open animation completed, and now all three do.

Fixes: 145253300
Change-Id: I147b45d38a04ab9a55eee9b5bd5551b4c7185fcf
2020-02-20 20:36:16 +00:00
Vadim Tryshev
47b3588ba5 Revert "Enabling testPressHomeOnAllAppsContextMenu while fixing failure cause"
This reverts commit c2842d8f4a.

Reason for revert: CL broke TaplTestsLauncher3.testDevicePressMenu in 2-button mode

Change-Id: Idebda69a36b94686415434e8e3f158a8a7abc5bb
2020-02-15 02:25:35 +00:00
vadimt
c2842d8f4a Enabling testPressHomeOnAllAppsContextMenu while fixing failure cause
Change-Id: I012d5144651f5e7fb362caaef6eec8cee7622fb4
2020-02-14 14:50:28 -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
TreeHugger Robot
e16a2ba379 Merge "Add null check before updating NotificationItemView" into ub-launcher3-master 2020-01-15 02:44:08 +00:00
Samuel Fufa
a18eb686d0 Add dismiss option for hotseat items
Bug: 145556909
Test:Manual
Change-Id: Ia40d22226b5cf9482f19f82ef08e399d294be6da
2020-01-06 16:40:24 -08:00
Tony Wickham
899557c048 Add null check before updating NotificationItemView
It's possible that the notifications were removed between the popup opening
and updating its UI. In that case, mNotificationItemView will be null.

Bug: 146152941
Change-Id: I60b44ea6d766720613cf2f25481fa3fc17cab6af
2019-12-13 15:23:21 -08:00
Tony Wickham
59a53e4a43 Merge "Maintain dot and text visibility if a new popup is created while closing" into ub-launcher3-qt-future-dev
am: c1fafebd47

Change-Id: I64870047d8bbcdcbc01b767da52c734f946480af
2019-11-01 16:59:22 -07:00
Tony Wickham
20af12eb38 Maintain dot and text visibility if a new popup is created while closing
Test:
- Long press an icon to open the popup
- Long press the same icon while the popup is open

Previously, the dot would reappear (when the original popup finished closing).
Now, the dot stays hidden, as it should since a popup is showing.

Bug: 143639898
Change-Id: Ia0bdb626e02f4ad9ba12c27d94fea054b4afe50e
2019-11-01 13:26:40 -07:00
TreeHugger Robot
bec28445ea Merge "Removing tracing for a fixed bug" into ub-launcher3-master 2019-10-29 00:32:31 +00:00
vadimt
5631b4a7ef Removing tracing for a fixed bug
Bug: 141770616
Change-Id: I52ec681eca20733021090fe50058bc7d3f996ade
2019-10-28 16:59:45 -07:00
Sunny Goyal
3808a69a6c Storing BitmapInfo instead of icon and color directly in itemInfo
This will allow subclassing BitmapInfo to support custom icon/dynamic
icons which can be loaded on the background thread instead of going
through IconFactory which runs on UiThread

Change-Id: Ieced6e91330bdff1b505826d097a8df711dfe967
2019-10-28 11:12:47 -07:00
Sunny Goyal
3a1eadd37b Adding support for remote app action provider.
> Connect to a predefined content provider to get package specific action
> Add that action to shortcut menu and task menu

Change-Id: Ide5c09d04112e86c8e19c2f9e66c88c15b3fd04e
2019-10-23 17:51:13 -07:00
Sunny Goyal
7805d49764 Separating SystemShortcut and Factory
> This makes easier to extend the factory and callbacks separately
> Availability checks are only performed once when getting the shortcut

Change-Id: I413541eabfb2b9e987c852d5171c6696b1853958
2019-10-23 12:57:50 -07:00
vadimt
10b1414778 Merge "Adding debug tracing for a flake" into ub-launcher3-qt-qpr1-dev
am: 1a02173321

Change-Id: Id1feb3f64191475472bdfceac309b6e26869a1e6
2019-09-28 01:07:55 -07:00
vadimt
3895d9b642 Adding debug tracing for a flake
Bug: 141770616
Change-Id: I6413ca6ce380eede817ae2418d5a1bc04c091270
2019-09-27 17:55:48 -07:00
Jon Miranda
a87abbad31 resolve merge conflicts of 1bd96b1e96 to ub-launcher3-qt-future-dev
Test: I solemnly swear I tested this conflict resolution.
Bug: None
Change-Id: Ide6c914d4e69eb4fa70d6634780324cd45a21610
2019-09-06 11:35:34 -07:00
Jon Miranda
9b78e190fa Update app open/close animations.
- For app open, the icon text remains where it is and only the icon moves.
- Similarly for app close, the icon text remains where it is and fades in
  with the rest of the other icons text.

- With this change, the original view is always "VISIBLE"
  (if BubbleTextView/FolderIcon) but we hide certain elements.

Added video to bug.

Bug: 137200188
Bug: 139885365
Change-Id: I3d20c5f05bc7c0b9d052d8074ac3bfc21531c83d
Merged-In: I3d20c5f05bc7c0b9d052d8074ac3bfc21531c83d
2019-09-04 21:45:05 +00:00
Samuel Fufa
03302548ae Close shortcut menu after launching from hotseat
+ Fixed bug where popup menu does not close when animations are disabled.

Test: Manual
Bug:123298377
Change-Id: I863241158e09a618af6243d8afd70549421013d0
2019-08-23 10:54:57 -07:00
Sunny Goyal
6fe3eec95c Moving various common executors to a single location
Change-Id: I44bca49b8adb6fa22c3b48d10f674e42c28d792c
2019-08-20 14:36:17 -07:00
Pinyao Ting
e4061fc931 show dot in deep shortcuts when notification contains exactly identical
set of person

Bug: 132336512
Change-Id: I975524e28168c10a186cdc24b188c161faf433cf
Merged-In: I975524e28168c10a186cdc24b188c161faf433cf
2019-08-05 23:31:35 -07:00
Pinyao Ting
49a3e699f9 show dot in deep shortcuts when notification contains exactly identical
set of person

Bug: 132336512
Change-Id: I975524e28168c10a186cdc24b188c161faf433cf
2019-08-05 20:41:58 -07:00
vadimt
7a4ed2f258 Removing tracing for fixed bugs
Bug: 133009122
Bug: 133765434
Bug: 134532571
Change-Id: I37aa1851a1bc0874c0b9acf561bde28966e9b523
2019-07-15 18:48:06 -07:00
vadimt
34b2f03b30 More tracing for b/133009122
Bug: 133009122
Change-Id: I09a95b88ea55e1759151b2bcd5ede0c1efa38e7e
2019-06-10 11:26:37 -07:00
Sunny Goyal
878aa33567 Using squared hypot to optimize some comparisions
Change-Id: Ia5b99c2e60eedf02dea26857819f0e13127db4e2
2019-05-20 15:20:47 -07:00
vadimt
8649cf29e4 Remove tracing for fixed bugs
Bug: 129434166
Bug: 131170582
Change-Id: Ia9b356594001d96c69ffbb7f8b767b2f54ed5feb
2019-05-01 16:10:56 -07:00