Commit Graph

3001 Commits

Author SHA1 Message Date
Makoto Onuki
16a60dca84 Fragmentize MessageView.
This version is hybrid of the old design and what Andy's suggested.
- MessageViewFragment is responsible to show a single message at a time.
- Call MVF.openMessage() to tell it to open another message.
  No need to re-create a new MVF to do this.
- MessageView manages the message list, and handles "move-to-newer/older"
  buttons.

Reason for not re-creating a fragment when opening another message is:
- Re-using the same fragment doesn't make it as complecated/ugly as I
  was initially afraid.
  It's basically cancelling all running tasks, re-initializee some views,
  and load a message.
- We don't have to run MVF.onCreate() over and over again when moving through
  messages.
We may change the strategy later, but I think it's suffice for now.
(Changing this might affect how the back key works, so let's revisit it
when the fragment manager supports back.)

Basically this CL is all about internal changes.
No UI should have changed except for:
- Moved "Move to newer/older" buttons to the bottom.

Also fixes:
Bug: 2849129

Change-Id: I00c05069231afded9d98d3d52dd9a7925ebdee9d
2010-07-19 18:34:40 -07:00
The Android Open Source Project
e5536a6f9f am c7f68d75: am c257cfe6: add meta-files about 3rd party projects
Merge commit 'c7f68d75af03bf6d1a88b9b9342c1fe031fbed74'

* commit 'c7f68d75af03bf6d1a88b9b9342c1fe031fbed74':
  add meta-files about 3rd party projects
2010-07-16 11:59:37 -07:00
The Android Open Source Project
c7f68d75af am c257cfe6: add meta-files about 3rd party projects
Merge commit 'c257cfe6d38a59b9abd6dbe01558927062c088a9' into gingerbread-plus-aosp

* commit 'c257cfe6d38a59b9abd6dbe01558927062c088a9':
  add meta-files about 3rd party projects
2010-07-16 11:53:09 -07:00
The Android Open Source Project
c257cfe6d3 add meta-files about 3rd party projects
Change-Id: Ie43ae55f890a79547ce2e3faed74150b50fc43fa
2010-07-16 11:41:38 -07:00
Makoto Onuki
a0b88dc1c8 Merge "Adding more test to MessageOrderManager" 2010-07-15 11:07:12 -07:00
Makoto Onuki
638c67f4db Adding more test to MessageOrderManager
Added a case where all the message in the message list is removed.

Change-Id: Iedc2dbdf391978bd67d3bcdc260590d98cc9ef7d
2010-07-15 11:06:19 -07:00
Marc Blank
9444a54866 resolved conflicts for merge of 2cb5acc5 to master
Change-Id: I4b3379b7b8ebfca36eda3ae649f009659e682e87
2010-07-15 09:59:50 -07:00
Marc Blank
cd0f12fda8 resolved conflicts for merge of 84f7d07d to master
Change-Id: I62abe3b8aa31a1b551d0396e184b648c305033ec
2010-07-14 23:12:20 -07:00
Marc Blank
2cb5acc516 am 1585d313: am 8b36acb1: Backport: Handle "Allow non-provisionable devices" properly
Merge commit '1585d313f1a26b4b780761a9e9b4ec7042dcbbe5' into gingerbread-plus-aosp

* commit '1585d313f1a26b4b780761a9e9b4ec7042dcbbe5':
  Backport: Handle "Allow non-provisionable devices" properly
2010-07-14 22:57:49 -07:00
Marc Blank
1585d313f1 am 8b36acb1: Backport: Handle "Allow non-provisionable devices" properly
Merge commit '8b36acb10d555b59ec0497f6c71426af823c7931' into gingerbread

* commit '8b36acb10d555b59ec0497f6c71426af823c7931':
  Backport: Handle "Allow non-provisionable devices" properly
2010-07-14 22:56:28 -07:00
Marc Blank
8b36acb10d Backport: Handle "Allow non-provisionable devices" properly
* Backport from master branch
* Send policy key of "0" when validating; this gets us the policies
  even if "Allow..." is enabled (currently, we simply don't see the
  policies)
* If we don't support all of the policies, send back the response
  code indicating support for partial support.  If we get a positive
  response back, then we're good to go - the server allows devices
  with partial support.  Otherwise, we fail as we always have - with
  the toast indicating that the device doesn't support required
  policies
* Remove PolicySet.isSupported() and ensure proper field ranges
  within the constructor
* Update tests as appropriate

