1026 Commits

Author SHA1 Message Date
Jon Miranda
9593f9ed0c Fix bug where workspace is not aligned with hotseat in landscape.
The padding was added to the hotseat, but not to the workspace screens.
Only affects landscape where bottomPadding != 0.

Bug: 63996463
Change-Id: I8be0e36128963a1856d2effa76fdb2a6cfd966a8
2017-08-09 14:57:30 -07:00
TreeHugger Robot
a9c8c4adea Merge "Remove pulldown search feature flag Bug: 63713013" into ub-launcher3-master 2017-07-24 03:24:36 +00:00
Sunny Goyal
64a75aa305 Adding A feature flag to disable widgets and a corresponding build
target Launcher3Go without widgets support

Bug: 62353159
Change-Id: Ia03d2235a9bcf75f9ef191924f81630e63a2c684
2017-07-21 14:10:13 -07:00
Hyunyoung Song
09d8e4977b Remove pulldown search feature flag
Bug: 63713013

Change-Id: I81ad92678ed7aa429a7a85477121fa49502a6a92
2017-07-21 13:37:01 -07:00
Adam Cohen
5360b6ee4f Fix regression which broke Workspace flings in RTL
issue 63815505

Change-Id: Iac2f66235c0d36c0df58da20f3e0aace14c190b7
2017-07-18 16:19:35 -07:00
Jon Miranda
2803200697 Set edgeMarginPx back to 8dp.
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
2017-07-13 18:40:48 -07:00
Jonathan Miranda
8701cd58cf Revert "Match items in icon preview with items in Folder using permutations."
This reverts commit 69c340a05e.

Change-Id: I4178b58e847a87e5cd7e5fa4b6886f0d72ba387b
2017-07-13 16:49:33 -07:00
Sunny Goyal
c210f5b7ff Fixing bug where tapping home while going from page 0 to 1 does nothing
Bug: 63454716
Change-Id: Id8bd47388858b6eb866fa87b67307731c1aca2aa
2017-07-11 05:02:05 +00:00
TreeHugger Robot
65a2aa86db Merge "Mark off-screen pages as unimportant for accessibility" into ub-launcher3-dorval-polish 2017-07-11 01:01:26 +00:00
Sunny Goyal
5760ca1769 Do not run page snap animation if already on the default page
Bug: 63454716
Change-Id: Ibf3eea7f1b967c6e43042c87fd4545c03edf38e8
2017-07-10 12:52:27 -07:00
Jon Miranda
6c5d10261e Move the PreviewItem drawing/animation logic to PreviewItemManager.
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
2017-07-06 12:20:56 -07:00
Tony
6dea7cddf9 Mark off-screen pages as unimportant for accessibility
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
2017-07-06 11:32:53 -07:00
TreeHugger Robot
efbfcb838d Merge "Sanitizing various search container ids and layout names" into ub-launcher3-dorval-polish 2017-07-04 09:06:53 +00:00
Hyunyoung Song
3f5a11f3a5 Add user event logging for page rearrangement and LEFT/RIGHT swipes
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
2017-06-30 13:59:38 -07:00
Jon Miranda
69c340a05e Match items in icon preview with items in Folder using permutations.
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
2017-06-28 09:52:11 -07:00
Sunny Goyal
c7b8df8329 Sanitizing various search container ids and layout names
Bug: 63014381
Change-Id: Ia75a8a048c7a85c6324f8861abd2bcf1721032fa
2017-06-27 11:11:32 -07:00
TreeHugger Robot
89b5b918f0 Merge "Revert edge glow effect and restore damped overscroll" into ub-launcher3-dorval-polish 2017-06-27 16:38:49 +00:00
Adam Cohen
8d769d6620 Revert edge glow effect and restore damped overscroll
Bug 62628421

Change-Id: Iab6ac567e98e63ade34de8817c3ae1f58c25ba19
2017-06-27 09:29:34 -07:00
Hyunyoung Song
1322f9cb9a Fixing drag outline not getting drawn when the shortcuts popup is shown.
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
2017-06-26 11:25:01 -07:00
Jon Miranda
a0233f72be Move PreviewBackground into its own class file.
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
2017-06-22 18:34:45 -07:00
Mario Bertschler
cd04c89f89 Removing view.isInTouchMode() because plaform returns false when
using a mouse on long click.

Bug: 38204847

Change-Id: I5b10e8251f4f0a7b148c0404d5939a0fa8325a46
2017-06-22 09:29:46 -07:00
Rajeev Kumar
11c7bc678b 1. Avoid object allocations during draw/layout operations (preallocate
and reuse instead).
2. Prevent NPE in dereferencing mDragInfo.
3. Get rid of unused variable assignments.

Change-Id: Ie74169795462d4dbdb61f84495ed1ec6ab2b0709
2017-06-16 13:20:58 -07:00
Rajeev Kumar
93c0512b28 Some cleanups in Workspace.java class
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
2017-06-12 12:59:47 -07:00
Sunny Goyal
966d901af0 Removing QsbBlockerView
> 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
2017-06-06 16:48:25 -07:00
Sunny Goyal
368ae77201 Defining a dark theme for launcher
> 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
2017-05-24 14:34:04 -07:00
Sunny Goyal
a474a9bcf5 Simplifying logic for managed for icon addition
> 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
2017-05-22 13:31:04 -07:00
Tony Wickham
40d2702db4 Accessibility fixes for moving items
am: 0270039b98

