summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/shortcuts
Commit message (Collapse)AuthorAgeFilesLines
* Integrating suggested app by handling new status flags for shortcut items.Mario Bertschler2017-08-241-1/+1
| | | | | | | | Guarded via feature flag SUGGESTED_APP. Bug: 62483883 Change-Id: I7e0c8a9875bc37c435aa4316b44322a628cd4826
* Polish popupTony2017-07-051-12/+1
| | | | | | | | | - Remove divider between system shortcut header and shortcuts - Slightly reduce padding between popup and icon - Fix gravity to center in drag layer using x and y calculations since we use the y value to position the popup when removing notifications Change-Id: I1cb10ed953d11cc0924d8ee70881a434cb748317
* Popup visual changesTony Wickham2017-06-271-0/+4
| | | | | | | | | | | - Don't remove elevation during animation (b/62905720) - Other adjustments (b/35766387) - Add "gutter" between notification and shortcuts - Change shortcuts to always be primary color (e.g. white) - Scale down shortcut icons when notifications present - Apply icon extracted color to "Notifications" header Change-Id: Idf791dc76d15d05d246000ad73810916d7cd1750
* Removing view.isInTouchMode() because plaform returns false whenMario Bertschler2017-06-221-2/+2
| | | | | | | | using a mouse on long click. Bug: 38204847 Change-Id: I5b10e8251f4f0a7b148c0404d5939a0fa8325a46
* Adjust some sizes in popupTony Wickham2017-06-191-8/+41
| | | | | | | | | - Increase main notification height and pad text/icon bottom - Reduce shortcuts height when there are notifications to 48dp - When the last notification is dismissed, animate back to 56dp Bug: 35766387 Change-Id: I84f843c042137fdf93fa720802eb2f19337197b4
* Show more shortcuts when last notification is dimissedTony2017-06-151-8/+97
| | | | | | | | | | | | | | | | We currently only show 2 shortcuts when notifications are present, but support up to 4 otherwise. With this change, the hidden shortcuts are added back after dismissing the notifications, instead of only after closing and reopening the container. To ensure the transition is as elegant as possible, we also separated the shortcuts header from the rest of the shortcuts. That way we can reveal the new shortcuts without removing the header (the shortcuts come out from behind the header). Bug: 38036250 Change-Id: Ie9ab35f9be57cec1d5345e9e70e84e09ea52c9fc
* 1. Replace use of java.util.HashMap with android.util.ArrayMap inRajeev Kumar2017-06-121-8/+4
| | | | | | | | | ShortcutCache class 2. Get rid of unused constants from ShortcutCache class 3. Make instance variables final Bug: 62466540 Change-Id: I465da77aa1521790c8359d0f9987d3fc1286b44b
* Promise icons don't support popupTony2017-06-021-1/+3
| | | | | Bug: 62253847 Change-Id: I1123f3d1efad65e74957b1404b5b2c95ba392713
* Remove gap between popup itemsTony2017-05-311-51/+12
| | | | | | | | | | | | | - Unround interior corners - Update colors (shortcuts are gray when next to notifications, notifications always white) - Clean up animation to animate entire popup with simple reveal instead of individual items animating with reveal and icon scale Bug: 35766387 Bug: 36110804 Change-Id: I33685d53e2db3904731676123dc230be4dabb5d4
* Merge "Visual updates for popup" into ub-launcher3-dorvalTony2017-05-101-0/+9
|\ | | | | | | | | | | am: 5cfde85cb6 Change-Id: I4e97cb52054b5c5ff467f3481b92730f6f9a3e8e
| * Merge "Visual updates for popup" into ub-launcher3-dorvalTreeHugger Robot2017-05-101-0/+9
| |\
| | * Visual updates for popupTony2017-05-091-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Update some dimens - Increase left padding for shortcuts - Adjust arrow and notification ellipsis offset accordingly - Align shortcut dividers to be same width as text - Notification text 14sp instead of 15sp - Increase width of popup by 12dp - Shortcuts text 87% black instead of 54% - Arrow has same color as attached side, so takes on header gray instead of white when appropriate Bug: 37753827 Change-Id: I0844b85995f22218a3b7e605e1653cceaed6cda1
* | | Fix bug where deep shortcut drag view target was skewed to the right.Jon Miranda2017-05-091-1/+1
|\| | | | | | | | | | | | | | | | | am: aa6f66aad2 Change-Id: I87a99bfc52d7c8398099fc2230f02c0c7b6dee22
| * | Fix bug where deep shortcut drag view target was skewed to the right.Jon Miranda2017-05-091-1/+1
| |/ | | | | | | | | Bug: 38140665 Change-Id: I9386bf70cf51b6be33264f85cbfe9e8049d0c32e
* | resolve merge conflicts of 6f725f283 to ub-launcher3-masterTony Wickham2017-04-201-17/+45
|\| | | | | | | | | Test: I solemnly swear I tested this conflict resolution. Change-Id: I3559969b62a9a4b1ec04697109636e8cb0fd9fc8
| * Only add widgets system shortcut if widgets existTony Wickham2017-04-201-17/+45
| | | | | | | | | | | | | | | | | | | | | | | | Before we were adding it in a disabled state, and then enabling it once widgets were bound (if widgets existed for that app). Now we load all widgets when launcher starts so that we can use the values for the purpose of animating the popup container. Then, as the container opens, we reload widgets/shortcuts for that particular app and add/remove the widgets shortcut if necessary. Bug: 34940468 Change-Id: I64bd009442d10d3d1f9a977bdedfdb639a7dd193
* | Merge "Ensure system shortcut icons always appear in correct order" into ↵Tony Wickham2017-04-141-1/+3
|\| | | | | | | | | | | | | | | ub-launcher3-dorval am: 50ba921aa8 Change-Id: Ie296f30e81bea966e1cfc88b81b33cbc1b5bf6e0
| * Ensure system shortcut icons always appear in correct orderTony Wickham2017-04-131-1/+3
| | | | | | | | | | | | | | | | | | | | - Remove "|| true" that I accidentally left in from testing on a different CL - Always reverse system shortcut icons that appear in the header of the ShortcutsItemView, so they are in priority order from right to left Bug: 35766387 Change-Id: Ia7ac5a72eb2f6d3795e35bd044c426ef46fc0ccc
* | resolve merge conflicts of ce44516dd to ub-launcher3-masterTony Wickham2017-04-112-8/+3
|\| | | | | | | Change-Id: I6f4455c1d4bedf778850acbb1e1c7372d532e13a
| * Update popup to match redlinesTony Wickham2017-04-112-8/+3
| | | | | | | | | | | | | | | | | | | | | | - Update specs in dimens.xml and colors.xml - Move notification count to top right, and keep "Notifications" in left - Also removed NotificationHeaderView and instead use FrameLayout - Limit to 2 shortcuts instead of 3 if there are notifications - Use SP instead of DP for text (b/35869307) Bug: 35766387 Change-Id: I892640933ad6351946af3df6c805b98bb4e7cb50
* | resolve merge conflicts of 26b174659 to ub-launcher3-masterTony2017-03-302-29/+80
|\| | | | | | | | | Test: I solemnly swear I tested this conflict resolution. Change-Id: Ifb24f291b096b979044e5c87ec58c24e9c479728
| * Add support for system shortcuts in popup containerTony Wickham2017-03-302-29/+80
| | | | | | | | | | | | | | | | | | | | | | | | - Currently the system shortcuts are just widgets and app info - As shortcuts, they live in ShortcutsItemView - They are populated either as icons only (if there are deep shortcuts) or as icons + text - Widgets are disabled until binding them is complete (we request for them to be bound on long-press now). We should revisit this. Bug: 34940468 Change-Id: Ia51d002c3b3ede87658bdab57abfc3eeca1ed242
* | Minor Refactoring only: no functional changeMario Bertschler2017-03-282-5/+1
|/ | | | | | | | - organizing imports - remove redundant modifiers on LauncherCallback interface - fix typos Change-Id: I61eb985cac7c1379b6b804a67d4f234386d3d1b4
* Removing the profile extra from intent and using the profile id from the ↵Sunny Goyal2017-03-211-4/+1
| | | | | | | | | profile column The intent extra is not always correct as the profile id can change during backup restore. This allows us to use a consistant behavior everywhere. Change-Id: I004bd244204ca91758b1d42488e1fc13b0ccb998
* Merge deep shortcuts in rounded rectTony Wickham2017-03-012-4/+200
| | | | | | | | | | | | | | | | | - DeepShortcutViews are added to ShortcutsItemView, which is in PopupContainerWithArrow - Moved some shortcut-specific logic to ShortcutsItemView (namely, touch/long-click handling for draggin shortcuts) - Moved round-rect clipping to PopupItemView - Removed collapseToIcon() logic, including PillWidthRevealOutlineProvider, which was only used for that purpose. It isn't necessary now that the deep shortcuts have no background themselves. - Replaced focus pill drawable with ripple effect on shortcuts and notification view. Bug: 35766387 Change-Id: I6bc09f1851cfbb806df4bf75a6e435b0f1900c9c
* Launcher3: fix app shortcuts for suspended appsCharles He2017-02-211-1/+2
| | | | | | | | | | | | | | | | | | This CL fixes app shortcuts for suspended packages. 1) When DO/PO suspends an app, its pinned shortcuts are instantly grayed out, but this is not persisted after the launcher restarts (e.g. device reboot). We now enforce the launcher to check the suspended state when loading the workspace, and gray out pinned shortcut icons accordingly. 2) When DO/PO suspends an app, its app shortcut popup is still available. We now temporarily disable the popup when the app is suspended, and persist the state across restarts. Bug: 32365540 Test: manual, by following the steps in the bug above Test: manual, by restarting the launcher package Change-Id: I983d7c17fa198beca23b66459b50bd67b447bdd2
* Refactor DeepShortcutsContainer to PopupContainerWithArrowTony Wickham2017-01-253-973/+5
| | | | | | | | | | | - Also added PopupItemView, which takes animation logic from DeepShortcutView, and which DeepShortcutView now extends. - Renamed ShortcutFilter to PopupPopulator, which has support for new item types (not yet used). Also moved populating logic (e.g. UpdateShortcutChild Runnable) to PopupPopulator. Bug: 32410600 Change-Id: Ib6e444ac7ca99c80ba438801c26e62d9542e0ad9
* Add NotificationListener to launcher.Tony Wickham2017-01-251-1/+2
| | | | | | | | | | | | | | | | | | | | | - NotificationListener extends NotificationListenerService, and is added to the manifest. - Added PopupDataProvider, which contains logic for storing and interacting with data that goes into the long-press popup menu (shortcuts and notifications). A follow-up CL will rename DeepShortcutsContainer to a generic PopupContainerWithArrow. - If Launcher has notification access, NotificationListener will get callbacks when notifications are posted and removed; upon receiving these callbacks, NotificationListener passes them to PopupDataProvider via a NotificationsChangedListener interface. - Upon receiving the changed notifications, PopupDataProvider maps them to the corresponding package/user and tells launcher to update relevant icons on the workspace and all apps. This is guarded by FeatureFlags.BADGE_ICONS. Bug: 32410600 Change-Id: I59aeb31a7f92399c9c4b831ab551e51e13f44f5c
* Fix shortcuts alignment in landscapeTony Wickham2017-01-201-8/+57
| | | | | | | | | | | | - Take left inset into account. - If there is no way to orient the shortcuts next to the icon, instead center it in the drag layer and don't draw the arrow. - If possible, place the shortcuts to the left or right of the icon when centered vertically. If for whatever reason that isn't possible, center the shortcuts horizontally as well. Bug: 33421656 Change-Id: I838b30ea487e0f7c64637db1cb8991ca3ee16bf9
* Moving icon generation out of ShortcutInfo constructor so that itSunny Goyal2017-01-182-40/+23
| | | | | | can be created on the UI thread Change-Id: If84e52041eb4ab20807f5cfd4b7f31d7b5f381ed
* Enforcing background thread when accessing iconCacheDb.Sunny Goyal2017-01-101-2/+10
| | | | | | | | > Moving any icon cache access to background thread > Updating Apps list to avoid loading icons for ignored apps Bug: 21325319 Change-Id: Id72755100f1176ccfcc99249c5e02873cc249a13
* Simplifying IconCache access codeSunny Goyal2017-01-032-9/+3
| | | | | | | | Providing a way to access icon cache without LauncherAcitivtiyInfo. This allows fetching LauncherActivityInfo only when required, thus avoiding system RPC when the icon is already in cache. Change-Id: I92918c7a0d0d0796e5f7b70d4ecb6787c52c6600
* Fix clipping of drag outline by increasing padding.Jon Miranda2016-12-201-3/+3
| | | | | | | Low resolution will be addressed in future CL. Bug: 31915722 Change-Id: I6bdd32b7a30819fde1f15473a63ac280029b6715
* No more UserHandleCompatSunny Goyal2016-12-154-22/+21
| | | | | Bug: 32745285 Change-Id: I762fb4e268c1afe48a1860ab12a4ccb3f626aa95
* Merge "Ensuring that ShortcutInfo always has an icon" into ub-launcher3-masterSunny Goyal2016-12-161-4/+1
|\
| * Ensuring that ShortcutInfo always has an iconSunny Goyal2016-12-131-4/+1
| | | | | | | | | | | | | | | | | | > Making iconBitmap public instead of a getter (similar to AppInfo) > Removing getIcon() which can lead to IO on UI thread > Removing updateIcon and handling the update at the caller Bug: 21325319 Change-Id: I6a49b9043f974e9629ea25e77012d97cc04c0594
* | Using java_style enum generation for protoSunny Goyal2016-12-151-3/+4
| | | | | | | | | | | | | | This makes it easier to track various method parameters and simplifies debug logging Change-Id: Ib7c3d52590d0c36b2c8460c889ee3bead3454569
* | Refactoring FlingToDeleteSunny Goyal2016-12-131-10/+0
|/ | | | | | | | | | > Moving all fling related logic to FlingToDeleteHelper from DragController > Removing fling related methods from DragSource and DropTarget > Moving fling animation logic from DeleteDropTarget to FlingAnimation > Simplifying DropTargetBar to directly look for all valid drop targets. This makes it easier to add new DropTarget in xml. Change-Id: I7214d2d30c907ab93c80d92d9f9be6dda2d63354
* Changing DeepShortcutManager to have a singleton contructor insteadSunny Goyal2016-11-212-3/+14
| | | | | | | | | | of getting it from LauncherAppState This follows the design of other managers and makes it easier to access it from other processes and non-ui thread. Bug: 33032833 Change-Id: I8ad82ae5b6cc47bae885f9896985675c7dd0d5b8
* Updating version check method namesSunny Goyal2016-11-021-6/+6
| | | | Change-Id: If98851677545a9bbb9de308c23ff5c155a61a8bf
* Intercept touches in DeepShortcutContainer after moving beyond touch slopTony Wickham2016-10-311-0/+14
| | | | | | | | Otherwise it's possible for a long press to trigger when swiping on a shortcut, which causes it to drag far away from the finger. Bug: 32309824 Change-Id: I40bd5c1daac49d6edb59744083a1e23dcf4f0ce6
* Consume touch events in DeepShortcutsContainerTony Wickham2016-10-271-0/+10
| | | | | | | | | Previously, touches along the horizontal area next to the deep shortcuts arrow went through to the background, allowing things like going to overview with the shortcuts still open. Bug: 32477287 Change-Id: I82d21d3051a13b23dfaac19e93facee120968aaa
* Don't allow multiple shortcuts to be dragged simultaneously.Tony Wickham2016-10-211-1/+3
| | | | | | | | When starting a drag when another is already in progress, the original drag view is left dangling until launcher is killed. Bug: 32231238 Change-Id: I5ff94b82971c539231f8f588059dc84845cc88f0
* Refactoring floating view opening/closing logicSunny Goyal2016-10-101-12/+30
| | | | | | | | | > Creating a base view for floating panels with some common methods > Moving the getOpen method to individual classes > Moving the folder icon animation logic to folder icon > Moving all the logic related for opening folder to Folder class Change-Id: I898dfb6870b857cb921d2729b89618bc43ff2e88
* Refactors in UserEventDispatcherHyunyoung Song2016-10-061-1/+1
| | | | | | - LaunchSource -> LogContainer Change-Id: I71bfee992fb1ba7ae80e824d419f7bf8d3020999
* Update pre-drag lifecycle for apps with shortcuts.Tony Wickham2016-10-041-30/+19
| | | | | | | | | | | | | | | | - First of all, deferred drag has been renamed to pre-drag to avoid confusion with the existing deferred end drag. - For normal drags, the cycle is still startDrag --> onDragStart --> onDrop --> onDropComplete --> onDragEnd. - Pre-drags have two additional callbacks: onPreDragStart and onPreDragEnd. onPreDragStart is called between startDrag and onDragStart, and onPreDragEnd is called at the same time as onDragStart or onDragEnd. - If the pre-drag has not transitioned to a full drag before onDragEnd, onDragStart and onDropComplete are skipped (onDrop is still called to allow the DragView to animate). Change-Id: Icd7a8f75d5fcc159f9a52758c22ab6eae3edb9e2
* Merge "Exposing custom actions using keyboard shortcut" into ub-launcher3-masterSunny Goyal2016-10-031-0/+4
|\
| * Exposing custom actions using keyboard shortcutSunny Goyal2016-09-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Keyboard shortcuts: ctrl+A => Open all apps ctrl+S => shows deep shortcuts ctrl+O => shows custom actions popup This also removes the direct delete/uninstall key shortcuts, making actidental icon removal less likely Bug: 24065447 Change-Id: Iae63370c0f33620628567cffd4df024064d4d02e
* | Removing some TODOs with proper system APISunny Goyal2016-09-301-9/+4
| | | | | | | | Change-Id: I0d0e667cd6af8a7b9dbf3d0fd417f009ae402519
* | resolve merge conflicts of 6e74e89 to ub-launcher3-masterTony2016-09-232-370/+32
|\ \ | | | | | | | | | Change-Id: I34e449ca3a91ee06e1983ac3a83cb7ca53567a91