Commit Graph

68 Commits

Author SHA1 Message Date
Tony Mantler c6953b7755 Reimplement QuickResponse support
b/8622751

Change-Id: Id079efcf34dce15b5f5057f937582c0e198d3d50
2013-08-16 14:08:54 -07:00
Paul Westbrook 7985b43ab7 Add public no-arg Fragment constructors
Bug: 10311630
Change-Id: I0243462cdc28b9af3151754a8c8583330418579b
2013-08-13 16:43:34 -07:00
Tony Mantler 6cf15e66bc Re-add the demon "Add New Account"
b/10041669

Change-Id: I2b1db0a063ec292b33ec8f176b739c1c4422a040
2013-07-29 11:19:23 -07:00
Tony Mantler a48929fac4 Purge the demon "Add New Account"
b/9857109 b/9685360

Change-Id: If5c3d6ea4b59cacf8196cdda67fbaeb6e2afa03e
2013-07-22 13:48:53 -07:00
Scott Kennedy 281c6365fb Add a new FolderUri
This will allow us to add query parameters such that Uris will still
appear to be equal, regardless of differences in the parameters.

Bug: 9780067
Change-Id: I483d009fe3681ec3d4323b3ca95dff8ca9f4ffde
2013-07-16 12:12:23 -07:00
Paul Westbrook dbb8b75a4b Fix feedback from Email settings
Bug: 9428466
Change-Id: I6816976b858a6a15da7d643320983208287a463a
2013-07-11 13:13:11 -07:00
Scott Kennedy 1b8e0fa23f Clean up a bunch of warnings
Bug: 9565838
Change-Id: I5e95562bbf463f057cbcc4a9884427a774473b45
2013-06-25 15:34:32 -07:00
Paul Westbrook 525e8ad321 Move support for settings menu to UnifiedEmail
Move the base settings menu to UnifiedEmail

Bug: 9393150
Change-Id: Ifa69125d84802a0d7dd2275e4704ec7a4d1fb2f1
2013-06-12 23:52:43 -07:00
Paul Westbrook 38f22dbf08 Use "show pictures" code from UnifiedEmail
Bug: 9320770
Change-Id: I701a93e2f09b8405a2c4bc56f7793f5abadbcd1e
2013-06-07 18:09:57 -07:00
Scott Kennedy 560bfadc31 Unify LogTag
There is now only one LogTag class. The static initializer of
GmailApplication (existing) and EmailApplication (new) will now set
the log tag to "Gmail" and "Email", respectively. Up until that code
is run, it will be "UnifiedEmail".

"setprop log.tag.Gmail VERBOSE" (or .Email) will trigger all logs to
be printed as long as they go through LogUtils, regardless of what tag
is used by that individual log. This lets us still turn on logging
everywhere in one command, but also lets us use more descriptive tags
(like the class name).

And since we no longer have three com.android.mail.utils.LogTag
classes, builds will be much easier.

Also, we now use LogUtils everywhere.

Change-Id: I55f1c7a66ce50ead54877a13e40256422a56dc39
2013-06-05 20:06:15 -07:00
Yu Ping Hu 0eb47994a3 Code cleanup.
- Refactor EmailProvider.call
- Remove unused import

Change-Id: I9f0ae35256856a9cd6ea015348d49fcbb6fa8b0f
2013-04-19 15:59:27 -07:00
Marc Blank 74c79a5043 Modify intent names
Change-Id: Iad8b4842056a7f553363f9af47e65665c2b26a5d
2012-09-10 17:18:32 -07:00
Marc Blank 1bd4630d3d Linkify and show URL's if they are incuded in ALERT messages
* Gmail does this, for example...

Change-Id: I3b8d7b38e490bbac286f688c11cb62e6874121c2
2012-07-27 15:38:17 -07:00
Marc Blank dba0b20d95 Handle ALERT response to login command
* 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
2012-07-27 13:36:41 -07:00
Marc Blank f419287f22 DO NOT MERGE: Move emailcommon2 sources to emailcommon
Change-Id: I06df7e467cd2e0117df8b8db3ddc6ff9da13f1c7
2012-06-28 11:15:06 -07:00
Marc Blank 03cd72805d Revert to old Email app
* These are the last sources in the ICS-MR1 tree

