Commit Graph

13098 Commits

Author SHA1 Message Date
Tony Wickham
4f43bbe048 Merge "Animate notification background color directly" into ub-launcher3-master 2017-02-16 16:39:17 +00:00
Tony Wickham
05661918eb Merge "Ignore touches before notification is populated" into ub-launcher3-master 2017-02-16 16:38:59 +00:00
Tony
ffb0b68ae2 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
2017-02-15 16:39:22 -08:00
Tony Wickham
7aefaae5d9 Ignore touches before notification is populated
Bug: 35398757
Change-Id: I24f1b66787af7c7caeb325e9a1f3e6ef86e62b81
2017-02-15 16:05:40 -08:00
Tony Wickham
0891d1fd9b Fallback to WallpaperManager#getDrawable() if getWallpaperFile() is null
Bug: 34521181
Change-Id: Ifc5f7cd9a11ff1f66acaadaea494ba4a0d142c3c
2017-02-15 14:53:08 -08:00
TreeHugger Robot
a59402f98c Merge "Adding minSDK for test targets" into ub-launcher3-master 2017-02-15 18:53:20 +00:00
Sunny Goyal
c9a489c75c Adding minSDK for test targets
Bug: 35079440
Change-Id: Ie27eebe7afaed6a80efc43cb41f651e8acabc835
2017-02-15 10:39:35 -08:00
Hyunyoung Song
06d4be29cf Merge "Hide legacy icon treatment behind a flag." into ub-launcher3-master 2017-02-14 18:25:27 +00:00
Sunny Goyal
b7f52ec0d1 Merge "Initializing LauncherAppState only on the main thread" into ub-launcher3-master 2017-02-14 18:02:33 +00:00
Hyunyoung Song
42c9434346 Hide legacy icon treatment behind a flag.
Change-Id: I662f1317945e6dd175fd03dbabc264e45c18dcee
2017-02-14 09:23:30 -08:00
Sunny Goyal
fdbef27759 Initializing LauncherAppState only on the main thread
Bug: 33032833
Change-Id: I7992a5358142dde80aeaf8c6b7a6c7bfef2c8a00
2017-02-13 17:36:18 -08:00
TreeHugger Robot
7d093e75f6 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 2017-02-14 00:29:47 +00:00
Sunny Goyal
2ae9c85bd7 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
2017-02-13 15:43:40 -08:00
Sunny Goyal
ef1292149a Revert "Changing LauncherViewPropertyAnimator to use ValueAnimator"
Issue: Animations do not run

This reverts commit 33c04705be.

Change-Id: I069379ac1003c4b11e008b82530c952a66604459
2017-02-13 20:03:08 +00:00
Sunny Goyal
33c04705be Changing LauncherViewPropertyAnimator to use ValueAnimator
Using ValueAnimator allows better support for changes in Animator
APIs.

