Commit Graph

13107 Commits

Author SHA1 Message Date
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
Sunny Goyal a74e92a75a Merge "Updating the shortcut preview generation logic" into ub-launcher3-master 2017-02-16 21:48:28 +00:00
Sunny Goyal 7d87cb1a6e 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
2017-02-16 13:41:04 -08:00
Sunny Goyal 9e76f682f3 Removing wrapper around ViewPropertyAnimator, and using ObjectAnimator
instead

Bug: 35218222
Change-Id: Ic714cf7d20989cb45f07712e8a6f6659d0e3f30d
2017-02-16 11:19:01 -08:00
TreeHugger Robot eb04b84153 Merge "Fixing wrong check for grid migration" into ub-launcher3-master 2017-02-16 18:08:15 +00:00
Sunny Goyal 6130fa91af Merge "Adding some logging around launcher grid when device profile changes" into ub-launcher3-master 2017-02-16 18:01:46 +00:00
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
Sunny Goyal f3a13e1584 Fixing wrong check for grid migration
Change-Id: I0475512302fd185fcd984d032cf19b34df3f8840
2017-02-15 14:42:47 -08:00
Sunny Goyal c29de85780 Adding some logging around launcher grid when device profile changes
Bug: 35349518
Change-Id: Ia71504cd37749f8eaa5e038ac2867bcd9749a4bb
2017-02-15 14:40:30 -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