OSDN Git Service

android-x86/packages-apps-Launcher3.git
7 years agoImport translations. DO NOT MERGE
Bill Yi [Fri, 17 Feb 2017 07:40:20 +0000 (07:40 +0000)]
Import translations. DO NOT MERGE
am: e5c99a2140  -s ours

Change-Id: Ifffdd23bc65534039a330bf77ceffaba418982ba

7 years agoImport translations. DO NOT MERGE
Bill Yi [Fri, 17 Feb 2017 07:30:20 +0000 (23:30 -0800)]
Import translations. DO NOT MERGE

Change-Id: If87152e5d565c37127110756f1185f82833ec685
Auto-generated-cl: translation import

7 years agoMerge "Add notification listener back to the manifest" into ub-launcher3-master
Adam Cohen [Fri, 17 Feb 2017 00:50:57 +0000 (00:50 +0000)]
Merge "Add notification listener back to the manifest" into ub-launcher3-master

7 years agoAdd notification listener back to the manifest
Tony [Mon, 13 Feb 2017 15:44:01 +0000 (07:44 -0800)]
Add notification listener back to the manifest

This reverts commit d27b65d4d0035d6b66aac3e6040aa791f155e502.

Also added boolean to values/ and values-v25/ and values-v26/
to enabled/disable the listener by API version.

Bug: 35443111
Bug: 33553066
Change-Id: I69465c720f3b3eca7ae2025e01c315720862bec8

7 years agoMerge "Ensure that filtered notifications are removed from BadgeInfo." into ub-launch...
Tony Wickham [Thu, 16 Feb 2017 23:17:31 +0000 (23:17 +0000)]
Merge "Ensure that filtered notifications are removed from BadgeInfo." into ub-launcher3-master

7 years agoMerge "Separating methods for updating the model to a sepatate class." into ub-launch...
TreeHugger Robot [Thu, 16 Feb 2017 21:56:39 +0000 (21:56 +0000)]
Merge "Separating methods for updating the model to a sepatate class." into ub-launcher3-master

7 years agoSeparating methods for updating the model to a sepatate class.
Sunny Goyal [Thu, 2 Feb 2017 21:52:53 +0000 (13:52 -0800)]
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

7 years agoMerge "Updating the shortcut preview generation logic" into ub-launcher3-master
Sunny Goyal [Thu, 16 Feb 2017 21:48:28 +0000 (21:48 +0000)]
Merge "Updating the shortcut preview generation logic" into ub-launcher3-master

7 years agoUpdating the shortcut preview generation logic
Sunny Goyal [Mon, 13 Feb 2017 18:44:43 +0000 (10:44 -0800)]
Updating the shortcut preview generation logic

Drawing a shortcut icon on a white round-rect with shadow
Also center aligning the preview

Bug: 34819119
Change-Id: Ic25be6bf301aeb11315a5050f009259b26c6134a

7 years agoRemoving wrapper around ViewPropertyAnimator, and using ObjectAnimator
Sunny Goyal [Mon, 13 Feb 2017 20:13:43 +0000 (12:13 -0800)]
Removing wrapper around ViewPropertyAnimator, and using ObjectAnimator
instead

Bug: 35218222
Change-Id: Ic714cf7d20989cb45f07712e8a6f6659d0e3f30d

7 years agoMerge "Fixing wrong check for grid migration" into ub-launcher3-master
TreeHugger Robot [Thu, 16 Feb 2017 18:08:15 +0000 (18:08 +0000)]
Merge "Fixing wrong check for grid migration" into ub-launcher3-master

7 years agoMerge "Adding some logging around launcher grid when device profile changes" into...
Sunny Goyal [Thu, 16 Feb 2017 18:01:46 +0000 (18:01 +0000)]
Merge "Adding some logging around launcher grid when device profile changes" into ub-launcher3-master

7 years agoMerge "Animate notification background color directly" into ub-launcher3-master
Tony Wickham [Thu, 16 Feb 2017 16:39:17 +0000 (16:39 +0000)]
Merge "Animate notification background color directly" into ub-launcher3-master

7 years agoMerge "Ignore touches before notification is populated" into ub-launcher3-master
Tony Wickham [Thu, 16 Feb 2017 16:38:59 +0000 (16:38 +0000)]
Merge "Ignore touches before notification is populated" into ub-launcher3-master