Bug: 35218222
Change-Id: I4efa470b4bb686328539d35d8e23e297a4ac885a
2017-02-13 09:20:34 -08:00
TreeHugger Robot
ee544c5d24 Merge "Making methods in PaackageManagerHelper non-static" into ub-launcher3-master 2017-02-09 23:28:21 +00:00
Tony Wickham
d27b65d4d0 Temporarily remove notification listener from the manifest.
Bug: 35102937
Change-Id: I830b7146815248c80f65c91a6cf81a2664afeaac
2017-02-09 14:23:13 -08:00
TreeHugger Robot
c6444eef17 Merge "Create a singleton HashMap instead of using Collections.singleton()" into ub-launcher3-master 2017-02-09 21:59:47 +00:00
Tony Wickham
580edcf529 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
2017-02-09 10:30:06 -08:00
Sunny Goyal
c9f844db2b Merge "Updating the default widget preview generation logic" into ub-launcher3-master 2017-02-09 18:25:06 +00:00
TreeHugger Robot
c99b30b01f Merge "Updating widget tray theme" into ub-launcher3-master 2017-02-09 18:24:16 +00:00
Sunny Goyal
d5d5e22715 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
2017-02-09 10:16:22 -08:00
Sunny Goyal
92bbfa19c3 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
2017-02-08 15:28:02 -08:00
Jon Miranda
c6cf493b07 Add basic logs for tap outside action.
Change-Id: I6288610b9870c3abe88794c53309b1d76dd2780f
2017-02-07 17:14:28 -08:00
Tony Wickham
4b20e0c312 Merge "Animate badges when they are added or removed" into ub-launcher3-master 2017-02-07 22:26:20 +00: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
Jonathan Miranda
72d90876b8 Merge "Update PreviewLayoutRule API to prepare for new folder animation." into ub-launcher3-master 2017-02-07 21:45:39 +00:00
Tony Wickham
00002d02f5 Merge "Add logging for notifications." into ub-launcher3-master 2017-02-07 19:05:40 +00:00
Tony Wickham
d097f475e8 Merge "Add badges to folders" into ub-launcher3-master 2017-02-07 18:59:04 +00:00
Tony Wickham
3cdda5fa8b Merge "Show notification icon in place of "1" in badge." into ub-launcher3-master 2017-02-07 18:57:32 +00:00
Tony Wickham
c6b79e307f 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
2017-02-07 10:16:52 -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
Tony Wickham
a799bed803 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
2017-02-07 09:48:43 -08:00
Jon Miranda
12b616c7d4 Update PreviewLayoutRule API to prepare for new folder animation.
Also created a new FeatureFlag to start building behind.

Bug: 35064148
Change-Id: I4a7d30bf1e1f49f1012eb963695d44d67096a5bc
2017-02-06 17:31:58 -08:00
Sunny Goyal
db7b82960a Merge "Updating the PreloadIconDrawable" into ub-launcher3-master 2017-02-07 01:23:36 +00:00
Tony Wickham
32e826eb95 Merge "Add ActivityOptions for clip reveal animation for notifications" into ub-launcher3-master 2017-02-07 01:21:29 +00:00
Jon Miranda
cda3bfb2e1 Remove unused View parameter from ofFloat method.
Change-Id: I5fabd5c78de52ba68b67e0b1bd7208f4d1f7cbea
2017-02-06 15:54:41 -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
e1fa0145d3 Merge "Gracefully ignore items that don't support notifications" into ub-launcher3-master 2017-02-03 18:24:14 +00: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
Sunny Goyal
342e466739 Making methods in PaackageManagerHelper non-static
Bug: 34112546
Change-Id: Ia3db3e2f56d26e314000e302b51e6d38607c525d
2017-02-02 15:26:12 -08:00
Hyunyoung Song
3c7d9cbb20 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
2017-02-01 15:11:08 -08:00
Tony Wickham
4aab7476f2 Add ActivityOptions for clip reveal animation for notifications
Change-Id: Ib621e3ae73eecf047568b85112cddaf3ae60bb0f
2017-02-01 11:13:27 -08:00
Tony Wickham
1fafd719cb Merge "Ensure getNotificationKeysForItem() returns empty on unsupported items." into ub-launcher3-master 2017-02-01 19:10:37 +00:00
Tony Wickham
4d096298ce 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
2017-02-01 09:58:40 -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
Tony Wickham
bdbfd5bb3a Merge "Use notification icon views' tags to store NotificationInfo." into ub-launcher3-master 2017-01-31 22:38:37 +00:00
TreeHugger Robot
cf23ef3000 Merge "Import translations. DO NOT MERGE" into ub-launcher3-master 2017-01-31 07:28:28 +00:00
Bill Yi
8c992e3b4f Import translations. DO NOT MERGE
Change-Id: I6939381d081f809324360287994fd424dd533f66
Auto-generated-cl: translation import
2017-01-30 22:03:45 -08:00
Hyunyoung Song
ea383c312c 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
2017-01-30 12:18:08 -08:00