Change-Id: Ida4651bddd92a06a518d00f3e1f275ab3a80c8ae
2012-04-25 13:58:23 -07:00
Marc Blank ebb79619e8 Move account delete logic to EmailProvider
* This functionality had to move away from Controller

Change-Id: I557918a325eab8c83a9728fa1ce33dde8b86158f
2012-03-09 12:59:21 -08:00
Conley Owens 58ce2d0c3a Make TAG field package-private in several classes
Specifically, several internal classes.

This makes a little more sense since they are accessed outside of the
class that they are defined in.

In addition, this fixes errors created by proguard when building with
OpenJDK.

Change-Id: If2e2f90558e04e777a0c4dbc2ccd1f6c46dd8228
2011-12-20 11:58:29 -08:00
Mindy Pereira f579eb8ac3 Add account should be shown on all Email prefs screens and subscreens on tablet.
For phone, should match Gmail and just show it at the top level.
Fixes b/5621803 "Add account" button disappeared - IKXEVERESTLTE-3051

Change-Id: I143043485cbb912023fe015a768c6f37c8cad3f5
2011-11-18 15:25:36 -08:00
Ben Komalo b7d137bfb6 Refresh account list in settings.
Since account deletion is async, the deleted account still shows up for
a split second. We can do something smarter about this later, but not
for ICS, and not worth it for such a rare event

Bug: 5116203
Change-Id: I82cced09b7a098e4a1a960f2d8ad75c1979b0649
2011-08-30 16:25:42 -07:00
Ben Komalo 0e6a521747 Move IntentUtils to emailcommon.
This is needed so Exchange can fire up Email activities.
No change other than the move.

Bug: 5122497
Change-Id: I6ee3f61654745fafd444314ecf75eb8ae6bbd01d
2011-08-08 14:39:19 -07:00
Ben Komalo 72a24f12a2 Misc settings UX fixes.
Bug: 5068602
Change-Id: I02acf3690e98ce747ddb4d3a745ac2fa59948c70
2011-07-22 16:04:10 -07:00
Makoto Onuki bc2eaadde9 Use parallel executor
We should eventually replace all with EmailAsyncTask, but it's the safest thing
we can do now to avoid regression.

Change-Id: I78bfc4fb2be1dcfadeb7f90092ec7adb35c1d393
2011-07-01 11:04:11 -07:00
Marc Blank 35b0e95ca7 Clean up Store implementation
* Remove unused argument from newInstance/constructor
* Create ServiceStore class, the superclass of ExchangeStore (and,
  eventually, all Stores, until they can go away completely)

Change-Id: Ic5237236c5349ecf006538c58b63c1efe8e4ea61
2011-06-29 12:50:43 -07:00
Jorge Lugo bc42ab7706 Quick response clean-up
Highlighting now appears when selecting a quick response. On "insert
quick response" dialog has exactly two lines of quick response shown.
Done also works properly now on the phone.

Known bug: text is not ellipsized. However, this is dependent
on bug 3389545 being fixed by frameworks team.

Change-Id: I7490e139267963d1508fa0573144a10c9190e11c
2011-06-22 20:58:54 -07:00
Jorge Lugo 5a3888f35b Added quick responses.
Added "Insert quick response" button to MessageCompose's action bar. Clicking
it opens dialog with available quick responses. Selecting one of the responses
will insert it into message body at the current cursor location. Also added
menu in account preferences to create, edit, and delete quick responses.

Change-Id: I85f3f6b36801cf112ec9d7c31135a917456173d7
2011-06-20 13:31:50 -07:00
Marc Blank f5418f1f93 Move Account into its own top-level class
Change-Id: Ide7c991b7d4d418dbe17164421425bf898ba64ee
2011-06-13 15:37:22 -07:00
Ben Komalo ee97468feb Fix typo in settings.
This was causing a crash in settings when opening an incoming settings
fragment after initial setup.