7 years agoAnimate notification background color directly
Tony [Tue, 14 Feb 2017 18:18:48 +0000 (10:18 -0800)]
Animate notification background color directly

Before we were calling setBackgroundColor() in the update
listener, which is less efficient because it creates a
new ColorDrawable; now we reuse one throughout.

Change-Id: I0cd87e5ee72af41d2dae4375ce3df9fd6e92bd82

7 years agoIgnore touches before notification is populated
Tony Wickham [Thu, 16 Feb 2017 00:03:27 +0000 (16:03 -0800)]
Ignore touches before notification is populated

Bug: 35398757
Change-Id: I24f1b66787af7c7caeb325e9a1f3e6ef86e62b81

7 years agoFallback to WallpaperManager#getDrawable() if getWallpaperFile() is null
Tony Wickham [Wed, 15 Feb 2017 22:53:08 +0000 (14:53 -0800)]
Fallback to WallpaperManager#getDrawable() if getWallpaperFile() is null

Bug: 34521181
Change-Id: Ifc5f7cd9a11ff1f66acaadaea494ba4a0d142c3c

7 years agoFixing wrong check for grid migration
Sunny Goyal [Wed, 15 Feb 2017 22:41:35 +0000 (14:41 -0800)]
Fixing wrong check for grid migration

Change-Id: I0475512302fd185fcd984d032cf19b34df3f8840

7 years agoAdding some logging around launcher grid when device profile changes
Sunny Goyal [Wed, 15 Feb 2017 22:39:54 +0000 (14:39 -0800)]
Adding some logging around launcher grid when device profile changes

Bug: 35349518
Change-Id: Ia71504cd37749f8eaa5e038ac2867bcd9749a4bb

7 years agoMerge "Adding minSDK for test targets" into ub-launcher3-master
TreeHugger Robot [Wed, 15 Feb 2017 18:53:19 +0000 (18:53 +0000)]
Merge "Adding minSDK for test targets" into ub-launcher3-master

7 years agoAdding minSDK for test targets
Sunny Goyal [Wed, 15 Feb 2017 18:38:41 +0000 (10:38 -0800)]
Adding minSDK for test targets

Bug: 35079440
Change-Id: Ie27eebe7afaed6a80efc43cb41f651e8acabc835

7 years agoMerge "Hide legacy icon treatment behind a flag." into ub-launcher3-master
Hyunyoung Song [Tue, 14 Feb 2017 18:25:27 +0000 (18:25 +0000)]
Merge "Hide legacy icon treatment behind a flag." into ub-launcher3-master

7 years agoMerge "Initializing LauncherAppState only on the main thread" into ub-launcher3-master
Sunny Goyal [Tue, 14 Feb 2017 18:02:33 +0000 (18:02 +0000)]
Merge "Initializing LauncherAppState only on the main thread" into ub-launcher3-master

7 years agoHide legacy icon treatment behind a flag.
Hyunyoung Song [Tue, 14 Feb 2017 17:23:30 +0000 (09:23 -0800)]
Hide legacy icon treatment behind a flag.

Change-Id: I662f1317945e6dd175fd03dbabc264e45c18dcee

7 years agoInitializing LauncherAppState only on the main thread
Sunny Goyal [Wed, 1 Feb 2017 20:52:54 +0000 (12:52 -0800)]
Initializing LauncherAppState only on the main thread

Bug: 33032833
Change-Id: I7992a5358142dde80aeaf8c6b7a6c7bfef2c8a00

7 years agoMerge "Fixing bug in AnimationLayerSet where it sets the layer type to software at...
TreeHugger Robot [Tue, 14 Feb 2017 00:29:47 +0000 (00:29 +0000)]
Merge "Fixing bug in AnimationLayerSet where it sets the layer type to software at the end of the animation instead fo setting it back to the original value" into ub-launcher3-master

7 years agoFixing bug in AnimationLayerSet where it sets the layer type to software
Sunny Goyal [Mon, 13 Feb 2017 23:43:00 +0000 (15:43 -0800)]
Fixing bug in AnimationLayerSet where it sets the layer type to software
at the end of the animation instead fo setting it back to the original value

