Commit Graph

27 Commits

Author SHA1 Message Date
Sunny Goyal
940c27ef1a Using an independent drawable for rounded corners
Bug: 183641907
Test: Manual
Change-Id: I3114d43d07c03884348e1c33805545f19bb8d540
2021-03-30 14:47:44 -07:00
Hyunyoung Song
6b670d62df Good riddance UserEventDispatcher [1/n]
Bug: 165675920
Change-Id: I237ed4243e1724b3c370c5660673bb3966bf4811
2020-08-24 21:19:09 -07:00
thiruram
c6a38ba5d8 Replaces StatsLogManager.log with StatsLogManager.logger()
Bug: 159170445
Change-Id: Ice6c8a9ae30d8e6b3843bfe42926053849bf9fe0
2020-06-17 17:32:54 +00:00
Hyunyoung Song
13c2bc7303 LAUNCHER_APP_LAUNCH_TAP should log correctly for icons inside folder
Bug: 137777105

Change-Id: I5c1552481fc1b788ba41c57bfe97f126f55e5b16
2020-06-11 23:51:17 -07:00
thiruram
3cb5592c84 Log tap on dot-notifications on both app icon and deep shortcuts.
Bug: 157765763
Sample Log: https://paste.googleplex.com/6354213825150976
Screencast: http://go/recall/-/fuZYA4w9pUEvRlF811dY61/ecVIR0vyJ2thQwLbUL64Ar

Change-Id: I6e1ed381d551044a1ad94b72b3f431223a888a72
2020-06-05 17:19:29 +00:00
Tony Wickham
c70f2fd5f1 Remove some obsolete notification badging code
Now that we only show dots instead of badges, we can simplify some logic
and remove a couple unused methods.

Change-Id: I72056eeb12e8968ec67b4c5b3a450d2ed5d4ee84
2018-12-04 15:58:56 -08:00
Tony Wickham
f34bee819c Rename "badges" to "dots" where appropriate
This will reduce confusion with the other "badging" concept we use for,
e.g. work profiles. It is also consistent with the external name
"notification dots".

Change-Id: I2a2c9d96dc0d6284eb0c48adc78a856271caad4d
2018-12-04 10:46:40 -08:00
Sunny Goyal
179249d804 Dominant color is part of icon cache
> Calculating extracted color during icon generation and storing it in model and DB
> Removing unused logic avoid various types of badge rendering
> Icons are badged with extracted colors, while folder is badged with theme color

Bug: 35428783
Change-Id: I93e30c52fbded7515c3ae1778422e84672eafb56
2018-01-03 16:55:58 -08:00
Tony Wickham
5509465317 Merge changes from topic "am-cd88620d-8a17-4592-86c7-f98ff940a436" into ub-launcher3-master
* changes:
  [automerger] Handle null small icon am: 207f7d7f86
  Handle null small icon
2017-10-13 21:18:19 +00:00
Sunny Goyal
10a1bd0e65 Converting PopupContainerWithArrow into a base class so that it is easier
to create other types of popup

Bug: 67585158
Change-Id: I966ae7bb90f941951b26feaf71b3ea30c3f3c0cc
2017-10-10 10:28:05 -07:00
Android Build Merger (Role)
d4899cfc2f [automerger] Handle null small icon am: 207f7d7f86
Change-Id: I2003fe3d654829f8a2d1d16a38213cf5a262650f
2017-10-06 21:03:28 +00:00
Tony
207f7d7f86 Handle null small icon
It shouldn't be possible to have a null small icon, but apparently
there are cases where we get one anyway. Might as well handle it
gracefully instead of crashing.

Bug: 67156108
Change-Id: I01ad0251920f7f531a3019eb694946c3d295f9de
2017-10-06 14:03:09 -07:00
Tony Wickham
22cb37745c Ignore clicks on notifications that don't have intents.
Bug: 64479852
Change-Id: I3bfff96a12169d0d191a36a8c7e90d4810e9f176
2017-09-15 17:38:48 -07:00
Tony
cd6885455b Don't crash when tapping twice on a notification
Bug: 62588191
Change-Id: I33671ab08411c4e4e624b579561229d32b7a29c9
2017-06-15 18:14:38 -07:00
Tony Wickham
8eaa8e64ac Remove reflection for a couple of methods
Bug: 36855196
Change-Id: I3e6b2901d1c12fffd0172e85df98e2e17e737168
2017-04-11 16:39:58 -07:00
Tony Wickham
a4736df685 Temporarily use reflection to get notification badge icon type
Bug: 36855196
Change-Id: I408a98140c68f38327a6cd8ce4cc46c5f2fe34e6
2017-04-03 10:18:42 -07:00
Tony Wickham
2f5bb16915 De-dupe shortcuts with the same id as the main notification.
- Pass NotificationKeyData, which includes the shortcut id, instead of
  just the notification key from NotificationListener
- Remove the shortcut with the same shortcut id as the first
  notification, if it has one, in PopupPopulator#sortAndFilterShorcuts()
- Add some unit tests

Bug: 36571718
Change-Id: I308941b34c525b34686583476e3f82ccb8b7e2d8
2017-03-24 14:18:53 -07:00
Tony Wickham
74884ce164 Filter out some notifications.
- Filter out any notification without title and text
- Filter out ongoing notifications on the default, legacy channel
- Respect notification's badgeIcon param instead of always using
  BADGE_ICON_LARGE (this way we can change the default on system)

Bug: 35097755
Bug: 36150272
Change-Id: If10b663e27a96354fd40a6e0f71e17b250290115
2017-03-15 15:43:27 -07:00
Tony Wickham
07e6d591b1 Use default icon if notification icon is null.
This could happen, for instance, if there is a
ResourcesNotFoundException when loading the icon.

Bug: 36134256
Change-Id: If2d13207252a2ec46f581455f5709a95d68f29c1
2017-03-15 10:06:52 -07:00
Tony Wickham
00002d02f5 Merge "Add logging for notifications." into ub-launcher3-master 2017-02-07 19:05:40 +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
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
Tony Wickham
4aab7476f2 Add ActivityOptions for clip reveal animation for notifications
Change-Id: Ib621e3ae73eecf047568b85112cddaf3ae60bb0f
2017-02-01 11:13:27 -08:00
Tony Wickham
f79877c04c 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
2017-01-27 12:43:31 -08:00
Tony Wickham
30e45187a8 Add and update some comments badging/notifications.
Change-Id: Iab4e837c9be01cbd7764c8920e36c6d8159e16dd
2017-01-26 09:24:41 -08:00
Tony Wickham
9438ed414f 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
2017-01-25 17:36:31 -08:00