Change-Id: Icedd24a3f5e8f378d6725a09c97525450ef74af7
2011-05-20 11:52:13 -07:00
Ben Komalo 3955f6794f Put account email as title on phone settings.
This is kind of a convoluted issue; the framework automatically sets the
breadcrumbs on multi pane settings. However, on single pane, it doesn't
pass any of that breadcrumb info on, and just uses an Intent to start
another instance of the activity with a different Fragment.
Unfortunately, nothing in the default codepath sets the title to
correspond with the breadcrumbs (as it would have been in multipane)

Change-Id: I428642771538bdec3bdaba644f7816a1250ae929
2011-05-13 13:56:26 -07:00
Ben Komalo 2866284a6d Rename AccountSettingsXL -> AccountSettings
This activity already supports phone and tablet mode.
Only renames in this change - no other change.

Change-Id: Ieca17137af45e3860812091f69cd4d9b55ddf3ec
2011-05-13 09:58:15 -07:00
Andrew Stadler 9c65c146f3 Direct access to edit specific account settings
* Finish implementation of AccountSettingsXL.actionSettings()
* Point account manager entry point at it now
* Remove old AccountSettings activity
* Move AccountSettingsTests over to AccountSettingsXLTests and minor
  cleanups so it works in fragmentized activity.

Change-Id: I5f979a3a9a29dcbbe5a63833b184e6c0313652d5
2010-09-01 21:17:53 -07:00
Andrew Stadler a14a24a5bc Add Add & Remove Account options to AccountSettingsXL
* Add account is a large (+) in the action bar
* Remove account is a new item at the bottom of the settings fragment
Note: Add account works, remove account just toasts for now.

Change-Id: I5b3b8ab8c7d328cb78d103c47b9eca866466f9df
2010-08-19 16:28:52 -07:00
Andrew Stadler 5122417625 Make AccountSettingsXL the main settings UI
* Connect to it from all call sites
* Remove 1-pane and 2-pane icons
* Leave a few more breadcrumbs for launching into specific account
* Update the long TODO list in AccountSettingsXL

Change-Id: I502eda9a622518e8d4a23d46989340ad400cdd34
2010-08-18 16:47:42 -07:00
Andrew Stadler 2ae2a12d6b Initial implementation of SettingsXL (checkpoint)
* Create AccountSettingsXL
* Build headers dynamically based on accounts
* Launch account settings per-account
* Temporary launch point from menu in AccountFolderList

TODO: Fragment flip to incoming/outgoing/checksettings not implemented yet
TODO: Use more recent updates to PreferenceActivity
TODO: Finish plumbing into account settings fragment
TODO: Something more real for app settings

Change-Id: I6f4c5bb8cf691f25517c25950ef2049084335ce3
2010-08-18 11:29:46 -07:00
Andrew Stadler 71cc035c55 Fragmentize AccountSettings
This is phase 1, which simply replaces the phone UX with a fragment-based
equivalent.  A subsequent CL will convert it to a large-format multi-pane
version.

Also fix a latent bug in the signatures of the Incoming & Outgoing
settings, both in the reflection code and in the proguard flags.

Change-Id: I86e857af8b9573c0d6070bb21053ce65bb7fe8a0
2010-08-09 10:36:50 -07:00
Marc Blank e6cc662abc Use AccountManager for POP/IMAP; refactor setup classes
There are two major, interrelated parts to this CL:

1) Clean up the activities to reduce the use of Intents to pass
   information between activities; instead, we use a common
   SetupData structure that automatically saved/restored as necessary
   during the setup flow.  A fair amount of code and inconsistent
   use of Bundle extras has been eliminated in the process.

   * Create SetupData structure, setters/getters, and initialization
     methods to simplify the preservation of state during setup flow
   * Remove all state/flow extras from Intents; Intents now only
     specify the Activity to be started, which should greatly simplify
     the transition to Fragments.
   * Remove all state/flow fields from Activities
   * Modify existing setup activity unit tests and confirm tests pass