Change-Id: I528dc41fb896ae57905d5ceab7256a53bdb81489

7 years agoRevert "Changing LauncherViewPropertyAnimator to use ValueAnimator"
Sunny Goyal [Mon, 13 Feb 2017 20:03:08 +0000 (20:03 +0000)]
Revert "Changing LauncherViewPropertyAnimator to use ValueAnimator"

Issue: Animations do not run

This reverts commit 33c04705beee04f7df309d702bc7303f161a8f18.

Change-Id: I069379ac1003c4b11e008b82530c952a66604459

7 years agoChanging LauncherViewPropertyAnimator to use ValueAnimator
Sunny Goyal [Fri, 10 Feb 2017 01:37:56 +0000 (17:37 -0800)]
Changing LauncherViewPropertyAnimator to use ValueAnimator

Using ValueAnimator allows better support for changes in Animator
APIs.

Bug: 35218222
Change-Id: I4efa470b4bb686328539d35d8e23e297a4ac885a

7 years agoEnsure that filtered notifications are removed from BadgeInfo.
Tony Wickham [Fri, 10 Feb 2017 16:03:22 +0000 (08:03 -0800)]
Ensure that filtered notifications are removed from BadgeInfo.

There are cases where a BadgeInfo can contain a key that is later
used for a notification that should be filtered out. So instead
of simply not sending filtered notifications to PopupDataProvider,
now we explicitly send them and remove the corresponding key from
the BadgeInfo if it exists.

Bug: 35239510
Change-Id: I9532f47b1f07b44234f8707657b15b0de519b347

7 years agoMerge "Making methods in PaackageManagerHelper non-static" into ub-launcher3-master
TreeHugger Robot [Thu, 9 Feb 2017 23:28:20 +0000 (23:28 +0000)]
Merge "Making methods in PaackageManagerHelper non-static" into ub-launcher3-master

7 years agoTemporarily remove notification listener from the manifest.
Tony Wickham [Thu, 9 Feb 2017 22:21:34 +0000 (14:21 -0800)]
Temporarily remove notification listener from the manifest.

Bug: 35102937
Change-Id: I830b7146815248c80f65c91a6cf81a2664afeaac

7 years agoMerge "Create a singleton HashMap instead of using Collections.singleton()" into...
TreeHugger Robot [Thu, 9 Feb 2017 21:59:46 +0000 (21:59 +0000)]
Merge "Create a singleton HashMap instead of using Collections.singleton()" into ub-launcher3-master

7 years agoCreate a singleton HashMap instead of using Collections.singleton()
Tony Wickham [Thu, 9 Feb 2017 16:28:52 +0000 (08:28 -0800)]
Create a singleton HashMap instead of using Collections.singleton()

The Set returned by Collections.singleton() doesn't support all
operations, causing crashes in certain situations (namely, whenever
a notification is updated rather than added or removed).

Change-Id: Ie104b7f99c4a32db5f1f7e43ec3775d34dc26ce1

7 years agoMerge "Updating the default widget preview generation logic" into ub-launcher3-master
Sunny Goyal [Thu, 9 Feb 2017 18:25:06 +0000 (18:25 +0000)]
Merge "Updating the default widget preview generation logic" into ub-launcher3-master

7 years agoMerge "Updating widget tray theme" into ub-launcher3-master
TreeHugger Robot [Thu, 9 Feb 2017 18:24:16 +0000 (18:24 +0000)]
Merge "Updating widget tray theme" into ub-launcher3-master

7 years agoUpdating widget tray theme
Sunny Goyal [Tue, 7 Feb 2017 21:11:17 +0000 (13:11 -0800)]
Updating widget tray theme

Using standard theme attributes rather than custom color codes, so
that it plays nice with system theme changes.

Bug: 34819119
Bug: 34897402
Bug: 21446746
Change-Id: I265fba3ceae8873650fd09e4704838d313155e83

7 years agoUpdating the default widget preview generation logic
Sunny Goyal [Tue, 7 Feb 2017 23:06:32 +0000 (15:06 -0800)]
Updating the default widget preview generation logic

We draw a while round rect box which is divided into the cells to
represent the widget size. The app icon is drawn in the center
for this white box.

Bug: 34819119
Change-Id: Ie4d83712577f21b276c6744a55993f71da368398

