Commit Graph

5839 Commits

Author SHA1 Message Date
Makoto Onuki
a6212c88e0 Fix bug 4978035 Precondition failure: Not combined mailbox
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
2011-07-01 10:18:13 -07:00
Makoto Onuki
45bfb10464 Merge "Fix bug 4901592 Do not drill-in to inbox by default" 2011-07-01 10:06:55 -07:00
Marc Blank
983fd116b1 Merge "Delete orphaned mailboxes/messages/policies at provider startup" 2011-07-01 09:22:11 -07:00
Marc Blank
2bdf7ee0f0 Delete orphaned mailboxes/messages/policies at provider startup
Bug: 4972132

Change-Id: Icc756a9e28b77de052261903089b040d229e7b5d
2011-07-01 09:21:09 -07:00
Mindy Pereira
11370c69b0 Merge "Turn on chips for email on tablet." 2011-07-01 07:45:40 -07:00
Jorge Lugo
c01db92acf Merge "Widget logo opens up mailbox" 2011-06-30 20:46:22 -07:00
Mindy Pereira
2a2e47d51b Turn on chips for email on tablet.
Change-Id: I3958b0f32b8d335a3f5905f4d3b188324284da43
2011-06-30 19:43:42 -07:00
Makoto Onuki
9630e31bac Fix bug 4901592 Do not drill-in to inbox by default
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
2011-06-30 18:00:11 -07:00
Ben Komalo
ad359c8fdf Quick fixes to unread count
Makes it consistent in the header and dropdown

Change-Id: Iec97678fa8704c6c4cf8c8eb129c94321f34949b
2011-06-30 16:26:02 -07:00
Ben Komalo
6fc2585327 Fix account settings crash.
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
2011-06-30 15:38:34 -07:00
Jorge Lugo
1f59271769 Widget logo opens up mailbox
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
2011-06-30 15:16:47 -07:00
Ben Komalo
09e7fffb2a Merge "Fix b/4905749 using workaround" 2011-06-30 11:56:05 -07:00
Ben Komalo
85cfc9c0bd Fix b/4905749 using workaround
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
2011-06-30 11:47:39 -07:00
Makoto Onuki
3aa7fd74f8 Fix bug 4978032 Can't get out of "starred" mailbox
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
2011-06-30 09:46:15 -07:00
Ben Komalo
698aa92e6f Fix actionbar for message view
- 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
2011-06-29 19:46:58 -07:00
Makoto Onuki
8de5bda815 Close cursor properly.
Also, don't issue separate query()s for each recent mailbox.

Bug 4977956

Change-Id: I3ccd437a7efd5c3599c4a1952ba091a7b3b815bf
2011-06-29 19:21:14 -07:00
Makoto Onuki
5fbc5025f0 Merge "Remove opener IDs from message view fragment." 2011-06-29 17:58:37 -07:00
Marc Blank
6da2b981da Merge "Oops; fix NPE" 2011-06-29 17:54:53 -07:00
Marc Blank
569785b4f9 Oops; fix NPE
Bug: 4977755

Change-Id: I117eb3a061628ee572f37123631c3da301b5e50b
2011-06-29 17:50:23 -07:00
Makoto Onuki
918860b8e0 Remove opener IDs from message view fragment.
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
2011-06-29 17:32:45 -07:00
Makoto Onuki
87fce70d0f Merge "Newer/older + auto-advance for one-pane" 2011-06-29 17:31:32 -07:00
Makoto Onuki
22d1a794cd Newer/older + auto-advance for one-pane
- 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
2011-06-29 17:29:29 -07:00
Marc Blank
17f7ffae4c Merge "More Store cleanup" 2011-06-29 16:43:01 -07:00
Makoto Onuki
4b39d7ccff Fix for "Unknown uri: .../mailbox/-4
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
2011-06-29 16:30:43 -07:00
Ben Komalo
3dbab0e26d Allow widget to be resized to 2x2
This way it doesn't have to take the entire phone screen
Bug: 4902471