2) Create AccountManager accounts for POP/IMAP email accounts to
   provide consistency in user experience.  Also, internal flows are
   now identical as between account types.

   * Move account reconciliation from SyncManager to MailService, so
     that reconciliation is consistent between email and exchange
     accounts; move unit tests as appropriate
   * Add a "Sync Email" setting for POP/IMAP/EAS
   * Change MailService to respect the "Sync Email" setting in
     Settings -> Accounts & sync
   * Create PopImapSyncAdapterService to handle manual POP/IMAP sync as
     requested by SyncManager; add EmailSyncAdapterService to perform
     the same function for EAS
   * Use new PopImapAuthenticatorService to add AccountManager accounts
     for POP/IMAP accounts; setup appropriate stanzas in AndroidManifest
     and add related xml files
   * Update AccountSettings to use SetupData

Miscellaneous other changes:

   * Only allow valid port numbers in incoming/outgoing setup

Bug: 1712475

Change-Id: Ibdac52fb2c5578b86bf3992ddb1acd10f162391a
2010-07-21 19:01:41 -07:00
Andrew Stadler 5e354cd1db Exit most activities when accounts are deleted
This resolves cases like this:  You are in the inbox of an Exchange
account.  You click home, settings, accounts & sync, and you delete
the account.  Now re-enter the Email app.  You'll be left in a strangely
empty inbox, for an account that no longer exists.

* Set a flag any time the reconciler deletes an account
* Check that flag in onResume of any activity that depends on the account
    list and could be left in an "empty" state if account(s) are deleted.
* The Activities in which we check it are:
  * AccountFolderList
  * AccountSettings
  * MailboxList
  * MessageCompose
  * MessageList
  * MessageView
* Clear the flag any time we come in through Welcome, which will dispatch
    to other activities properly based on the number of accounts found.

Bug: 2563998
Change-Id: I00fc542581c2bed92d744a4c2e48a88f83737f11
2010-04-14 09:28:04 -07:00
Jim Shuma 9e2ddca59d Add "vibrate when silent" mode to notifications
* Add "vibrate when silent" choice in UI
* Add storage for it in Email's provider.  Existing accounts default to
  their current settings (always vibrate / never vibrate).
* Respect new mode when notifications are posted
* Updated existing unit tests

Bug: 2457183
Change-Id: I5c933ac39dbef8b2028255f330e0b084a445421a
2010-03-18 13:57:25 -07:00
Marc Blank a1c997a2b6 Add calendar sync checkbox to account settings screen
Bug: 2414157
Change-Id: I60ead139552f3e7c86b113f8b8b10ef3cf57abbf
2010-02-04 10:28:37 -08:00
satok d9080ed32e Add UI for Signature in Email Application
Bug: 1323618

- changed summary of signature to show hint if signature is not set
2010-02-04 10:28:55 +09:00
Makoto Onuki 91237e9dcb Adding script for building Email app without exchange.
remove-exchange-support.sh makes it possible to build the email app without
exchange support.

This script:
- removes all packages under com.android.exchange.
- removes all lines surrounded by EXCHANGE-REMOVE-SECTION-START and
  EXCHANGE-REMOVE-SECTION-END

And the resulting source should still build and run fine.

Bug: 2369784
2010-02-03 11:39:46 -08:00
Makoto Onuki faed6178b1 Move Eas.ACCOUNT_MANAGER_TYPE out of the package.
Moved Eas.ACCOUNT_MANAGER_TYPE to Email.EXCHANGE_ACCOUNT_MANAGER_TYPE.

This constant is not related to the exchange protocol, and referred in
a lot of different places.  Moving it out of the package will make it a lot
simpler when removing exchange dependency.
2010-02-01 15:38:15 -08:00
Marc Blank 7b79163aac Show "sync contacts" setting properly in the settings page
Change-Id: I9c198e7795a8f2ea348361092eae22c8ff22a1a0
2009-09-21 10:39:10 -07:00
Marc Blank 7041dc5d1b Reconnect Settings -> Accounts to Email account settings screen
* This was broken during the AccountManager naming reversion