7 years agoAdd basic logs for tap outside action.
Jon Miranda [Wed, 8 Feb 2017 01:12:36 +0000 (17:12 -0800)]
Add basic logs for tap outside action.

Change-Id: I6288610b9870c3abe88794c53309b1d76dd2780f

7 years agoMerge "Animate badges when they are added or removed" into ub-launcher3-master
Tony Wickham [Tue, 7 Feb 2017 22:26:20 +0000 (22:26 +0000)]
Merge "Animate badges when they are added or removed" into ub-launcher3-master

7 years agoAnimate badges when they are added or removed
Tony Wickham [Thu, 2 Feb 2017 20:57:18 +0000 (12:57 -0800)]
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

7 years agoMerge "Update PreviewLayoutRule API to prepare for new folder animation." into ub...
Jonathan Miranda [Tue, 7 Feb 2017 21:45:39 +0000 (21:45 +0000)]
Merge "Update PreviewLayoutRule API to prepare for new folder animation." into ub-launcher3-master

7 years agoMerge "Add logging for notifications." into ub-launcher3-master
Tony Wickham [Tue, 7 Feb 2017 19:05:40 +0000 (19:05 +0000)]
Merge "Add logging for notifications." into ub-launcher3-master

7 years agoMerge "Add badges to folders" into ub-launcher3-master
Tony Wickham [Tue, 7 Feb 2017 18:59:04 +0000 (18:59 +0000)]
Merge "Add badges to folders" into ub-launcher3-master

7 years agoMerge "Show notification icon in place of "1" in badge." into ub-launcher3-master
Tony Wickham [Tue, 7 Feb 2017 18:57:32 +0000 (18:57 +0000)]
Merge "Show notification icon in place of "1" in badge." into ub-launcher3-master

7 years agoAdd logging for notifications.
Tony Wickham [Wed, 1 Feb 2017 17:13:24 +0000 (09:13 -0800)]
Add logging for notifications.

- Log notification launches
- Log notification swipes
- Fix logDragNDrop() to only log if the pre-drag ends (so it doesn't
  log a long-press that only shows shortcuts without dragging).
- Add shortcut rank to logs when launching deep shortcuts, where 0
  is the shortcut closest to the app icon (highest rank).

Bug: 34770729
Bug: 32410600
Change-Id: I99dcef9b6a71da2ef58e32397702bb137407b10f

7 years agoAdd badges to folders
Tony Wickham [Thu, 2 Feb 2017 20:42:50 +0000 (12:42 -0800)]
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

7 years agoShow notification icon in place of "1" in badge.
Tony Wickham [Tue, 31 Jan 2017 18:49:18 +0000 (10:49 -0800)]
Show notification icon in place of "1" in badge.

- When notifications update, add the NotificationInfo to the
  BadgeInfo if there is only one for an app. BadgeRenderer
  will use the NotificationInfo to get the icon to draw.
- When retrieving the icon from the NotificationInfo, we draw
  it into a shader (similar to MaskableIconDrawable), which is
  rendered by BadgeRenderer.
- For now, we only use the notification icon if it is large.

Bug: 34839959
Bug: 32410600
Bug: 33553066
Change-Id: I31851804008dd15bab75d2759441187830c3265e

7 years agoUpdate PreviewLayoutRule API to prepare for new folder animation.
Jon Miranda [Mon, 6 Feb 2017 23:45:53 +0000 (15:45 -0800)]
Update PreviewLayoutRule API to prepare for new folder animation.

Also created a new FeatureFlag to start building behind.

Bug: 35064148
Change-Id: I4a7d30bf1e1f49f1012eb963695d44d67096a5bc

7 years agoMerge "Updating the PreloadIconDrawable" into ub-launcher3-master
Sunny Goyal [Tue, 7 Feb 2017 01:23:36 +0000 (01:23 +0000)]
Merge "Updating the PreloadIconDrawable" into ub-launcher3-master

7 years agoMerge "Add ActivityOptions for clip reveal animation for notifications" into ub-launc...
Tony Wickham [Tue, 7 Feb 2017 01:21:29 +0000 (01:21 +0000)]
Merge "Add ActivityOptions for clip reveal animation for notifications" into ub-launcher3-master