Bug: 2759782
Change-Id: Ida5663a9b35c75ecc61a5f442be0bd60b433cb73
2010-07-14 22:47:47 -07:00
Marc Blank
84f7d07d4f am 7a1a2037: am e43b11ba: Handle correction of rejected Ping heartbeat
Merge commit '7a1a203786f10b60393efdec606cea416aa99e16' into gingerbread-plus-aosp

* commit '7a1a203786f10b60393efdec606cea416aa99e16':
  Handle correction of rejected Ping heartbeat
2010-07-14 22:39:06 -07:00
Marc Blank
7a1a203786 am e43b11ba: Handle correction of rejected Ping heartbeat
Merge commit 'e43b11ba3e9be9380b7c43cde3117c6de28f28bd' into gingerbread

* commit 'e43b11ba3e9be9380b7c43cde3117c6de28f28bd':
  Handle correction of rejected Ping heartbeat
2010-07-14 22:33:34 -07:00
Marc Blank
ed833ee7ae Merge "Make sure signature is added to reply/forward" 2010-07-14 14:48:53 -07:00
Makoto Onuki
d73d8e4839 Use ListFragment.setListAdapter, not ListView.setAdapter.
Otherwise ListFragment wouldn't notice an adapter is set.

Bug 2841063

Change-Id: Iddb40125020ee2b72ed72b93643582929dc7f7eb
2010-07-14 14:37:09 -07:00
Marc Blank
ec29471c73 Make sure signature is added to reply/forward
* Add this to processSourceMessage in the reply/forward cases
* Add unit tests for reply and forward case

Bug: 2734321
Change-Id: I6be8383fe5f217a4bda8e669cb69f439bc8e96b6
2010-07-14 12:43:37 -07:00
Marc Blank
18452ba28c Replace line of code lost in Change I9997ac96
* During refactor of referenced change, a critical line of code
  got lost; it's replaced in this CL

Change-Id: Ib6f405cdfa120f5cb5c879ab0f7df52d54970cb7
2010-07-13 20:53:16 -07:00
Marc Blank
e43b11ba3e Handle correction of rejected Ping heartbeat
* Handle status 5 for Ping command (heartbeat of out range)
* Write unit test for heartbeat reset

Bug: 2834195
Change-Id: Ic7952a4b296cf15c6ba895d6579fe7956b171e5b
2010-07-13 18:06:24 -07:00
Makoto Onuki
de0a1c33c9 Extract MessageListTask and make it self-contained.
Introducing MessageOrderManager which maintains a message list for
MessageView.  It's used to tell if there is newer/older messages
in a mailbox, and the id of them.

Also, slightly related to this, moved mWaitForLoadMessageId to
ControllerResults where it should belong.

Change-Id: I84e32180c7e84a317f2204bb10ad7245ec022dca
2010-07-13 11:26:01 -07:00
Makoto Onuki
e60d3648fd Extract presence check logic into its own class.
Change-Id: I12e449ce7f1d10ed4737581e35367eae84a7f29e
2010-07-13 11:19:04 -07:00
Makoto Onuki
7f247d1cd3 Disable MessageViewTests
- These tests will probably not make sense with the upcoming UI change.
- Moved testAttachmentWritePermissions to UtilityUnitTests.
  It's a test for createUniqueFile, which is now owned by Utility.
- Removed Long.MIN_VALUE hack from MessageView.
  New tests should have something better.

Change-Id: I9a09e5e8080a165b010607d1fa3112bcaaab4f90
2010-07-12 16:14:29 -07:00
Marc Blank
6fe5199154 Merge "New calendar sync adapter tests" 2010-07-10 15:38:58 -07:00
Makoto Onuki
7daacf83a4 Switch to ListFragment, and use its default layout.
Change-Id: If8dead170a3662cbde87e6ead244363b11db01f6
2010-07-09 13:22:53 -07:00
Marc Blank
f115d31ae8 New calendar sync adapter tests
* Created MockProvider that can be used for testing the results of
  ContentProviderOperation's for Calendar/Contacts (we can't use these
  within our mock contexts because we can't instantiate the provider
  classes within the Email package)
* Wrote some unit tests for MockProvider
* Use MockProvider to test addEvent, in particular how a user's attendee
  status is stored, depending on whether the event is new or updated

Change-Id: I97f02d125eb7347726261e12ce70aadc539be1d4
2010-07-09 10:24:58 -07:00
Marc Blank
5fcbdcf59f Merge "Send intro text with SmartForward" 2010-07-09 09:40:46 -07:00
Marc Blank
80ee607a7c Send intro text with SmartForward
* We need to include the intro text (--Original Message--, etc.) to
  SmartForwards, and somehow this got in a past updat
