summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/Workspace.java
Commit message (Collapse)AuthorAgeFilesLines
* Adding A feature flag to disable widgets and a corresponding buildSunny Goyal2017-07-211-1/+9
| | | | | | | target Launcher3Go without widgets support Bug: 62353159 Change-Id: Ia03d2235a9bcf75f9ef191924f81630e63a2c684
* Fix regression which broke Workspace flings in RTLAdam Cohen2017-07-181-1/+1
| | | | | | issue 63815505 Change-Id: Iac2f66235c0d36c0df58da20f3e0aace14c190b7
* Set edgeMarginPx back to 8dp.Jon Miranda2017-07-131-0/+4
| | | | | | | | | | | | | With the new grid changes, it was set to 16dp but this caused an issue where the workspace page spacing was too large. To "restore" the original page spacing we set it back to 8dp. This caused an issue where the pages began to overlap. This CL changes the edgeMarginPx back to 8dp, and then adds the additional 8dp to the padding of the CellLayout. Bug: 63590728 Change-Id: Ie968d8bd81de19c726f73581d6609e3bc486c5ca
* Revert "Match items in icon preview with items in Folder using permutations."Jonathan Miranda2017-07-131-1/+1
| | | | | | This reverts commit 69c340a05e846b4b1b2d457164fd313e249df353. Change-Id: I4178b58e847a87e5cd7e5fa4b6886f0d72ba387b
* Fixing bug where tapping home while going from page 0 to 1 does nothingSunny Goyal2017-07-111-1/+1
| | | | | Bug: 63454716 Change-Id: Id8bd47388858b6eb866fa87b67307731c1aca2aa
* Merge "Mark off-screen pages as unimportant for accessibility" into ↵TreeHugger Robot2017-07-111-4/+9
|\ | | | | | | ub-launcher3-dorval-polish
| * Mark off-screen pages as unimportant for accessibilityTony2017-07-061-4/+9
| | | | | | | | | | | | | | | | | | | | | | ag/2458689 reduced page spacing, making it possible for adjacent pages to overlap the current viewport. Though you can't see this overlap due to paddings, this caused items on the edges of adjacent pages to be focusable in accessibility. Bug: 63335071 Change-Id: I1296e7a711e2f0af8fc8bedda70a94a7693c7055
* | Do not run page snap animation if already on the default pageSunny Goyal2017-07-101-6/+3
| | | | | | | | | | Bug: 63454716 Change-Id: Ibf3eea7f1b967c6e43042c87fd4545c03edf38e8
* | Move the PreviewItem drawing/animation logic to PreviewItemManager.Jon Miranda2017-07-061-1/+1
|/ | | | | | | | | We want this refactor in O-DR since we will be adding more animations: - closing from a non-first page (ag/2455887 b/36022592) - new on-drop animations *if we end up removing the permutation logic. Bug: 36022592 Change-Id: I82b8f5f5033d4fd9bd50fbe414b0fb721891d043
* Merge "Sanitizing various search container ids and layout names" into ↵TreeHugger Robot2017-07-041-3/+3
|\ | | | | | | ub-launcher3-dorval-polish
| * Sanitizing various search container ids and layout namesSunny Goyal2017-06-271-3/+3
| | | | | | | | | | Bug: 63014381 Change-Id: Ia75a8a048c7a85c6324f8861abd2bcf1721032fa
* | Add user event logging for page rearrangement and LEFT/RIGHT swipesHyunyoung Song2017-06-301-4/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Call logOverviewRearrange logging call ONLY when the order actually changed 2. Call logActionOnContainer when containers are swiped. Bug: 32457561 Bug: 32457561 06-30 11:23:04.082 6585 6585 D UserEvent: action:SWIPE direction=LEFT 06-30 11:23:04.082 6585 6585 D UserEvent: Source child:WORKSPACE id=2 06-30 11:23:04.082 6585 6585 D UserEvent: Elapsed container 50436 ms session 50436 ms action 0 ms 06-30 11:23:04.082 6585 6585 D UserEvent: isInLandscapeMode false 06-30 11:23:04.082 6585 6585 D UserEvent: isInMultiWindowMode false 06-30 11:23:08.266 6585 6585 D UserEvent: action:SWIPE direction=LEFT 06-30 11:23:08.266 6585 6585 D UserEvent: Source child:WORKSPACE id=1 06-30 11:23:08.266 6585 6585 D UserEvent: Elapsed container 54620 ms session 54620 ms action 0 ms 06-30 11:23:08.266 6585 6585 D UserEvent: isInLandscapeMode false 06-30 11:23:08.266 6585 6585 D UserEvent: isInMultiWindowMode false 06-30 11:23:10.742 6585 6585 D UserEvent: action:SWIPE direction=LEFT 06-30 11:23:10.742 6585 6585 D UserEvent: Source child:WORKSPACE id=0 06-30 11:23:10.742 6585 6585 D UserEvent: Elapsed container 57096 ms session 57096 ms action 0 ms 06-30 11:23:10.742 6585 6585 D UserEvent: isInLandscapeMode false 06-30 11:23:10.742 6585 6585 D UserEvent: isInMultiWindowMode false 06-30 11:23:17.286 6585 6585 D UserEvent: action:SWIPE direction=RIGHT 06-30 11:23:17.286 6585 6585 D UserEvent: Source child:WORKSPACE id=-1 06-30 11:23:17.286 6585 6585 D UserEvent: Elapsed container 63639 ms session 63639 ms action 0 ms 06-30 11:23:17.286 6585 6585 D UserEvent: isInLandscapeMode false 06-30 11:23:17.286 6585 6585 D UserEvent: isInMultiWindowMode false 06-30 11:23:19.879 6585 6585 D UserEvent: action:SWIPE direction=RIGHT 06-30 11:23:19.879 6585 6585 D UserEvent: Source child:WORKSPACE id=0 06-30 11:23:19.879 6585 6585 D UserEvent: Elapsed container 66233 ms session 66233 ms action 0 ms 06-30 11:23:19.879 6585 6585 D UserEvent: isInLandscapeMode false 06-30 11:23:19.879 6585 6585 D UserEvent: isInMultiWindowMode false 06-30 11:23:23.811 6585 6585 D UserEvent: action:SWIPE direction=RIGHT 06-30 11:23:23.811 6585 6585 D UserEvent: Source child:WORKSPACE id=1 06-30 11:23:23.811 6585 6585 D UserEvent: Elapsed container 70165 ms session 70165 ms action 0 ms 06-30 11:23:23.811 6585 6585 D UserEvent: isInLandscapeMode false 06-30 11:23:23.811 6585 6585 D UserEvent: isInMultiWindowMode false Change-Id: I11a48ee44aaa87863e76ccf2b46f499c28e96748
* | Match items in icon preview with items in Folder using permutations.Jon Miranda2017-06-281-1/+1
|/ | | | | | | | | | | | | | Before, with the FolderIconPreviewVerifier, we would adjust which items are displayed in the FolderIcon. This caused some issues where the apps in the folder icon would jump to whatever was in the upper left quadrant. Now, we always display the 4 first items in the icon by modifying the XY positions of the items within the Folder. Bug: 27944225 Bug: 35064148 Change-Id: I46c0fbb064d4da4da155e29963bfb92b14e40f07
* Merge "Revert edge glow effect and restore damped overscroll" into ↵TreeHugger Robot2017-06-271-24/+2
|\ | | | | | | ub-launcher3-dorval-polish
| * Revert edge glow effect and restore damped overscrollAdam Cohen2017-06-271-24/+2
| | | | | | | | | | | | Bug 62628421 Change-Id: Iab6ac567e98e63ade34de8817c3ae1f58c25ba19
* | Fixing drag outline not getting drawn when the shortcuts popup is shown.Hyunyoung Song2017-06-261-15/+1
|/ | | | | | | | | | Shortucts popup uses predrag listener to manage the transient state of the icon. Fixing the order of PredragListener, such that predragEnd gets called before dragStart. This allows the transient state to be cleared before any other state changes are done by onDragStart. Bug: 62544416 Change-Id: I77c9a1aa17a15fe6f9f342af7a7fe3092a9d026b
* Move PreviewBackground into its own class file.Jon Miranda2017-06-221-3/+4
| | | | | | | | | | This is done in preparation for new PreviewBackground animation where we will be animating in the first page preview items when closing the Folder from a non-first page. Bug: 36022592 Bug: 35064148 Change-Id: Id4d54da16ddfa852ca639a2dc8d328307d4d443a
* Removing view.isInTouchMode() because plaform returns false whenMario Bertschler2017-06-221-5/+0
| | | | | | | | using a mouse on long click. Bug: 38204847 Change-Id: I5b10e8251f4f0a7b148c0404d5939a0fa8325a46
* 1. Avoid object allocations during draw/layout operations (preallocateRajeev Kumar2017-06-161-31/+3
| | | | | | | | and reuse instead). 2. Prevent NPE in dereferencing mDragInfo. 3. Get rid of unused variable assignments. Change-Id: Ie74169795462d4dbdb61f84495ed1ec6ab2b0709
* Some cleanups in Workspace.java classRajeev Kumar2017-06-121-37/+34
| | | | | | | | | | 1. Make instance variables final 2. Get rid of explicit type arguments that can be inferred 3. Get rid of redundant initializer 4. Get rid of unnecessary ; Bug: 62466540 Change-Id: Ia534fb032c20447e604011d466aa3efdfade4027
* Removing QsbBlockerViewSunny Goyal2017-06-061-86/+4
| | | | | | | | | > Removing workspace state change listener. State change happens with hardware layer, so children should not be calling invalidatge() during the animation > Moving QSB inside the QSB and removing a floating layout Bug: 37616877 Change-Id: I9af3522a05dafa5796586bb64f512d98688caf79
* Defining a dark theme for launcherSunny Goyal2017-05-241-4/+1
| | | | | | | | > Removing the code for LIGHT_STATUS_BAR as that will be controlled by the theme > Updating icon cache to always use transparent background for low-res, as the theme can change the bg color Change-Id: Iab64ec29cab629ee515af22ec15b95d3f40a9df5
* Simplifying logic for managed for icon additionSunny Goyal2017-05-221-2/+3
| | | | | | | | | | | | | | | | | | | | > Checking for duplicate icons before adding new icons For O and above, icon addition is controlled using SessionCommitReceiver. As long as the Launcher is the default app, it will keep adding icons on the homescreen. Apps installed while launcher was not the default homescreen, no icons will be added. For below O, icons are added based on package event. As long as the Launcher process is running, it will keep adding icons on the homescreen. Apps installed while the launcher app was dead, no icons will be added. Bug: 37528649 Bug: 37082950 Bug: 34112546 Change-Id: Ic99501fa476c00474a479f2a36c24614bfa3f4bf
* Accessibility fixes for moving itemsTony Wickham2017-05-121-4/+6
|\ | | | | | | | | | | am: 0270039b98 Change-Id: I856b8980817dd36785f27e203c0ee6174b24e568
| * Accessibility fixes for moving itemsTony Wickham2017-05-111-4/+6
| | | | | | | | | | | | | | | | - Don't open popup when using "move item" action - Don't announce "Item moved" if dropping on original cell Bug: 33501751 Change-Id: I7236cd51fc00c357a1d7597e2fcb68c3a7c16b0b
* | Fix bug where deep shortcut drag view target was skewed to the right.Jon Miranda2017-05-091-0/+3
|\| | | | | | | | | | | am: aa6f66aad2 Change-Id: I87a99bfc52d7c8398099fc2230f02c0c7b6dee22
| * Fix bug where deep shortcut drag view target was skewed to the right.Jon Miranda2017-05-091-0/+3
| | | | | | | | | | Bug: 38140665 Change-Id: I9386bf70cf51b6be33264f85cbfe9e8049d0c32e
* | Disabling page fling while the overlay is movingSunny Goyal2017-05-081-0/+7
| | | | | | | | | | Bug: 37959201 Change-Id: I2278a46d10bc81855e10f97e669460e0d0b93daa
* | Merge "Update icon badges to match spec" into ub-launcher3-dorvalTony Wickham2017-04-251-8/+4
|\| | | | | | | | | | | am: 0fa96ea2f6 Change-Id: I5f8e6bdbca13435d54e3b636564f7d3eef58ca5c
| * Update icon badges to match specTony Wickham2017-04-251-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | - Size defined as percentage of app icon size - Width changes when there are 2 or 3 digits (round rect) - Offset slightly away from the app icon - Had to move drawing to BubbleTextView instead of FastBitmapDrawable - Hide badge when dragging and while popup is open - Tweaks for some color/text parameters Bug: 35744066 Change-Id: Ibb15ca634abaa0729aea637c904c4c6889a58c7c
* | Merge "Defining HomeScreenElementTheme for elements which appear on top of ↵Sunny Goyal2017-03-131-5/+4
|\ \ | | | | | | | | | wallpaper" into ub-launcher3-master
| * | Defining HomeScreenElementTheme for elements which appear on top ofSunny Goyal2017-02-171-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | wallpaper > Using HomeScreenElementTheme for workspace items > Fixing view inflation where wrong layout inflater was being used Change-Id: I92e278dbfb609ad7af9c2f47351f23f03cf12049
* | | Add checks for FeatureFlags.QSB_ON_FIRST_SCREENLouis Begin2017-03-091-1/+2
|\ \ \ | | |/ | |/| | | | | | | | | | am: b07a355fe2 Change-Id: Iae464c9acf99f8f66eb7c6a6b7f0567c79b447be
| * | Add checks for FeatureFlags.QSB_ON_FIRST_SCREENLouis Begin2017-03-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When false, it correctly does not show the QSB but leaves a default style search bar which cannot be removed. Add checks to control default view visibility in device profile layout & re-layout, QSB container and in Workspace's onMeasure Bug: 35967694 Change-Id: I3d0f89e1022d838eeb95762fd1fb3f7257956c41
* | | Separating the config and flags in different directories so thatSunny Goyal2017-03-071-5/+4
|/ / | | | | | | | | | | | | it is easier to override one or the other Bug: 36001650 Change-Id: I713f4f5dbcf902614ce9f6c7a73bdace7bdf1ea0
* / Close Folder before doing any automatic updates.Jon Miranda2017-02-281-1/+3
|/ | | | | | | | | | We already close the Folder when Work Profile apps are auto added to the Work Profile Folder. This change extends that functionality to when apps are being auto removed from the Work Profile Folder. Bug: 35845161 Change-Id: I2aa6a6a0ed28a95f6a59a549430f91482583548b
* Merge "Separating methods for updating the model to a sepatate class." into ↵TreeHugger Robot2017-02-161-4/+4
|\ | | | | | | ub-launcher3-master
| * Separating methods for updating the model to a sepatate class.Sunny Goyal2017-02-161-4/+4
| | | | | | | | | | | | | | Removing static access to model update methods, to allow for better access control and testing Change-Id: I9afe004dbf1b2fe50df422fd28bceea9230a4704
* | Animate badges when they are added or removedTony Wickham2017-02-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | - Scale the badge and text or icon up or down, respectively. - Only animate if the badge is visible, and don't animate when applying shortcut or app info. - Animate folder badge out when folder enters accepting state. Bug: 34838365 Bug: 32410600 Change-Id: Ie60cb1fc54fe60d72734d833040545d27660d645
* | Add badges to foldersTony Wickham2017-02-071-0/+21
| | | | | | | | | | | | | | | | | | - The folder badge contains the sum of the badge counts within. - This is represented by FolderBadgeInfo, a subclass of BadgeInfo. Bug: 34828806 Bug: 32410600 Change-Id: I977a69cc7baf80a7207af9adf98dddb0a3509c47
* | Updating the PreloadIconDrawableSunny Goyal2017-02-061-0/+1
| | | | | | | | | | | | | | | | | | > The drawable gets the path from MaskIconDrawable path, instead of using a circle > The progress changes are animated as well Bug: 34831873 Change-Id: I4e7f0b610f4fd94de8e0cfcf8b179b775cf0b4d8
* | Gracefully ignore items that don't support notificationsTony Wickham2017-02-021-2/+2
|/ | | | | | | | | | | | | PackageUserKey is only meant to be used for items that support notifications, so when trying to update it for an item that doesn't, we don't use it to check if the item has notifications. This fixes a crash that happens when trying to update notifications for a legacy shortcut, as such a shortcut doesn't have a component on its intent, which we were trying to use to populate PackageUserKey. Bug: 34842278 Change-Id: I8c69ccebbf9d93505d5b29ecd25d76c65610ddc4
* Fixes a bug where the workspace doesn't properly enter into freescroll modeMario Bertschler2017-01-311-4/+8
| | | | | | | | | | | | hence the overscroll will appear and you can wrongly enter into the -1 screen. The problem was that the state value in the workspace was set after enabling free scroll, but enabling free scroll checks the current state for validation. This bug was introduced by Icc3005fd431569e2b9e3f52d2249de8ba8d13eab. Bug: 34817798 Change-Id: I46802c93c49a2ae8ee5c40ef24e465d7fe63c4bb
* Updating the preview generation logic so that it aligns better withSunny Goyal2017-01-271-19/+37
| | | | | | | | | | | | the drag source image > Using common code for pending item drag (WidgetContainerView and PinItemDragListener) > Adding a shortcut-circuit in Workspace when a pendingItem can create a shortcut directly. Previously the multi-window drop was routing through onActivityResult which was causing some state information to be lost. Bug: 33584624 Change-Id: I0259870032185713caa9bff27092dbae6ce91199
* Refactor DeepShortcutsContainer to PopupContainerWithArrowTony Wickham2017-01-251-4/+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-0/+19
| | | | | | | | | | | | | | | | | | | | | - 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
* Merge "FastBitmapDrawable can draw an icon badge (notification count)" into ↵Tony Wickham2017-01-181-1/+1
|\ | | | | | | ub-launcher3-master
| * FastBitmapDrawable can draw an icon badge (notification count)Tony Wickham2017-01-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | - Added BadgeInfo to contain data to be shown in a badge (currently just notification count). - Added BadgeRenderer in DeviceProfile to contain things relevant to drawing the badge, such as size and Paint's. - Added IconPalette to compute colors for the badge based on a dominant color (will also be used for notifications) - FastBitmapDrawable uses these classes to draw the badge. Bug: 32410600 Change-Id: I6595a4879943357590f7d20c22594691a573ecaf
* | Removing static Context access using LauncherAppStateSunny Goyal2017-01-111-2/+1
|/ | | | | | | | > This ensures that LauncherAppState is only accessed in the presence of a valid context Bug: 33032833 Change-Id: I955e5cb022f8bd6374681ae6c0720a2666d5b750
* Fixing onPageBeginTransition not being called when scrolling overlaySunny Goyal2017-01-041-4/+2
| | | | | Bug: 33693546 Change-Id: If212a196648fbb2c725ca4800a157ec24f278ca8