7 years agoRemove unused View parameter from ofFloat method.
Jon Miranda [Mon, 6 Feb 2017 23:54:41 +0000 (15:54 -0800)]
Remove unused View parameter from ofFloat method.

Change-Id: I5fabd5c78de52ba68b67e0b1bd7208f4d1f7cbea

7 years agoUpdating the PreloadIconDrawable
Sunny Goyal [Fri, 3 Feb 2017 00:37:21 +0000 (16:37 -0800)]
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

7 years agoMerge "Gracefully ignore items that don't support notifications" into ub-launcher3...
Tony Wickham [Fri, 3 Feb 2017 18:24:14 +0000 (18:24 +0000)]
Merge "Gracefully ignore items that don't support notifications" into ub-launcher3-master

7 years agoGracefully ignore items that don't support notifications
Tony Wickham [Thu, 2 Feb 2017 21:58:33 +0000 (13:58 -0800)]
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

7 years agoMaking methods in PaackageManagerHelper non-static
Sunny Goyal [Thu, 2 Feb 2017 23:21:08 +0000 (15:21 -0800)]
Making methods in PaackageManagerHelper non-static

Bug: 34112546
Change-Id: Ia3db3e2f56d26e314000e302b51e6d38607c525d

7 years agoClean up around 1) Log.VERBOSE and 2) dump
Hyunyoung Song [Mon, 30 Jan 2017 23:11:27 +0000 (15:11 -0800)]
Clean up around 1) Log.VERBOSE and 2) dump
b/31772480

Note: in the follow up CL, I will add the dump result of the bgDataModel
to a proto

Change-Id: I5261cff0fb29cedd1dd772b8b15f67095ad5b967

7 years agoAdd ActivityOptions for clip reveal animation for notifications
Tony Wickham [Wed, 1 Feb 2017 19:12:12 +0000 (11:12 -0800)]
Add ActivityOptions for clip reveal animation for notifications

Change-Id: Ib621e3ae73eecf047568b85112cddaf3ae60bb0f

7 years agoMerge "Ensure getNotificationKeysForItem() returns empty on unsupported items." into...
Tony Wickham [Wed, 1 Feb 2017 19:10:37 +0000 (19:10 +0000)]
Merge "Ensure getNotificationKeysForItem() returns empty on unsupported items." into ub-launcher3-master

7 years agoEnsure getNotificationKeysForItem() returns empty on unsupported items.
Tony Wickham [Wed, 1 Feb 2017 17:58:40 +0000 (09:58 -0800)]
Ensure getNotificationKeysForItem() returns empty on unsupported items.

We were bypassing the check in getBadgeInfoForItem(), which meant
we would return notifications based on package/user regardless of
the item type. In particular, deep shortcuts would show notifications
when long-pressed.

Bug: 34866646
Change-Id: I6575a28539313c0c5d0eea1cbf7b7726f747bcd5

7 years agoFixes a bug where the workspace doesn't properly enter into freescroll mode
Mario Bertschler [Tue, 31 Jan 2017 01:47:30 +0000 (17:47 -0800)]
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

7 years agoMerge "Use notification icon views' tags to store NotificationInfo." into ub-launcher...
Tony Wickham [Tue, 31 Jan 2017 22:38:36 +0000 (22:38 +0000)]
Merge "Use notification icon views' tags to store NotificationInfo." into ub-launcher3-master

7 years agoMerge "Import translations. DO NOT MERGE" into ub-launcher3-master
TreeHugger Robot [Tue, 31 Jan 2017 07:28:27 +0000 (07:28 +0000)]
Merge "Import translations. DO NOT MERGE" into ub-launcher3-master

7 years agoImport translations. DO NOT MERGE
Bill Yi [Tue, 31 Jan 2017 06:03:45 +0000 (22:03 -0800)]
Import translations. DO NOT MERGE

Change-Id: I6939381d081f809324360287994fd424dd533f66
Auto-generated-cl: translation import

7 years agoChanges required to use MaskableIconDrawable inside Launcher3
Hyunyoung Song [Wed, 18 Jan 2017 10:43:17 +0000 (02:43 -0800)]
Changes required to use MaskableIconDrawable inside Launcher3
This CL will bake the legacy icons inside a grey background

