summaryrefslogtreecommitdiff
path: root/src/com/android/email/NotificationController.java
Commit message (Collapse)AuthorAgeFilesLines
* Email: Add native heads up support per account (1/2)Lars Greiss2014-12-041-7/+71
| | | | | | | | | | | | | | Add native heads up notification support. User can set on every account if he or she want this account as heads up notification or not. This patch adds the settings for it as well the complete handling. Due of a half broken NotificationCompat.Builder class we switch here to the Notification.Builder class to get access to the methods we need. This is no problem here due that we do not need compatibility on lower API's Adapted to LP Change-Id: Ia88d2f15f0eaf7ae024ab07dd4f74c6858f17f76
* Update Notifications Icon (Email)Rohan Shah2014-08-151-1/+1
| | | | | | Rest in pieces little gmail icon :( Change-Id: I14459cba33cf61f6717d922bdb006d8d56ad893c
* Update Notifications (Email)Rohan Shah2014-08-131-1/+1
| | | | | | | Switched out icons (For updated mail notify icon). Bug: 16987147 Change-Id: I695b4c51daddc47eecbe7d856de642932190c4bb
* com.android.mail.providers.Account contructors are no longer publicRay Chen2014-07-161-2/+2
| | | | | | and clients need to use Account.builder().buildFrom(...) instead. Change-Id: I7559540458ae549c399effc59392930ec914ffcc
* Remove direct entry points to AccountSettingsTony Mantler2014-07-111-34/+41
| | | | | b/16240332 Change-Id: I9bc3f9a2e0b7faa4d8875a9ac7d6d585a65d9733
* am 4e6aa252: Merge "Support hooks for new contact photo source." into ↵Andrew Sapperstein2014-05-281-3/+4
|\ | | | | | | | | | | | | ub-gmail-ur13-dev * commit '4e6aa25286d9971e9574d5e3470ad99a15cf93ce': Support hooks for new contact photo source.
| * Support hooks for new contact photo source.Andrew Sapperstein2014-05-201-3/+4
| | | | | | | | | | | | b/11387812 Change-Id: If081d58941dca0a330905dc2d80148df336995d5
* | Disambiguate settings intentsTony Mantler2014-05-221-3/+5
| | | | | | | | | | | | b/13325901 Change-Id: I2843a6bfdac4acbabc758ddc44f1d980b7036aef
* | Remove unused constantTony Mantler2014-05-211-3/+0
|/ | | | | | b/15133133 Change-Id: Ia89829e796dadf48f0257adb994c7102b7d30baf
* Get Email units to compileJerry Xie2013-12-051-1/+1
| | | | Change-Id: I171a0e2421c5006d9862ad94f886932146547020
* Use update notification intent to trigger notificationsTony Mantler2013-11-211-48/+86
| | | | | | | | This ensures the SuppressNotificationReceiver object quiesces the notification while we're viewing the folder b/11789666 Change-Id: I98f388844b29458e7ea7deee398f7d8536b1919c
* Coalesce notification updates to avoid spamming the notification trayTony Mantler2013-10-181-75/+156
| | | | | | b/11115818 Change-Id: I1d8bfbb87c279c9967eee7295f31ddd7728b200c
* Clean up usage of Account.name when accessing account/folder prefsTony Mantler2013-10-111-1/+1
| | | | | | b/11185963 Change-Id: Id928732bee5f67887252b1f949a8e4d396fffaa6
* Remove notifications while we still know what type of account this isTony Mantler2013-10-041-2/+8
| | | | | | | | Also add null check just in case b/11070468 Change-Id: I187b9b084512a2b994f4a0a3b750ade5eee50624
* Remove mAmAccount from the email provider account objectTony Mantler2013-10-041-1/+5
| | | | | | b/11070468 Change-Id: I51bad4be41800e4cd6dae42744005ade784cdf82
* Change notification code to key off android.accounts.AccountTony Mantler2013-10-031-1/+8
| | | | | | b/11023774 Change-Id: I6dd267591148378265b0f12c7ea6d74b450a0f3d
* Moved some stuff from Email to Unified.Andrew Sapperstein2013-08-291-0/+1
| | | | | | b/10542802. Change-Id: I9623ce85cae6f67ec647e1712e8c392a35311171
* Clean up a bunch of warningsScott Kennedy2013-06-251-10/+5
| | | | | Bug: 9565838 Change-Id: I5e95562bbf463f057cbcc4a9884427a774473b45
* Ensure notifications get cancelled when necessaryScott Kennedy2013-05-221-16/+14
| | | | | | | | | | | There were a few places calling the old notification code to cancel notifications. These calls were completely unnecessary. Also, when an account is removed, we now clear all notifications that may exist for that account. Bug: 7935576 Change-Id: I58f7e194c3f9a928e932b3b1b87475e7d3653b6a
* CL to support method signature change.Andrew Sapperstein2013-04-221-1/+1
| | | | | | | Helps fix b/7923968. This is just a one-line change. The real change is in the UnifiedEmail code. Change-Id: I60808c0265e911394cbffa92214d10626769ca9a
* Improve error logging for mailboxNotification.Yu Ping Hu2013-03-281-2/+4
| | | | Change-Id: I5b16ac46ce8cdd6e8f791c9cea7d7ead7e053bdc
* Prevent NPE when getting a bad mailbox id.Yu Ping Hu2013-03-261-1/+4
| | | | | | | | The mailboxNotification query apparently can return bogus mailbox ids. This underlying bug still needs fixing. Bug: 8482721 Change-Id: Icfbd0d986ab32fe878a0dbe09a3276322c75cafe
* Fix NPE when adding account with security policyPaul Westbrook2013-03-071-17/+20
| | | | | | | | | | | | | | | When adding an Exchange account with a security policy, Email generates a notification to let the user enable the policy. The code that generates the notification attemptes to load the folder as part of the base notification. Before the account policy has been configured, it isn't possible to load the folder. We need to handle a null folder when generating the notification Also, imporoved the logging when an exception is thrown from the PolicyService Bug: 8341882 Change-Id: I33ff57adc3c130e8318910e352146b8ea56f9a2c
* Move notifications to UnifiedEmailScott Kennedy2013-02-081-571/+139
| | | | | | | | | | | This involves redoing the persistence model, to split general, account, and folder settings into separate SharedPreference stores. It also requires some preferences to be moved into UnifiedEmail. Depends on Ibe2e3f93ec164370535ffc5f5b2409544cc8d36d (UnifiedEmail) Change-Id: Ie6ec389b5b5d2e7ab1b299d0877811ae716526e2
* Change Email vibrate setting from tri-state to checkboxScott Kennedy2012-11-291-4/+2
| | | | | | | | | | | Migrate the old value as necessary. Update the unit tests. Cherry-picked from I1c276ffde3496cbc66846ed4a007088d39f20382 with minor changes. Bug: 7624838 Change-Id: I1b3fa331b62f556701bacba5ce9cd64305d9b52a
* Do not vibrate in vibrate mode if ringtone is silentScott Kennedy2012-11-281-1/+1
| | | | | | | | An empty string as the ringtone URI was triggering the system vibration while in vibrate mode. Bug: 7624838 Change-Id: Ide1cb2d8ac5d1295c18770bd053dd1cd0a50feb0
* Fix multi message notificationsPaul Westbrook2012-09-231-2/+56
| | | | | | | | | | | | | When multiple messages are received, now the View intent will take the user to to contents of the mailbox, instead of the viewing the last message I have filed bug 7216375 to track the issue about receiving multiple messages in different syncs Bug: 7129870 Change-Id: I3fdf4680c62565615fcbefc75d72c2a721942604
* Convert authorities, intents, and account manager typesMarc Blank2012-08-311-0/+1
| | | | | | | | * Tested ok on wiped Nexus * Tested ok on S3 * Upgrade verified on Nexus Change-Id: If5d4ce594f8a309cdb59589d10b1d33f3b79326c
* Reduced the number of calls that did the same thing in the Folder class.Mindy Pereira2012-07-301-3/+3
| | | | | | The new method is just Folder.toString Change-Id: I28fe0cc6e0adb110645941acd4990957283e5b03
* Handle ALERT response to login commandMarc Blank2012-07-271-3/+9
| | | | | | | | | | | | * Allow AccountService loginFailed API to take a reason string * Present the reason string in the dialog shown from the login failure notification * Handle ALERTs in IMAP login responses (for example, some servers will occasionally require web login and we need to inform them, rather than simply saying the password is wrong) * This fixes a longstanding bug in our Imap1 implementation Change-Id: I8b270cd5d4746559b6c8a78bce02f0e7c525bdea
* Account and Folder are both json objects now.Mindy Pereira2012-07-161-3/+5
| | | | | | | | | We dont have a seperate parcelable account and serialized account string (for pending and regular intents) Fixes b/6805342 Email crash on opening message from notification bar Change-Id: I5b310fbafefb8dd82b9e222421fb624703b1676b
* DO NOT MERGE: Move emailcommon2 sources to emailcommonMarc Blank2012-06-281-185/+437
| | | | Change-Id: I06df7e467cd2e0117df8b8db3ddc6ff9da13f1c7
* set FLAG_ACTIVITY_TASK_ON_HOME on notification intentPaul Westbrook2012-04-261-1/+2
| | | | | Bug: 6384825 Change-Id: I9fc577ab3acdc608ce6e1781d438cc049c6ddcd6
* Revert to old Email appMarc Blank2012-04-251-175/+150
| | | | | | * These are the last sources in the ICS-MR1 tree Change-Id: Ida4651bddd92a06a518d00f3e1f275ab3a80c8ae
* Fix IMAP/POP notificationsMarc Blank2012-03-051-8/+2
| | | | | | | * Make sure the default Inbox is always notified * Use correct "new" count for mailbox Change-Id: Id66c76e415589f6eb6fdad0649ae039fd45c1205
* Fix clearing of mailbox notificationsMarc Blank2012-02-261-8/+30
| | | | Change-Id: Ieb98a8908ec067229dd449790da55085585ef17b
* Notify by mailbox, rather than accountMarc Blank2012-02-241-137/+100
| | | | | | | * Update EmailProvider, removing two no-longer-used columns in Account and Mailbox Change-Id: Ie0f10eb0ca315d73e82be968f7760a51a239ba3f
* Clear back stack and make this the top level stack.Mindy Pereira2011-12-081-1/+1
| | | | | | Fixes b/5716835 back stack in email gets messed up in certain circumstances Change-Id: I6fb593a520931b16e973f025c00709f7e76bb4d9
* Rewrite of security policy handling and service codeMarc Blank2011-10-251-9/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove PolicyService APIs policiesRequired, policiesUpdated, isSupported, clearUnsupportedPolicies, and isActiveAdmin * Add PolicyService API setAccountPolicy, which is the sole method by which security policies are promulgated * Add protocolPoliciesEnabled and protocolPoliciesUnsupported to the Policy class; these are packed, localized strings indicating policies that the protocol itself have enabled and/or cannot support (i.e. these are policies that are unknown to the DPM, e.g. don't load attachments) * Differentiate in security notifications between three kinds of policy changes - changes that don't require user intervention (e.g. reducing requirements), changes that require user intervention (the legacy notification), and changes that make the account unsyncable (e.g. the server adding an unsupportable policy). Handle all possible policy changes cleanly. * Make security notifications per account (with multiple accounts, notifications would get arbitrarily munged) * Expose ALL enforced policies via the account settings screen in two categories: policies enforced (including both policies enforced by the DPM and policies enforced by the protocol) and policies unsupported (note that these can only be seen if policies are changed after an account is created; we do not allow the creation of an account when any required policies are unsupported). Add a button that forces a sync attempt, for accounts that are locked out, but whose policies have changed on the server (this would otherwise require a reboot). * Updated unit tests Bug: 5398682 Bug: 5393724 Bug: 5379682 Change-Id: I4a3df823913a809874ed959d228177f0fc799281
* Drop in notification for multiple new mailsBen Komalo2011-08-171-1/+6
| | | | | Bug: 5058000 Change-Id: Ic852004f8f154943742cf40ccfb6063a736d4cae
* Make "security required" notification ongoingMarc Blank2011-07-281-4/+16
| | | | | | | | | | | | | | | | | | | * While investigating the referenced bug, it was discovered that canceling the "security required" notification (with "X", rather than the "cancel" option in the dialog) causes the notification to be unavailable until a reboot * This puts the account needing a security update in the position of being unsyncable, and might explain the referenced bug (we have no confirmation of that step; on the other hand, the tester can't now reproduce the problem, so an unusual action like this is to be expected) * The fix consists of making this particular notification "ongoing", which prevents the user from dismissing it; arguably, this should always have been the case anyway... * Consider this fix for backport into LTE and MR2 branches Bug: 5072343 Change-Id: Ia7419236cf9389380d1e079b1a9a6f425015c487
* Ignore notifications for unloaded messagesBen Komalo2011-07-221-4/+6
| | | | | | | | | Seems like POP envelopes could get into the database and tickle the NotificationController even before we got the full subject/sender. Just ignore those things until the basic info is loaded. Bug: 5061271 Change-Id: Iadfbff8a1615d2644880f5cae3727768f4f9549a
* Fix notification issues.Ben Komalo2011-07-221-5/+21
| | | | | | | | | | | | | | | - use title as ticker text - also properly play notification sounds on new messages. Before, if you left a notification unread, and a new message comes in, no sound would be played. Since fixing that, it introduces another issue where on initial sync, tons of new messages come in (and the sync could take > 1 min). We throttle them with a 15 second interval. The notification is always updated to reflect the most up to date information, but sounds will never be played closer than 15 seconds together. Bug: 5020191 Bug: 5067059 Change-Id: I5ca474fd3b210ee856035bd78bd72931da80fe40
* Guard against null items in NotificationControllerBen Komalo2011-07-211-8/+38
| | | | | | | | | If the account is in the process of being deleted, large parts of its data may be being removed in parallel with notification processing. We never handled this very well. Bug: 5058333 Change-Id: Ic588b68438a9c5829e7e3fd5c8d52e21a037b9f4
* Remove NotificationService; use Account columns for data storageMarc Blank2011-07-191-31/+22
| | | | | Bug: 5023662 Change-Id: I84df3b474dd6320327851003af985144cc16348e
* Fix notification Intent.Ben Komalo2011-07-101-3/+3
| | | | | | | | This changes it so that the message list is shown if there are multiple unseen messages. Bug: 5011855 Change-Id: I14cbcfaa32cc5e2b4cb718449c62b8f39b290d4d
* Update notification text according to designBen Komalo2011-06-231-27/+29
| | | | | | | - "UNSEEN new messages" is the title for multiple new messages - the small number in the right shows the unread count Change-Id: I48f761b727ea8abc9277d737a08789fa63d10871
* Improve EmailContent caching...Marc Blank2011-06-211-20/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Guarantee that up to 16 Account (with HostAuths), and Policy rows are always cached. Also, 6 commonly used Mailboxes per Account (Inbox, Outbox, Drafts, Sent, Trash, and Search) * Precache these rows when EmailProvider starts up * Ensure that newly added, precachable rows are cached when created * Clean up some inefficient/wrong caching code * Fix a commonly called method in NotificationManager in which we load a single Mailbox row using selection vs withAppendedId * Confirm that we don't read from the database in typical use and heavy message loading * Add a special URI for finding mailbox by type (using the cache) * Add special-case code for EmailContent.count(Account.CONTENT_URI) which is used in a number of places (including on the UI thread) and whose value is easily determined * Add a special URI to get the default account id * Confirm that all unit tests work The goal here is to be able to load all Account, HostAuth, Policy, and Mailbox objects (by id) without worrying about disk access. There will still be a single disk read for uncommon Mailbox reads, but this should be considered acceptable. Change-Id: Ibc9aa7acc73185e360b0b6f3053b90a985e97210 TODO: Unit tests
* Move Account into its own top-level classMarc Blank2011-06-131-1/+1
| | | | Change-Id: Ide7c991b7d4d418dbe17164421425bf898ba64ee
* Changes for NO_XXXMakoto Onuki2011-05-171-5/+5
| | | | | | | | | - Added Message.NO_MESSAGE - Renamed PSEUDO_ACCOUNT_ID_NONE to NO_ACCOUNT - Removed PARENT_KEY_NONE and use NO_MAILBOX instead - For starters, cleaned up the UI controllers to use them. Change-Id: I6cfd87ece2fced8e9f7c76d034c4d1dbf9e4db10