Change-Id: Ib2ccc9ca187ffdaf4a978c3c8111808be50d1583
2009-09-20 14:56:02 -07:00
Andrew Stadler cd1e207200 Fix NPE when entering account settings. 2009-09-18 15:13:12 -07:00
Marc Blank 91f12b8d52 Fix problem with account settings not being saved (#2131153)
Change-Id: I6845604c6f3326e136060cace55fc53fcca867c9
2009-09-18 12:39:42 -07:00
Marc Blank eadb55b04e Implement hooks from Settings->Accounts to Exchange account setu
* Fixes #2106718
* Fixes #2106733
* Remove "Add another account" from the preference screen

Change-Id: I8db1400d2bdb6ed7d3aeb2049cc1a399c47c38c5
2009-09-18 09:19:41 -07:00
Andrew Stadler 01f61ef912 Fix acct settings -> inbox checks -> notifications
This cleans up a number of bugs that could be generically described as
"MailService and Notifications not being updated when accounts or account
settings are changed."

This also fixes a number of race conditions, one of which was causing
accounts to be refreshed in a nearly-endless loop, and another which
could cause an endless loop of alarms to be posted & fired..

Specific changes:
* Update/reschedule any time an account is edited (this was accidentally
    broken and being handled on EAS only.)
* Make sure we reschedule if an account becomes unavailable
* Clear notifications whenever refreshing accounts
* Reload local copy of account settings whenever refreshing accounts
* When restoring prev sync times (this happens when process is killed),
    be sure to also recalculate next sync times.
* Set flags on the pending intents to make sure old pending intents are
    not being reused.
* Set a watchdog each time we check the mail, so if we are killed during
    the mail check, we will be woken up again to retry.
* Fix a 2nd race condition in which a just-created account fails to sync,
    due to not (yet) having an inbox.
* Clean up handling of Controller callback:
  * Fix a minor bug in which refresh of non-inbox mailboxes would delay
      the next timed sync of the inbox for that account.
  * If the checkmail ended in an error (result != null) the service was
      never rescheduled.

Bugs Fixed:
bug 2078149 - Update service and notifications when account settings
   change or accounts are added/deleted.
bug 2084412 - Fix race condition caused by first intent being refired
bug 2071484 - Make sure we wake up later if killed during mail check

Change-Id: I3ee0d1b389c652351de5eb798c32a2daea244067
2009-09-17 18:35:43 -07:00
Marc Blank e428f94161 Add "Sync Contacts" to Account preferences screen (part of #2106733)
* Also added some checks for null Accounts and HostAuth

Change-Id: Ia4ae68d0e8a62abdaf002519766b6685b6947e9e
2009-09-16 16:07:27 -07:00
Andrew Stadler 6c21942ec4 Implement move-to-trash for IMAP and POP3.
* Define new message-loaded state "FLAG_LOADED_DELETED" (used only for
   POP3, which needs to write sentinel messages that are not displayed.)
* Also renamed the other flags to make the naming more consistent.
* Tweak MessageList query generation to inhibit display of deleted
    message sentinels, and MessagingController won't try to resync them.
* Clean up implementation of Controller.deleteMessage()
* Add support for move to trash to MessagingController.  This operates
    in three primary modes:
  * POP3 local delete (no server-side interaction)
  * POP3 server delete
  * IMAP server delete (and copy to IMAP trash mailbox)
* Add missing implementation in provider to delete all of the attachments
    for a given message
* Fix progress reporting in activities (the test for error vs. progress
    was inverted, which caused progress indicators to keep spinning
    after errors.)
* Fix broken account settings UI (POP3 delete policy was not persisting)

Addresses bug 2097409

TODO delete from trash / empty trash

Change-Id: I00188e6dc2093823106e009f35b68c760227c9e6
2009-09-10 12:44:05 -07:00