Note: There will be follow up CL to change the color and shadow of the
legacy icon. The idea of this CL is to first test if MaskableIconDrawable
methods and class work properly.

Bug: 32063838
Bug: 33553066

Change-Id: I3d02e619fcb0cd9879baa22a025b5d95c829f26c

7 years agoMerge "Ensure notification icons have enough contrast with background." into ub-launc...
Tony Wickham [Fri, 27 Jan 2017 23:34:19 +0000 (23:34 +0000)]
Merge "Ensure notification icons have enough contrast with background." into ub-launcher3-master

7 years agoUpdating the preview generation logic so that it aligns better with
Sunny Goyal [Thu, 26 Jan 2017 02:23:36 +0000 (18:23 -0800)]
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

7 years agoUse notification icon views' tags to store NotificationInfo.
Tony Wickham [Fri, 27 Jan 2017 22:28:42 +0000 (14:28 -0800)]
Use notification icon views' tags to store NotificationInfo.

Previously we had a mapping from View to NotificationInfo,
but this way we don't have to maintain that separate mapping
and can follow the pattern used throughout the rest of launcher.

Change-Id: Ia988f822613b9978bab3d0127226de920a3e73c9

7 years agoEnsure notification icons have enough contrast with background.
Tony Wickham [Fri, 27 Jan 2017 16:45:49 +0000 (08:45 -0800)]
Ensure notification icons have enough contrast with background.

This uses the same color calculations as the system, except that
we use the extracted notification background instead of assuming
it is white.

Bug: 32410600
Change-Id: I7be8b9459ca38d01a6780758898541e69ec42576

7 years agoMerge "Handing pin item drag when workspce is not loaded" into ub-launcher3-master
Sunny Goyal [Fri, 27 Jan 2017 17:58:34 +0000 (17:58 +0000)]
Merge "Handing pin item drag when workspce is not loaded" into ub-launcher3-master

7 years agoImproving widget handling for pinItemRequest
Sunny Goyal [Wed, 25 Jan 2017 19:30:06 +0000 (11:30 -0800)]
Improving widget handling for pinItemRequest

> Preloading widget view while dragging for smoother
  transition
> Skipping config activity and sending confirmation to
  the caller when widget is dropped

Bug: 33584624
Change-Id: Ib23e5964298296d12d9c93f38aefdf924a07368e

7 years agoMerge "Updating manifest entry as per API changes" into ub-launcher3-master
Sunny Goyal [Fri, 27 Jan 2017 00:04:13 +0000 (00:04 +0000)]
Merge "Updating manifest entry as per API changes" into ub-launcher3-master

7 years agoMerge "Store notification keys in a List instead of a Set." into ub-launcher3-master
Tony Wickham [Thu, 26 Jan 2017 23:38:02 +0000 (23:38 +0000)]
Merge "Store notification keys in a List instead of a Set." into ub-launcher3-master

7 years agoUpdating manifest entry as per API changes
Sunny Goyal [Thu, 26 Jan 2017 22:40:10 +0000 (14:40 -0800)]
Updating manifest entry as per API changes

Bug: 34174006
Change-Id: I905532ba44a8898c9c17476f9f75bc309eeb7b41

7 years agoStore notification keys in a List instead of a Set.
Tony Wickham [Thu, 26 Jan 2017 17:54:48 +0000 (09:54 -0800)]
Store notification keys in a List instead of a Set.

This will preserve the order when iterating over the notifications to
populate the popup container.

Bug: 34735689
Change-Id: Ic390ffef140e454566ffc6ab1763950349df25ce

7 years agoAdd and update some comments badging/notifications.
Tony Wickham [Thu, 26 Jan 2017 17:24:41 +0000 (09:24 -0800)]
Add and update some comments badging/notifications.

Change-Id: Iab4e837c9be01cbd7764c8920e36c6d8159e16dd

7 years agoAdd swipe-to-dismiss notifications in popup menu.
Tony Wickham [Fri, 20 Jan 2017 17:38:25 +0000 (09:38 -0800)]
Add swipe-to-dismiss notifications in popup menu.

- Next secondary icon animates up to replace dismissed main notification
- Add padding around main notification so it always aligns with the
  straight edges of the view (not the rounded corners); looks more
  dismissable