* Add unit test for forwarding
* Fix unit test for reply so that it works localized

Bug: 2477988
Bug: 2685784
Change-Id: I8d92f00d37a434840ec3eb237f3901cd5dc7ad09
2010-07-09 09:39:58 -07:00
Dianne Hackborn
7e071d6956 Fix the build -- follow API change.
Change-Id: I7a177a3bbd5b374cfdc2dd708cc8b1acd8c19a92
2010-07-08 16:05:11 -07:00
Marc Blank
5b02ecf87c Fix SmartReply/SmartForward in EAS 2.5
* We inadvertently broke this with a recent update that uses Uri
  encoding for ItemId and CollectionId in SmartForward/Reply commands.
  We need to allow colon (:) however for EAS 2.5; otherwise, sends
  fail with HTTP 500
* Update unit test

Bug: 2821684
Change-Id: Ia6bdd2169513d1c13a8174dd599477a35df950f2
2010-07-07 14:42:31 -07:00
Marc Blank
6e47262274 Merge "Interpret "busy" on new events to mean "no response"" 2010-07-03 13:47:34 -07:00
Marc Blank
b45d26d88b Merge "Fix refresh issue w/ mSecurityFlags preference stored as an int" 2010-07-03 13:47:19 -07:00
Marc Blank
04ff90aa7b Merge "Fix broken test" 2010-07-02 16:16:31 -07:00
Makoto Onuki
b7ad361681 Merge "Adding 2 utility methods for testing" 2010-07-02 15:31:00 -07:00
Makoto Onuki
57f4d0222b Adding 2 utility methods for testing
expectThrowable() and waitUntil().

Change-Id: I8e3af97ed02254ef2fdc72afadea1911ed23e4ab
2010-07-02 15:30:23 -07:00
Marc Blank
d07cb4ba4e Fix refresh issue w/ mSecurityFlags preference stored as an int
Bug: 2803604
Change-Id: I150ca8b5049e6aec022819eb768caa1e3c3ce183
2010-07-02 15:19:25 -07:00
Marc Blank
fabec4f14a Fix broken test
Bug: 2731958
Change-Id: I5b16e9d7e4db4eebe6dc9a9956b90dabb54edf4e
2010-07-02 15:15:17 -07:00
Marc Blank
32db98f8eb Interpret "busy" on new events to mean "no response"
* The meaning of a busy status of "Busy" is uncertain; it could mean
  "Accepted" or "Tentative", depending on whether the event was
  created via OWA/Outlook or EAS
* We have interpreted it as "Accepted", which prevents the user from
  actually accepting the event (as a state change is required for us
  to send updates to the server/organizer)
* This CL changes the behavior such that a newly arriving event with
  a "Busy" status is shown as "No response" in the Calendar, thereby
  allowing the user to pick from any of the three possible options.

Bug: 2811859
Change-Id: Ie2c375278b79b47dedac02472dfe6e4cf1182b65
2010-07-02 14:53:11 -07:00
Makoto Onuki
c6886ed3ad Fixing UI for EML files.
For EML,
- No menu
- No older/newer buttons
- No star
- No bottom buttons.

I've started to feel like the two UIs (one for regular messages and the
other for EML files) shouldn't be handled by one class; we probably
should separate them into two different classes.  I'll see if I can
do that after fragmentize it.

Bug 2804147

Change-Id: I5ae162af546bfc21af27352c642d6b2a1e16cf0f
2010-07-02 13:49:47 -07:00
Makoto Onuki
a0f1dd0a5c Merge "Cleaning up MessageView" 2010-07-02 13:31:26 -07:00
Makoto Onuki
44b5242edd Cleaning up MessageView
- Removed dead code/dead comment.
- Moved static utility methods to Utility.
- Renamed some methods.
- Changed the timing to call super methods.

Also:
- Internationalized formatSize()
- Added unit tests for createUniqueFile() and formatSize()
- createUniqueFile now uses File.createNewFile() instead of exists().

Change-Id: Ibc30e15b029ed5088954bd6fc9032e25dddf176e
2010-07-02 13:26:05 -07:00
Marc Blank
42ff939e3a Prevent MailService from potential looping due to EAS accounts
* The code assumed that all accounts used the scheduler in MailService
  whereas only those using MessagingController do so (i.e. EAS does
  not)
