summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/notification
Commit message (Collapse)AuthorAgeFilesLines
* Refactor SwipeDetector to track both axesTony Wickham2019-10-242-13/+14
| | | | | | | | | | Existing clients now use the SingleAxisSwipeDetector subclass. A followup CL will add BothAxesSwipeDetector, whose first client will be the quick switch from home controller. Bug: 126596417 Change-Id: I54c71088cfe99ff28cdc719a1eb7a7d06ac95d2d Merged-In: I54c71088cfe99ff28cdc719a1eb7a7d06ac95d2d
* Some cleanup for SwipeDetector.Andy Wickham2019-10-011-2/+2
| | | | | | | | | | | | | | | | | | It is now organized as follows: - private constants - public constants - private final fields - private variable fields - constructors - public methods - private methods - public interface/abstract class This is intended to be a functional no-op. Bug: 141939911 Change-Id: Iad5a9b3b73b35641f8a4f1d52ada6adef3825c47 Tested: Built and sanity checked manually.
* Moving various common executors to a single locationSunny Goyal2019-08-201-4/+4
| | | | Change-Id: I44bca49b8adb6fa22c3b48d10f674e42c28d792c
* Sorting people by key crashes launcherSamuel Fufa2019-08-141-8/+8
| | | | | | | Approch: approach: filter out people with null getKey before sorting. Bug:139436782 Change-Id: I6510a12374ff4fec02c879ff76ba42b1fcdb8281
* show dot in deep shortcuts when notification contains exactly identicalPinyao Ting2019-08-051-3/+22
| | | | | | | set of person Bug: 132336512 Change-Id: I975524e28168c10a186cdc24b188c161faf433cf
* Remove some obsolete notification badging codeTony Wickham2018-12-041-15/+2
| | | | | | | Now that we only show dots instead of badges, we can simplify some logic and remove a couple unused methods. Change-Id: I72056eeb12e8968ec67b4c5b3a450d2ed5d4ee84
* Rename "badges" to "dots" where appropriateTony Wickham2018-12-043-11/+12
| | | | | | | | 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
* Using a common class for observing secure settingsSunny Goyal2018-10-171-14/+13
| | | | | Bug: 117519297 Change-Id: Ie9d948130aea50bf10c9fc625fdb16f4cfc4712e
* Converting long item IDs to intSunny Goyal2018-10-081-1/+2
| | | | | | | | > Items ids were already being typecasted to int when being bound on the UI > Using a consistent type allow better use of platform data-structures > Adding IntArray and IntSet as a replacement for various Collection classes Change-Id: Id3c650ed2420c2bfca3bd7671d2b705b56112371
* Using velocity tracker for computing the velocity of motion eventsSunny Goyal2018-09-131-1/+1
| | | | Change-Id: I14f2f970825a2936f4bb285834405d67daf8667c
* Merge "Migrating to android-x" into ub-launcher3-masterTreeHugger Robot2018-08-142-2/+4
|\
| * Migrating to android-xSunny Goyal2018-08-142-2/+4
| | | | | | | | Change-Id: I9a774152d13a541e8496dd84f2469bfed407f86d
* | Removing static launcher activity dependency from FirstFrameAnimationHelperSunny Goyal2018-08-131-3/+4
|/ | | | | | | | Static dependency does not work in the presence of multiple activities and when the main activity is not Launcher (eg in fallback recents). Instead creating FirstFrameAnimatorHelper on demand for individual animations. Change-Id: I17bb69bbaaca92f0db994fb56fd784302c57d543
* Removing Launcher activity dependency on various animationsSunny Goyal2018-08-101-2/+1
| | | | | | | | | | | | | | (This cl reverts change-Id: I455edcd17bda83ab51c2c04fa40e66097a4d6975) Various animations were marked for cancellation when launcher activity is destroyed. This this does not work with multiple activities (Launcher, fallback recents, shortcut confirmation). Also since launcher activity handles configuration changes, the activity is not destroyed often. Instead associating a target with various animations which automatically cancels the animations when that target goes away. Change-Id: I64cd095a28075561a9e20c9dcdeb9f90c18e1047
* Exposing some private methods to easily customize widgets popupSunny Goyal2018-08-021-1/+1
| | | | Change-Id: Ie7bd879200b1f14d472ff03fd64429930651a39f
* Only call requestUnbind if we are connected.Sunny Goyal2018-07-091-1/+1
| | | | | | | | Somethimes onSettingChanged can come after the connected has disconnected because of posting message on the different thread. Bug: 110929527 Change-Id: I09f503c2f2f437c8656d491a7fdec3ce4e82257b
* Report when a notification is shown in the popupTony2018-05-291-0/+4
| | | | Change-Id: I5c06b18f731e2dc8e47bacba59746fc4cc02c42c
* Make sure notification listener stays unbound on reboot when badging disabledTony2018-04-171-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | We were requesting unbind in onCreate(), but the NotificationListenerService documentation for requestUnbind() clearly states "The service should wait for the {@link #onListenerConnected()} event before performing this operation. I know it's tempting, but you must wait." I was tempted, and I did not wait. :( The fact that the notification listener was binding even though the setting was off was not only inefficient, but also had at least one user-visible bug: because secure settings are set per user, the global badging setting actually only applies canShowBadge = false for user 0; other users such as work profile still show badges. Repro steps: 1. Have a work profile 2. Get a notification on work profile app and normal app 3. Turn off global badging setting ("Allow notification dots" from home settings) 4. Reboot the device In this case, we get onCreate, call requestUnbind() which is ignored since we aren't bound, then get onBind() and onListenerConnected() etc. Thus the work profile app has a notification dot and other apps don't. Bug: 71545493 Change-Id: I7f7dc219b25c28257f8b98fba7e362b99d3cba45
* Ignore null notificationsTony Wickham2018-04-131-0/+8
| | | | | | | | | | There seems to be an edge case where we can get a null notification in onNotificationRemoved(); there's nothing actionable about that, so just ignore it to prevent NPE. Also add null check to onNotificationPosted() for good measure. Bug: 69140873 Change-Id: I3586bf435d05aee38b99dffd3d01315b433e8476
* Updating the UI of the options popup to make it look similar to icon popupSunny Goyal2018-04-021-2/+1
| | | | | Bug: 77327164 Change-Id: I3580df8bf8a43cb44123f203ffed9a85fa33aea7
* Only cancel the group notification if launcher canceled last childTony2018-03-131-2/+17
| | | | | Bug: 74429562 Change-Id: I82329b84d4d50f89218b431440dccb9ef33b1ba5
* Update notification group mapping when group key changesTony Wickham2018-02-211-16/+48
| | | | | | | | | | | | | | Tested by running: "runtest -x cts/tests/app/src/android/app/cts/NotificationManagerTest.java -m testAutogrouping_autogroupStaysUntilAllNotificationsCanceled" The test fails before this change, and passes afterwards. Also manually verified that the original bug that introduced this regression (b/65100024) remains fixed. Bug: 68215987 Change-Id: I4af198fd5257ad1dfab5e052c11f58ea84b5095a
* Added StatusBarNotificationsListener interface.George Hodulik2018-01-161-4/+25
| | | | Change-Id: I62da2da4169835edf043bc085583adfb027bebbe
* Dominant color is part of icon cacheSunny Goyal2018-01-032-4/+5
| | | | | | | | | > 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
* Simplifying app icon popupSunny Goyal2017-11-153-155/+162
| | | | | | | | | > Using a single linearLayout instead of multiple nested views > Using clipToOutline for rounded corners instead of using canvas.saveLayer > Removing nested view elevations and overdraw > Using LayoutTransition for animating layout changes, instead of manually creating animators Change-Id: I8e57092f52ca5a032a2756594fdd39788acc5a0d
* Consolidating various interpolatorsSunny Goyal2017-10-262-42/+3
| | | | Change-Id: I9588eee3552001b162a1e8d5ccefcfb44d221880
* Merge changes from topic "am-cd88620d-8a17-4592-86c7-f98ff940a436" into ↵Tony Wickham2017-10-131-1/+1
|\ | | | | | | | | | | | | | | ub-launcher3-master * changes: [automerger] Handle null small icon am: 207f7d7f86 Handle null small icon
| * [automerger] Handle null small icon am: 207f7d7f86Android Build Merger (Role)2017-10-061-1/+1
| |\ | | | | | | | | | Change-Id: I2003fe3d654829f8a2d1d16a38213cf5a262650f
| | * Handle null small iconTony2017-10-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Converting PopupContainerWithArrow into a base class so that it is easierSunny Goyal2017-10-102-6/+7
|/ / | | | | | | | | | | | | to create other types of popup Bug: 67585158 Change-Id: I966ae7bb90f941951b26feaf71b3ea30c3f3c0cc
* | Cancel notification group summary when all children are cancelled.Tony Wickham2017-10-052-2/+83
| | | | | | | | | | | | | | | | This requires maintaining notification group information by mapping groupKey's to the summary key and child keys. Bug: 65100024 Change-Id: Idd352ce5e243a0762bf30a9c79d36681456a1b17
* | [automerger] Ignore clicks on notifications that don't have intents. am: ↵Tony Wickham2017-09-161-0/+3
|\ \ | | | | | | | | | | | | | | | 22cb37745c Change-Id: I8973d3ebdb083ed28b8516b8dc26f547f9ab0d52
| * | Ignore clicks on notifications that don't have intents.Tony Wickham2017-09-151-0/+3
| | | | | | | | | | | | | | | Bug: 64479852 Change-Id: I3bfff96a12169d0d191a36a8c7e90d4810e9f176
* | | Adjust notification paddingsTony Wickham2017-09-062-4/+16
|/ / | | | | | | | | | | | | | | | | - Reduce main notification height - Increase header height and center "Notifications" - Footer has short height when empty to serve as padding Bug: 65215656 Change-Id: I691d176628b0b51e8d9af030084b8c29837778dc
* / Remove notification dots setting for Launcher3GoTony Wickham2017-08-141-4/+0
|/ | | | | | | Also remove BADGE_ICONS flag as it is no longer used or necessary. Bug: 64561196 Change-Id: Icf9656537459a7dbad3a07830eedbdeec8d8f1ce
* Unbind notification listener when badging is disabledTony2017-08-031-3/+37
| | | | | | | | | | | - Added SettingsObserver as wrapper around ContentObserver to observe Secure or System setting changes. - NotificationListener and LauncherAppState observe changes to the notification dots setting and unbind and rebind the NotificationListener service, respectively. Bug: 36815147 Change-Id: I2cc04ac816a8974969ad0ec759c5402e181fde24
* Using common fling detection logic for notification and all-appsSunny Goyal2017-07-204-1083/+67
| | | | | | | | > Refactoring SwipeDetector to both allow vertical and horizontal swipes > Using SwipeDetector and common overscroll effect for notification swipes instead of a separate logic Change-Id: Ib706ee179811ade59ddb68184e1c202365d147c4
* Catch SecurityException from NoMan to workaround possible race conditionAdam Cohen2017-07-141-3/+16
| | | | | | b/63636581 Change-Id: Ia06a5be59b2114bda9b4a55ad945fdd832013110
* Keep gutter aligned when removing notification footerTony2017-07-062-3/+22
| | | | | Bug: 63262764 Change-Id: I94e7978dafc04fc2673a9bb8c6d24ff20641416f
* Ensure notification listener is connected before getting notificationsTony Wickham2017-06-281-2/+3
| | | | | | | | | | There was a potential race condition where we would try to do a full refresh of notifications before the listener was connected. Now we skip the full refresh if we aren't connected, which is fine because we also do a full refresh in onListenerConnected() anyway. Bug: 62107069 Change-Id: I2fe4f49eb8a840230d32034be11fe7765a366e75
* Popup visual changesTony Wickham2017-06-271-0/+3
| | | | | | | | | | | - Don't remove elevation during animation (b/62905720) - Other adjustments (b/35766387) - Add "gutter" between notification and shortcuts - Change shortcuts to always be primary color (e.g. white) - Scale down shortcut icons when notifications present - Apply icon extracted color to "Notifications" header Change-Id: Idf791dc76d15d05d246000ad73810916d7cd1750
* 1. Replace use of java.util.HashSet with android.util.ArraySet inRajeev Kumar2017-06-221-11/+13
| | | | | | | | | NotificationListener. 2. Make few instance variable final. 3. Fix an unchecked cast. Bug: 62466540 Change-Id: I62352c9c9b38f5eaadbbb39c13dfe1411048109d
* Merge "1. Replace use of java.util.HashMap with android.util.ArrayMap in ↵Rajeev Kumar2017-06-221-17/+14
|\ | | | | | | SwipeHelper class 2. Make few instance variables final Bug: 62466540" into ub-launcher3-dorval-polish
| * 1. Replace use of java.util.HashMap with android.util.ArrayMap inRajeev Kumar2017-06-221-17/+14
| | | | | | | | | | | | | | | | SwipeHelper class 2. Make few instance variables final Bug: 62466540 Change-Id: I6cef170c770f4da8574205ef4f4f43edbfdbbc58
* | Merge "Removing some support lib dependencies" into ub-launcher3-dorval-polishTreeHugger Robot2017-06-221-1/+1
|\ \
| * | Removing some support lib dependenciesSunny Goyal2017-06-091-1/+1
| |/ | | | | | | Change-Id: I028ed591cc9cf0af94fe6e09fadcd255f07cdee5
* | Merge "Show more shortcuts when last notification is dimissed" into ↵Tony Wickham2017-06-201-3/+8
|\ \ | | | | | | | | | ub-launcher3-dorval-polish
| * | Show more shortcuts when last notification is dimissedTony2017-06-151-3/+8
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently only show 2 shortcuts when notifications are present, but support up to 4 otherwise. With this change, the hidden shortcuts are added back after dismissing the notifications, instead of only after closing and reopening the container. To ensure the transition is as elegant as possible, we also separated the shortcuts header from the rest of the shortcuts. That way we can reveal the new shortcuts without removing the header (the shortcuts come out from behind the header). Bug: 38036250 Change-Id: Ie9ab35f9be57cec1d5345e9e70e84e09ea52c9fc
* | Merge "Don't crash when tapping twice on a notification" into ↵TreeHugger Robot2017-06-161-1/+3
|\ \ | |/ |/| | | ub-launcher3-dorval-polish
| * Don't crash when tapping twice on a notificationTony2017-06-151-1/+3
| | | | | | | | | | Bug: 62588191 Change-Id: I33671ab08411c4e4e624b579561229d32b7a29c9