- Notification view collapses as notifications are dismissed
- To mimic system notification behavior, we copy SwipeHelper,
  FlingAnimationUtils, and Interpolators. We also apply elevation
  to notifications and reveal a darker color beneath when dismissing.

Bug: 32410600
Change-Id: I9fbf10e73bb4996f17ef061c856efb013967d972

7 years agoHanding pin item drag when workspce is not loaded
Sunny Goyal [Wed, 25 Jan 2017 23:24:29 +0000 (15:24 -0800)]
Handing pin item drag when workspce is not loaded

While the launcher is loading, the drag view is displayed with a gray tint.
The drag is started, as soon as the workspace is unlocked

Bug: 33584624
Change-Id: I4013ea8b987ec305e73742b194f9e96af761cc35

7 years agoMerge "Refactor DeepShortcutsContainer to PopupContainerWithArrow" into ub-launcher3...
Tony Wickham [Wed, 25 Jan 2017 22:23:52 +0000 (22:23 +0000)]
Merge "Refactor DeepShortcutsContainer to PopupContainerWithArrow" into ub-launcher3-master

7 years agoMerge "Fixing loadWorkspace" into ub-launcher3-master
Sunny Goyal [Wed, 25 Jan 2017 20:53:01 +0000 (20:53 +0000)]
Merge "Fixing loadWorkspace" into ub-launcher3-master

7 years agoRefactor DeepShortcutsContainer to PopupContainerWithArrow
Tony Wickham [Mon, 23 Jan 2017 19:47:51 +0000 (11:47 -0800)]
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

7 years agoMerge "Add NotificationListener to launcher." into ub-launcher3-master
Tony Wickham [Wed, 25 Jan 2017 18:18:24 +0000 (18:18 +0000)]
Merge "Add NotificationListener to launcher." into ub-launcher3-master

7 years agoAdd NotificationListener to launcher.
Tony Wickham [Fri, 20 Jan 2017 16:15:28 +0000 (08:15 -0800)]
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

7 years agoMerge "Adding support for drag and drop for requestPinItem." into ub-launcher3-master
Sunny Goyal [Wed, 25 Jan 2017 17:36:42 +0000 (17:36 +0000)]
Merge "Adding support for drag and drop for requestPinItem." into ub-launcher3-master

7 years agoFixing loadWorkspace
Sunny Goyal [Sat, 14 Jan 2017 23:05:14 +0000 (15:05 -0800)]
Fixing loadWorkspace

> Adding checks on legacy shortcuts
> Checking restore status based on package and not componentName

Bug: 34123342
Change-Id: I442699e4ebb34ae66aa25c512bfcdc1b4fd5ae2a

7 years agoAdding support for drag and drop for requestPinItem.
Sunny Goyal [Sat, 21 Jan 2017 03:32:31 +0000 (19:32 -0800)]
Adding support for drag and drop for requestPinItem.

On long pressing, the confirmation activity starts a system
drag-n-drop and focuses the launcher activity. We then drive
the launcher drag controller using the system drag event

Caveats:
> We use a transparent preview for system drag and drop and use
  a view inside launcher for actual preview. This gives us better
  control over various animations.
> The parameters for drag operation are passed to the Launcher
  activity using the intent. Since onNewIntent and onDragEvent
  come at different times and are not associated, a random uuid
  is used as mime-type to match the drag event with intent params
> If the workspace is locked (eg, loader is running) the drag
  operation is simply dropped. Will be imporved in follow up cls

Bug: 33584624
Change-Id: I0bb5b25b690f86b6af31a14e11beb669fcb3a281

7 years agoMerge "Fixes a bug to not be able to scroll widgets intoduced when enabling to swipe...
Mario Bertschler [Wed, 25 Jan 2017 02:09:01 +0000 (02:09 +0000)]
Merge "Fixes a bug to not be able to scroll widgets intoduced when enabling to swipe allapps from everywhere." into ub-launcher3-master

7 years agoFix color for widget tray to match Default.Settings theme
Fan Zhang [Tue, 24 Jan 2017 23:47:43 +0000 (15:47 -0800)]
Fix color for widget tray to match Default.Settings theme

Change-Id: Ief4079853a8275a75c27d3c22b57a72a35274307
Fix: 34672511
Test: visual