Change-Id: I5c7b957d895d3abb7d3f5b7c502b7e8e886755b4
2011-06-29 16:18:01 -07:00
Marc Blank
0b8e04c84d More Store cleanup
Change-Id: I8f542175b4468c7a320322a57bfdaf19a7320165
2011-06-29 15:22:05 -07:00
Marc Blank
aa46bc3919 Merge "Remove redundant and unused constants" 2011-06-29 14:48:08 -07:00
Marc Blank
6fea021e3d Remove redundant and unused constants
Change-Id: Ie8658f86737880e3127a0a2c3b7f0557dde98b29
2011-06-29 14:30:46 -07:00
Ben Komalo
29c89ad17a Just mark search mailbox as not visible
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
2011-06-29 14:27:27 -07:00
Ben Komalo
659f60f734 Wire through logic for searched mailbox
- 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
2011-06-29 14:09:14 -07:00
Marc Blank
244d306ebb Remove more useless code
* Strike another blow for sanity!

Change-Id: Id95b441f9577abda66f04113793d6b1c60500ebe
2011-06-29 14:07:25 -07:00
Marc Blank
77160c8c08 Merge "Don't cache ImapFolders" 2011-06-29 13:34:44 -07:00
Marc Blank
2720a818d5 Don't cache ImapFolders
* 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
2011-06-29 13:02:55 -07:00
Marc Blank
ea8034affa Merge "Clean up Store implementation" 2011-06-29 13:01:36 -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
Ben Komalo
b859a3b61e Filter search mailboxes so they're not visible
Change-Id: I99edcb19ce9e320676dff55f219370730e74239b
2011-06-29 12:06:57 -07:00
Makoto Onuki
488308b354 Merge "Fix the "onPostExecute executed even when cancelled" issue" 2011-06-29 11:19:37 -07:00
Ben Komalo
5d811ecf18 Merge "Re-enable hw acceleration and fix webview cleanup" 2011-06-29 11:14:55 -07:00
Makoto Onuki
50d934360d Fix the "onPostExecute executed even when cancelled" issue
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
2011-06-29 10:22:38 -07:00
Ben Komalo
a6e15b13ef Re-enable hw acceleration and fix webview cleanup
Bug: 4886133
Change-Id: Ib59e560a6e1ef3eecc15ff0073a3c0f34688835a
2011-06-29 09:55:32 -07:00
Makoto Onuki
4a893e60b4 Switch to EmailAsyncTask
Also remove the isCancelled test in onPostExecute, where it should
never return true.

Change-Id: Ica2b07db22d73769c2ead5f232f4890bd3bb87da
2011-06-29 09:50:52 -07:00
Makoto Onuki
6cf76d94c8 Merge "Fix one-pane navigation/UI bugs" 2011-06-28 17:50:07 -07:00
Ben Komalo
1f6acaf396 Hide footer when we hit the end of a search
Change-Id: Iec082a9f9560819c034f91706229b1efb7303ba2
2011-06-28 17:24:54 -07:00
Ben Komalo
6b256f1fa1 Wire through results count in search header.
Change-Id: I817236d9c3294acb25b62724cc8c99d47df7f354
2011-06-28 17:11:16 -07:00
Makoto Onuki
ecd9c93cfa Fix one-pane navigation/UI bugs
- 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
2011-06-28 16:30:28 -07:00
Marc Blank
06421df25d Merge "Return total number of results from IMAP search" 2011-06-28 14:19:18 -07:00
Marc Blank
5a9c95f94e Return total number of results from IMAP search
Change-Id: I44eb83042774294aa5aaa8f45a46b82dd78b0141
2011-06-28 12:14:25 -07:00
Ben Komalo
2213a79c36 Merge "Prevent monkey crash on attachment load." 2011-06-28 11:32:07 -07:00
Marc Blank
c0a9fa9c68 Fix NPE
Bug: 4969186
Change-Id: I27fbdf7a496ee73caf36a90bf56b91c90133b3b7
2011-06-28 11:05:02 -07:00
Ben Komalo
efbb408dbb Prevent monkey crash on attachment load.
Bug: 4969655
Change-Id: Ie1cbeaab4b9335aa4b0c2c972647072df21fccec
2011-06-28 09:44:48 -07:00