Change-Id: I856b8980817dd36785f27e203c0ee6174b24e568
2017-05-12 21:29:15 +00:00
Tony Wickham
0270039b98 Accessibility fixes for moving items
- Don't open popup when using "move item" action
- Don't announce "Item moved" if dropping on original cell

Bug: 33501751
Change-Id: I7236cd51fc00c357a1d7597e2fcb68c3a7c16b0b
2017-05-11 15:20:28 -07:00
Jon Miranda
2c0c746a00 Fix bug where deep shortcut drag view target was skewed to the right.
am: aa6f66aad2

Change-Id: I87a99bfc52d7c8398099fc2230f02c0c7b6dee22
2017-05-09 20:35:17 +00:00
Jon Miranda
aa6f66aad2 Fix bug where deep shortcut drag view target was skewed to the right.
Bug: 38140665
Change-Id: I9386bf70cf51b6be33264f85cbfe9e8049d0c32e
2017-05-09 13:00:49 -07:00
Sunny Goyal
65d9ceb383 Disabling page fling while the overlay is moving
Bug: 37959201
Change-Id: I2278a46d10bc81855e10f97e669460e0d0b93daa
2017-05-08 12:10:32 -07:00
Tony Wickham
0e96f3fea9 Merge "Update icon badges to match spec" into ub-launcher3-dorval
am: 0fa96ea2f6

Change-Id: I5f8e6bdbca13435d54e3b636564f7d3eef58ca5c
2017-04-25 23:59:41 +00:00
Tony Wickham
1237df0a7c Update icon badges to match spec
- 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
2017-04-25 12:55:02 -07:00
Sunny Goyal
4eaacc7485 Merge "Defining HomeScreenElementTheme for elements which appear on top of wallpaper" into ub-launcher3-master 2017-03-13 18:58:03 +00:00
Louis Begin
c5332f4c04 Add checks for FeatureFlags.QSB_ON_FIRST_SCREEN
am: b07a355fe2

Change-Id: Iae464c9acf99f8f66eb7c6a6b7f0567c79b447be
2017-03-09 00:20:59 +00:00
Louis Begin
b07a355fe2 Add checks for FeatureFlags.QSB_ON_FIRST_SCREEN
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
2017-03-08 16:10:46 -08:00
Sunny Goyal
3d706ad703 Separating the config and flags in different directories so that
it is easier to override one or the other

Bug: 36001650
Change-Id: I713f4f5dbcf902614ce9f6c7a73bdace7bdf1ea0
2017-03-07 09:30:51 -08:00
Jon Miranda
608d0dba87 Close Folder before doing any automatic updates.
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
2017-02-28 13:15:28 -08:00
Sunny Goyal
9b29ca5add Defining HomeScreenElementTheme for elements which appear on top of
wallpaper

> Using HomeScreenElementTheme for workspace items
> Fixing view inflation where wrong layout inflater was being used

Change-Id: I92e278dbfb609ad7af9c2f47351f23f03cf12049
2017-02-17 11:37:30 -08:00
TreeHugger Robot
93bc3c1e41 Merge "Separating methods for updating the model to a sepatate class." into ub-launcher3-master 2017-02-16 21:56:39 +00:00
Sunny Goyal
43bf11d9c9 Separating methods for updating the model to a sepatate class.
Removing static access to model update methods, to allow for better
access control and testing

Change-Id: I9afe004dbf1b2fe50df422fd28bceea9230a4704
2017-02-16 13:50:14 -08:00
Tony Wickham
1e61849bc7 Animate badges when they are added or removed
- 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
2017-02-07 14:10:09 -08:00
Tony Wickham
11ba507eab Add badges to folders
- 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
2017-02-07 10:09:10 -08:00
Sunny Goyal
96ac68a481 Updating the PreloadIconDrawable
> 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
2017-02-06 10:43:27 -08:00
Tony Wickham
18a1b5da36 Gracefully ignore items that don't support notifications
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
2017-02-02 15:37:18 -08:00
Mario Bertschler
5a2edd65f2 Fixes a bug where the workspace doesn't properly enter into freescroll mode
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
2017-01-31 23:21:37 +00:00
Sunny Goyal
dec3a908bf Updating the preview generation logic so that it aligns better with
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
2017-01-27 15:09:10 -08:00
Tony Wickham
540913eadf Refactor DeepShortcutsContainer to PopupContainerWithArrow
- 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
2017-01-25 11:21:47 -08:00
Tony Wickham
010d255018 Add NotificationListener to launcher.
- 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
2017-01-25 09:51:06 -08:00
Tony Wickham
197f97bde4 Merge "FastBitmapDrawable can draw an icon badge (notification count)" into ub-launcher3-master 2017-01-18 22:36:17 +00:00