We should eventually replace all with EmailAsyncTask, but it's the safest thing
we can do now to avoid regression.
Change-Id: I78bfc4fb2be1dcfadeb7f90092ec7adb35c1d393
Also added test.
(For some reason the message count doesn't get set properly on tests...
I'll investigate it when I get around to it...)
Change-Id: I83f3b6f2079da06b2d4973419d2296e6492de1d3
If the initial mailbox has child mailboxes, we should show the drilled-in
view by default, EXCEPT if the initial mailbox is inbox, in which case
we want to show the root view.
(And we drill-in if the user taps Inbox.)
Bug 4901592
Change-Id: Idc1462030cf8d971dd4dcbba647ac3a64cab6819
The check settings fragment could potentially take a while to finish,
and may finish after the activity has shut down. Ensure that the
callbacks don't go through if that happens (usually means the user
backed out before it finished)
Bug: 4689161
Change-Id: Ie8e052f03a8f8f2884c0fe1e334a91c02444f96c
Pressing the email widget's logo will open up the account's inbox.
Also, composing a new email open the compose window for that
account instead of an arbitrary account as before.
Bug: 3366819
Change-Id: I03c0d6973f5428b2044e755f41fcc6f4da225afa
We suspect the underlying bug is b/4981556 but it is a framework issue
which needs time to fix. Some fragment state is not restored properly
when going through orientation change, so navigation shortly after that
will always crash.
Change-Id: Id6b8714c2aeac5f6bf09e82aea5459bb19d0054d
Even with CL the account spinner on the starred mailbox looks still a bit
weird because the spinner turns into the combined mode even if you select
the starred mailbox from a normail account's mailbox list, but at least
you'll be able to get out of the starred mailbox.
Change-Id: I26a256be39f070acece67f4a308a8525a6be1d3b
- shows the title of the message in the action bar (visuals not final -
need to extend the width and hide the account name)
- ensures that tapping up/back from a message view from a search result
list doesn't exit search
- ensures that tapping "app up" from a collapsible tablet view doesn't
exist the search unless the left pane is uncollapsed
Change-Id: I2b21a430d12148cf72237060c05312c7a23e2b3b
There are needed for the back navigation when a message
is opened from a deep link, but now that we always have a list context
they're not necessary.
Change-Id: Iba2d0b2f31f4539f6e872970b514574347e248c5
- Moved MessageOrderManager code from 2-pabe to the base class.
- Most of the code is shared between 1-pane and 2-pane.
- Also fixed the bug where we re-created MessageOrderManager every time
the user taps newer/older, which was the reson the newer/older button
temporarily got disabled when you tapped them.
Before this CL we stopped MOM in uninstallMessageViewFragment, but now that
we don't reuse fragments this means we stops MOM when we remove the current
message view, and re-created a new one when a new message view is created.
Now we stop MOM when the right pane gets hidden (2pane) or when showing
the mailbox/message list (1pane).
- Also removed a now unused callback onMessageShown() from MessageViewFragment.
We used to update MOM on this event, but now we do this in
installMessageViweFramgment().
Bug 4575586
Change-Id: Idc4aba184f318e0c086afc29dcbe42364e2b51b3
It was caused by the fact that we show the combined starred mailbox
on each account's mailbox list.
Beacuse of this, when you open the starred mailbox on non-combined view,
we pass a normal account ID + the combined starred mailbox ID to the
AccountsLoader, which then thinks that because the account ID is not
ACCOUNT_ID_COMBINED_VIEW the mailbox ID must be of a regular mailbox,
issues a query to get mailbox info, and crashes because the mailbox
is virtual.
- Also fixed the issue that we don't show message count on the account
spinner for combined mailboxes.
bug 4971181
Change-Id: Iaa13b362505b8babc7f7ea8a03ddf5494736dc2d
This way we don't have to explicitly filter it in all the different
places we do selections on mailboxes.
Note that I didn't create an upgrade path for this. The only people with
search mailboxes are probably developers right now, and worst case for
people who experimented, they will just get the search mailbox visible
Change-Id: I9a0bf6df9985418d467a7348ed99a36521641b89
- update hint based on the mailbox being searched
- ensure that we use the original searched mailbox as the mailbox to
search for subsequent search (i.e. a search while we're viewing search
results) and not the search mailbox
Change-Id: Ic8663272173ce386dcd13fdf0369e918fb895be8
* ImapFolder is currently very unsafe for use by multiple threads,
causing, among other things, the referenced bug
* Since ImapFolder is very lightweight, there's no particularly good
reason to be caching them anyway
* Rename isOpenForTest to isOpen
Bug: 4972084
Change-Id: I2bf17b9cfc8549a222e991f3e59abfd00a4d3afd
* 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
Renamed onPostExecute to onSuccess and made sure it won't called
if a task is cancelled in time.
Also removed isCancelled(). To implement it right we should make sure
that onPostExecute() isn't finished when setting mCancelled, but it's a bit
of a pain to implement right, and we don't really have to use it.
Change-Id: I3a0baf504506ffc4952a5553f7098a8415842fa3
- Back from the starred mailbox now works.
- Combined view now has the "show all folders" in the spinner.
- Null-out the list context when opening the mailbox list.
- Properly restore the list context when popping from the back stack.
- Disable the account spinner dropdown on the mailbox list.
- Hide the little triangle thing at the right bottom corner of the spinner
when it's not selectable.
Bug 4836064
Bug 4689313
Change-Id: I41d1b6c7024953407b260f5b4b63fbc366e538ca
This loader will abstract away the waiting for the controller to cleanup
the existing contents of the search mailbox
After some additional, to-be-done plumbing, I'd like
Controller.searchMessages to return some results info (like # of results
at the least) so that the SearchCursor returned can relay that
information to the client (which can then do a lot more interesting
things at that point).
Change-Id: Ifcba0ddf7170c56dac9f3b44128988a5aa4ca887
To fix "IllegalStateException: Can not perform this action after
onSaveInstanceState".
Bug 4522010
Change-Id: I640fab0d51b02467f2f91d0d33091e1daac356fd
- Don't use the action bar spinner.
Instead use a custom view to show the current account.
(It's not a spinner; now we show the dropdown list by ourselves,
which gives us more detailed control.)
- Also show the current mailbox name/unread count with the account name.
- Removed the mailbox info loader in ABC.
Instead, now the AccountSelectorAdapter loader loads the current
account/mailbox name, and the unread count as extras.
- Now ABC.Callback.onMailboxSelected passed an account ID as well
as a mailbox ID.
- There's new code paths that can cause the "fragment transaction in
onLoadFinished" exception. We need to fix this properly, but
for now we just use commitAllowingStateLoss().
Bug 4948352
Change-Id: I73bb8b7530f8328ca1c86382ac0a54086ad061d7
* Rename ExchangeUtils to EmailServiceUtils
* Create calls for Exchange to use (eventually remove these)
* Get rid of lots of nonsense in ExchangeStore
Change-Id: Ic538cfe1de57eca24088ee1f590264283d12f511
This is the UI part for remembering to show images based on senders.
It does not persist anything yet.
Change-Id: Iec40d9d1ace3661dabca2eed31ea6d0893be71e0
frameworks/base
Extended KeyChain.chooserPrivateKeyAlias to allow caller to supply
preferred choice to be selected in chooser. This allows Email
settings to highlight the current choice when allowing user to
change settings.
keystore/java/android/security/KeyChain.java
api/current.txt
Implemented KeyChain functionality to pass host and port
information to KeyChainActivity for display.
keystore/java/android/security/KeyChain.java
KeyChain now sends a PendingIntent as part of the Intent it sends
to the KeyChainActivity which can be used to identify the caller
in reliable way.
keystore/java/android/security/KeyChain.java
Moved .pfx/.p12/.cer/.crt constants to Credentials for reuse.
Added Credentials.install variant with no value for use from KeyChainActivity
keystore/java/android/security/Credentials.java
packages/apps/CertInstaller
Source of extension constants now in Credentials
src/com/android/certinstaller/CertFile.java
packages/apps/Browser
Have browser supply host and port information to KeyChain.choosePrivateKeyAlias
Tracking KeyChain.choosePrivateKeyAlias API change
src/com/android/browser/Tab.java
packages/apps/Email
Tracking KeyChain.choosePrivateKeyAlias API change
src/com/android/email/view/CertificateSelector.java
packages/apps/KeyChain
KeyChain now depends on bouncycastle X509Name for formatting
X500Principals, since the 4 X500Principal formatting options could
not format emailAddress attributes in a human readable way and its
the most important attribute to display for client certificates in
most cases.
Android.mk
Changing the UI to a dialog, make the activity style transparent.
AndroidManifest.xml
res/values/styles.xml
Layout for chooser dialog
res/layout/cert_chooser.xml
Layout for list items in chooser
res/layout/cert_item.xml
New resources for dialog including comments for translators.
res/values/strings.xml
New dialog based KeyChainActivity. Now also shows requesting app
and requesting server. Now can preselect a specified alias. New
link directly to CertInstaller.
src/com/android/keychain/KeyChainActivity.java
Fix KeyChainTestActivity to work with TestKeyStore changes that
were causing network activity on the UI to look up the name of
localhost. Also track KeyChain.choosePrivateKeyAlias API change.
tests/src/com/android/keychain/tests/KeyChainTestActivity.java
Change-Id: I131f7708cede39669491a23ead3860907460d31f
* Use same code for handling search mailbox for IMAP and EAS
* Allow "Load More" for EAS search mailbox
Change-Id: Id4a009c79a95302d627ff25f85e9c65bc461826f
* Add protocolSearchInfo column to Message table; this can be used
to store information related to search results. For IMAP, we
store the serverId of the mailbox that the message lives in on
the server
* Add upgrade code for this column
* Change MessagingController to use the proper serverId for remote
operations, depending on whether the Message is a search result
or not
* Fix some smaller issues with earlier code
Change-Id: I0c7f1d89a4659b95701d02646c0e8426680e2f6a
- "UNSEEN new messages" is the title for multiple new messages
- the small number in the right shows the unread count
Change-Id: I48f761b727ea8abc9277d737a08789fa63d10871
Before this CL, we had this crazy plumbing from MailboxListFragment
to ActionBarController to update the current mailbox name/message count.
This wouldn't work on 1-pane, so now ABC just gets the current mailbox id
from UIC and loads the name/count with its own loader.
Also...
- Fixed bug 4904450 and bug 4460470: Now we consistently use FolderProperties
to get proler display names and message counts.
- Renamed some confusing names in AccountSelectorAdapter
Change-Id: Ic7bea6da6d2859006fb8f9263024c7d5e62b1e7f
- All mailboxes will be shown when selecting a shortcut for a normal
account.
- Combined unread won't show up in shortcuts for combined accounts
- only inbox is allowed for IMAP/POP widgets
- all mailboxes allowed for EAS widgets
Bug: 4725896
Change-Id: I5c77c2f5443e330ed451179761b1d9c8c0dd7619
* Update existing database to add this flag for IMAP accounts
* Set flag when creating IMAP accounts
* Change temporary UI to use the flag exclusively
Change-Id: Idefccd3a74d2222fe8a0ba47116dee981a0ae1f5
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
* At present, we will cache empty cursors (i.e. where the query
result had zero rows)
* If a widget (or shortcut) references a deleted account, this will
create a cached entry for that account, and the defaultAccountId
code will try to retrieve the isDefault column from that (empty)
cursor
* To fix this, we simply skip over empty cursors when looking for
a default account
* We will also look into whether it makes sense to cache zero-
length cursors
Bug: 4883043
Change-Id: Id998506f77bd6cda6cb1f5d8ce65d689dde4d2c5
- actually fires off a new instance of our Activity for search, instead
of killing the old one
- exiting search mode from a search result now works and pops the
activity stack
- doing a new search clears the input box as expected
- the search term is actually shown at the top in the results list
Change-Id: Ia6b92042e26a2e44b8cb45fe1d5b3bfb40cfd6da
There was an assumption that the list view would only contain MailboxListItem's.
Now it's not always the case with the headers like "recent folders".
Also killed the timer thing for the nested navigation during DnD.
Bug 4904006
Change-Id: I4ee756775d0115f3a39086758be69100c19163c9
Also fixed the text alignment in the tabs on the 2-pane message view.
We don't yet to have the full-spec for this, so it's still temporary.
Now we again wrap the webview in a scroll view, so we'll have the "message
keeps growing" issue again. I'll file a bug for this.
It's still temporary, so I didn't remove the scroll views for the
each section (e.g. the attachment tab). Also I had to make up some
colors/dimensions which were unspecified. Also I didn't always define
styles when I should. Let's clean up these things later when we
get more detailed spec.
Change-Id: Ibdb78543f5ec7300f92091d1f8b800ca5edc74b2
* This wasn't working with the new code and the unit test wasn't
testing this case.
* Updated code in EmailProvider and added a test case
Change-Id: I75c23423c4f43e4201d446886d92a5312fa8a084
This will encapsulate meta information about a message list. Notably the
mailbox it's showing OR the search parameters that were used to build
its contents.
Change-Id: Ibe078a700860e7b9426c865e843e899f82306a96
1) Have CachedCursor implement CrossProcessCursor; still need to
figure out how this ever worked
2) Close cursor used internally in findMailboxOfType
Bug: 4869024
Change-Id: Id20d37b7b83e133aa4d5fe9293a42ae217024f01
* 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
On phones it was being pushed out beyond the width of the phone.
Make it so that it fits the whole width in phone portrait, and is fixed
size in landscape / tablets.
Change-Id: Ifc712002c4df38ceb4bd3577f0cbb48114b41115
Instead, in switchAccount, if the account doesn't have Inbox, we'll
redirect to Welcome and close EmailActivity.
(This will easily happen if you add a second account from the system settings,
launch the app and switch to the new account.)
Change-Id: Ia03d8e6697b58f6fcf10fd95fbcb5e310a5b5305
- Show "Your email will appear shortly" during the initial sync
- Don't close self in onStop if it's because of configuration changes.
Change-Id: Ic60f25c58712c599c735b2bede1627d4e102eb6b
If the address of the account is in the reply-to: field (or from: field
when reply-to: is empty), now populates the To: field with the same To:
field on reply.
Bug: 3504182
Change-Id: I17d7fe4be002b302decb8f0dae95f33d452b7adc
* These broke when we split Email/Exchange
* We now use a test authenticator and a test account type, which
is actually far cleaner than dealing with actual accounts
Change-Id: Ib7c9f884eac484c33642a8036f47466ce641c567
This hides the main navigation controls when the search view is shown.
It also fixes issues with rotation when in search mode.
Change-Id: I5ffed8eb7549fc603fc4e4d1868d114be65112c3
Some of the tests are still failing, but at least now we can go through till
the end.
- Fixed NPE in WelcomeTests (caused by the mock context not returning a proper
layout inflator.)
- Removed the rainy day test from MessageFileViewTest.
(Not setting a proper intent will result in the argument check in
MessageFileViewFragment)
- Removed unnecessary null check in EmailProvider.getDatabase()
Bug 4766072
Change-Id: I48b92cc91d0417cd9980c131fda8f63a9a6eb990
In order to reduce the UI initialization code, move
let EmailProvider restore accounts when it opens the DB.
Backup can be moved too, but I just leave it as a TODO.
Change-Id: Id5c1810904db6abaecbfecbaa8d2d53834ebf07b
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
In MessageCompose, pressing reply, reply all, or forward and then selecting
back without writing or modifying any part of the message will no longer
increase the draft count. Additionally, entering the compose window and
immediately rotating the screen before pressing the back key no longer
increases the draft count either.
Bug: 4584605
Bug: 4501806
Change-Id: I74db3f05d696b23fa7d0d64ae87e06fade4c57ee
I'm changing it so that inbox finding happens at an earlier stage so
that the UIController.open() methods can be simpler. Specifically: I
want them to just always accept a mailbox, and not have to deal with an
intermediate state where it's still looking for a mailbox.
Change-Id: I1c5be783859a3bee7e46007e778de13eb1685cbe
This moves the logic for performing the search closer to where it will
actually happen (i.e. on Intent resolution). A lot of this is still
temporary code. I will follow up with some larger changes to extend the
UIController API so it doesn't have to do hacks internally.
Change-Id: I1eb84d26ee3dcbfa0b68dbd37dcb0a6180452962
* Broke up synchronizeMailboxGeneric into three pieces; it's still
horrible, but this at least stops my eyes from bleeding
* Remove unused method/tests from Folder interface
Change-Id: Ib4d979536be657137cf70ca535cf429d707be41b
When the KeyStore fails to give us back a certificate for any reason (it
was removed from the keystore perhaps), propagate the error back up.
Change-Id: I4f0ef783c1665589cc8ccb43d95da43a297a3e9a