7 years agoFixes a bug to not be able to scroll widgets intoduced when enabling
Mario Bertschler [Tue, 24 Jan 2017 19:57:32 +0000 (11:57 -0800)]
Fixes a bug to not be able to scroll widgets intoduced when enabling
to swipe allapps from everywhere.

The fix is to determine if the widget is scrollable on layouting instead
of the callback when a widget has been updated.

Bug: 34641906

Change-Id: Idc9d8ade7e601279b87856333ae754f4785131ac

7 years agoAdding some widget addition flow tests
Sunny Goyal [Sat, 21 Jan 2017 09:33:02 +0000 (01:33 -0800)]
Adding some widget addition flow tests

> Added two dummy widget providers: with config and without config
> Added tests for verify widget config flow

Change-Id: I4577f085abe8f8b82047b644c71cc9065358153a

7 years agoMerge "Adding WidgetAddFlowHandler to handle widget addition and configuration."...
Sunny Goyal [Mon, 23 Jan 2017 19:33:28 +0000 (19:33 +0000)]
Merge "Adding WidgetAddFlowHandler to handle widget addition and configuration." into ub-launcher3-master

7 years agoAdding WidgetAddFlowHandler to handle widget addition and configuration.
Sunny Goyal [Sat, 21 Jan 2017 05:08:59 +0000 (21:08 -0800)]
Adding WidgetAddFlowHandler to handle widget addition and configuration.

This will allow us to override the implementation and provide custom
logic for widget addition.

Bug: 33584624
Change-Id: I310bf39e301c7e1c8de4f62456594535e2fe5bbc

7 years agoMerge "Import translations. DO NOT MERGE" into ub-launcher3-master
TreeHugger Robot [Sat, 21 Jan 2017 01:18:03 +0000 (01:18 +0000)]
Merge "Import translations. DO NOT MERGE" into ub-launcher3-master

7 years agoMerge "Using WidgetCell in the Pin Item confirmation prompt for a consistent UI Also...
Sunny Goyal [Sat, 21 Jan 2017 00:03:01 +0000 (00:03 +0000)]
Merge "Using WidgetCell in the Pin Item confirmation prompt for a consistent UI Also fixing some platform API changes in PinItemRequestCompat" into ub-launcher3-master

7 years agoUsing WidgetCell in the Pin Item confirmation prompt for a consistent UI
Sunny Goyal [Fri, 20 Jan 2017 19:54:25 +0000 (11:54 -0800)]
Using WidgetCell in the Pin Item confirmation prompt for a consistent UI
Also fixing some platform API changes in PinItemRequestCompat

Bug: 33584624
Change-Id: I255829f0079f1a3967bf8d6a337da12c890eb7ec

7 years agoImport translations. DO NOT MERGE
Bill Yi [Fri, 20 Jan 2017 21:51:01 +0000 (13:51 -0800)]
Import translations. DO NOT MERGE

Change-Id: I4be6c1c59d520117f5471af788140d48ca214a31
Auto-generated-cl: translation import

7 years agoMerge "Fix shortcuts alignment in landscape" into ub-launcher3-master
TreeHugger Robot [Fri, 20 Jan 2017 21:23:38 +0000 (21:23 +0000)]
Merge "Fix shortcuts alignment in landscape" into ub-launcher3-master

7 years agoFix shortcuts alignment in landscape
Tony Wickham [Sat, 10 Dec 2016 01:15:12 +0000 (17:15 -0800)]
Fix shortcuts alignment in landscape

- 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

7 years agoMerge "Adding support for new APIs in O related to configurable shortcuts" into ub...
Sunny Goyal [Fri, 20 Jan 2017 18:35:08 +0000 (18:35 +0000)]
Merge "Adding support for new APIs in O related to configurable shortcuts" into ub-launcher3-master

7 years agoUpdating widget preview generation to not embed any badge.
Sunny Goyal [Sat, 14 Jan 2017 21:40:15 +0000 (13:40 -0800)]
Updating widget preview generation to not embed any badge.
Instead drawing badge in the view directly.

This will allow us to reuse the same preview when we do not want to draw
badges. This also simplified badging of shortcut config activities.

Change-Id: I9c07c33bf9c2b8ef81a00026b1d42587868c906f