* Change setupSyncReportsLocked to set the syncInterval for accounts
  that don't use MessagingController to Account.CHECK_INTERVAL_NEVER
* Add unit test for the changed code

Change-Id: I74a3dae21d9ec16f9903bdf2a1c28092ae89cc50
2010-07-02 11:47:03 -07:00
Makoto Onuki
42e3f10a95 Use "*#*#36245#*#*" to activate the debug screen.
Dial *#*#36245#*#* on the dialer to activate the debug screen.
"36245" = "email"

It's useful when
- There's no keyboard.
- There's no account set up yet.
  (You can do it by entering the special username/password on new account
  screen, but that's a bit of a pain.)

It's also easier to tell to people.

Also, removed "sensitive logging", which should never be used.

Change-Id: Id692f8b216f2d85abe1880c452d2067f170dac83
2010-07-01 16:15:07 -07:00
Andy Stadler
75f9fab0c7 am a3e021d1: am 3b811ae4: resolved conflicts for merge of fb060de6 to gingerbread
Merge commit 'a3e021d12c96d10f758fb6af3b7a05e85d0d8eeb'

* commit 'a3e021d12c96d10f758fb6af3b7a05e85d0d8eeb':
  Explicitly verify certificate hostname on SSL connections
2010-06-30 16:33:29 -07:00
Andy Stadler
a3e021d12c am 3b811ae4: resolved conflicts for merge of fb060de6 to gingerbread
Merge commit '3b811ae4c6bff1204bd08921f5debdb3ad1700b6' into gingerbread-plus-aosp

* commit '3b811ae4c6bff1204bd08921f5debdb3ad1700b6':
  Explicitly verify certificate hostname on SSL connections
2010-06-30 16:30:32 -07:00
Andy Stadler
3b811ae4c6 resolved conflicts for merge of fb060de6 to gingerbread
Change-Id: I6ef4bda535650829f994b595d9cb5b57a8775aa5
2010-06-30 16:27:26 -07:00
Marc Blank
00360c07b2 am 4cfaaa95: am 2019792f: am 04396916: Fix regression in Exchange calendar attendee response
Merge commit '4cfaaa9527d1712bbcff4caef8be3957427a0a66'

* commit '4cfaaa9527d1712bbcff4caef8be3957427a0a66':
  Fix regression in Exchange calendar attendee response
2010-06-30 15:49:02 -07:00
Marc Blank
4cfaaa9527 am 2019792f: am 04396916: Fix regression in Exchange calendar attendee response
Merge commit '2019792f1f2b98747db25ba11fea35e03b5e73aa' into gingerbread-plus-aosp

* commit '2019792f1f2b98747db25ba11fea35e03b5e73aa':
  Fix regression in Exchange calendar attendee response
2010-06-30 15:33:15 -07:00
Andrew Stadler
fb060de65d Explicitly verify certificate hostname on SSL connections
When connecting to an IMAP, POP3, or SMTP server using SSL, perform
an explicit test of the certificate's host name against the server's
host name.  Refuse connection if they do not match.

Bug: 2807409
Change-Id: Ib223170f1a5d57323a88037ad30fec15c6bbce20
2010-06-30 12:39:12 -07:00
Marc Blank
2019792f1f am 04396916: Fix regression in Exchange calendar attendee response
Merge commit '043969163e8629a4d3b583b73dfa29c6e97989c0' into gingerbread

* commit '043969163e8629a4d3b583b73dfa29c6e97989c0':
  Fix regression in Exchange calendar attendee response
2010-06-30 11:43:52 -07:00
Marc Blank
043969163e Fix regression in Exchange calendar attendee response
* During the fix of a previous late-Froyo issue, a change was made that
  appeared superficially correct, but was semantically incorrect.  This
  changed the sense of the test for whether a reply email was required
  and caused the referenced bug.
* The trivial fix is to replace the test with the (older) proper one

Bug: 2764551

Change-Id: I7c72366252cf0607aee31ee0d76aca96a7d5fc2b
2010-06-30 11:41:22 -07:00
Andrew Stadler
d5b2da3716 Add ActionBar to MailboxList
Note: This does not appear in UX wireframes, this activity is going
away eventually, but it's a good testbed for ActionBar to be tried out.

Open issues:
1.  Waiting for progress indicator support, using unattractive hack
2.  Subtitle doesn't seem to work so putting account name in title
    (which is the wrong font size for phone portrait mode).

Change-Id: Iee3cac7d4f30ea210bd8f3838b69ed12cd498375
2010-06-29 16:49:47 -07:00