Commit Graph

5362 Commits

Author SHA1 Message Date
Eric Fischer
8e39b7920c am ac60d037: Import revised translations. DO NOT MERGE
* commit 'ac60d037d8678f47cb6573c53c0a4cc5f2216687':
  Import revised translations.  DO NOT MERGE
2011-05-10 12:26:15 -07:00
Todd Kennedy
a48abd7f95 Merge "Add notification table shared preference" 2011-05-10 11:36:30 -07:00
Todd Kennedy
2f371e8553 Add notification table shared preference
The notifiaction table will be used by the updated notification controller.
The table stores the key and the associated last notified message key and
message count.

Change-Id: I037b5374ab51620f1cffc8b41391db858cfd3a2d
2011-05-10 11:35:04 -07:00
Makoto Onuki
1d0bf81893 Merge "Add 1-pane UI controller" 2011-05-10 11:29:57 -07:00
Makoto Onuki
f5492ea991 Add 1-pane UI controller
Added the base class for the UI controllers and the 1-pane implementaion,
which is almost empty at this point.

The old phone activities still exist and will be used on the phone by default.
To use the new activity (1-pane EmailActivity) on the phone, use the following
comamnd.

adb shell am start -a android.intent.action.MAIN \
    -d '"content://ui.email.android.com/view/mailbox"' \
    -e DEBUG_PANE_MODE 1

Change-Id: Id1fe85d4517778afc967d7d5e17e1299dd1bfefd
2011-05-10 11:28:00 -07:00
Ben Komalo
5b7e434917 Support switching between reply/replyall/forward
This introduces tab navigation on large screens with action bar (a
dropdown for the phone view is yet to be implemented, though the
internals are ready for it).

This requires the side effect that restoring a draft
reply/replyall/forward will attempt to also load the source message in
full for additional information. If that load fails for whatever reason,
the draft just remains a "compose" as it used to before.

Bug: 3117253
Change-Id: I9cff5ed4a5e9abd1338b6dbde28ceb3e4dc2b761
2011-05-10 10:36:22 -07:00
Makoto Onuki
0ea4f9295a Merge "Remove MailboxListFragment.DEFAULT_MAILBOX_ID" 2011-05-10 10:07:48 -07:00
Makoto Onuki
8a894f1ca0 Remove MailboxListFragment.DEFAULT_MAILBOX_ID
Now that we supports nested folders on IMAP too, it's not needed.

Change-Id: I80a6d6b59444132762d56ae6e03a5de69863ab8d
2011-05-10 10:06:54 -07:00
Todd Kennedy
dd9d472569 Merge "Add unit test for Utility#updateLastSeenMessageKey" 2011-05-10 08:12:34 -07:00
Eric Fischer
ac60d037d8 Import revised translations. DO NOT MERGE
Change-Id: Iabe222dbc443c59a421b3a0e4597e1cf9c85ca5e
2011-05-09 16:57:44 -07:00
Makoto Onuki
a676c56a65 Merge "Add UiUtilities.getViewOrNull()" 2011-05-09 13:39:24 -07:00
Makoto Onuki
c0491ed195 Add UiUtilities.getViewOrNull()
They're variants of getView() that will *not* crash even if the view
doesn't exist.

I didn't add them before as they would be exactly same as findViewbyId(),
but now that we make use of generics they'll be handy.

Change-Id: Ib649e591a987183064c7e98afe0e2414d9e62280
2011-05-09 11:58:47 -07:00
Marc Blank
eefccc69d3 Merge "Add message flags for "replied to" and "forwarded"" 2011-05-09 11:31:31 -07:00
Marc Blank
9279fc1b94 Add message flags for "replied to" and "forwarded"
* These will be required for EAS logo certification

Change-Id: Iaa8c970878a319fac68b3533889e6774f9cd54f9
2011-05-09 11:22:32 -07:00
Marc Blank
0993190caf Complete rewrite of account backup/restore code
* Use EmailProvider to backup/restore into a backup database
* Remove all of the old AccountBackupRestore code
* Get rid of the legacy Account class and all of the Preferences
  crap that referenced it
* Remove corresponding tests

Change-Id: I2de75aafdacc87246174303961e58547303f641e
2011-05-09 10:39:17 -07:00
Todd Kennedy
a17ee57c7f Add unit test for Utility#updateLastSeenMessageKey
Change-Id: I1335ac53c5de418fd0ed6c2b38be60165db1cb8c
2011-05-09 09:49:32 -07:00
Makoto Onuki
c0042a2278 Merge "Extract action bar related code" 2011-05-09 09:24:49 -07:00
Marc Blank
c55e2c8847 DO NOT MERGE: Fix serious DST issue with non-DST time zones
* When finding a match for an EAS time zone without DST, we were
  checking the offset, but NOT the DST status; therefore, we could
  match the wrong time zone (depending on the order of items in the
  TZ database)
* All users with events set up in non-DST timezones would have their
  events show up at the wrong time after a DST transition
* The fix is to first check against the default time zone, and use
  that if it's a match; otherwise, to use the first time zone that
  matches both offset and DST availability

Bug: 4337360
Change-Id: Ia26590972c1b0eab4640a3082881a28ee0a81622
2011-05-07 16:01:13 -07:00
Todd Kennedy
ae993bda32 Merge "Add lastSeenMessageKey column to the mailbox table" 2011-05-06 15:07:58 -07:00
Todd Kennedy
a9ac20b96f Add lastSeenMessageKey column to the mailbox table
The last seen message key is the id of the last message that we've "seen" for
that mailbox

Change-Id: I197f8a191654225ada1ce553cc959db775809c88
2011-05-06 14:51:41 -07:00
Ben Komalo
d594cc6120 Merge "Re-work the way MessageCompose handles attachments" 2011-05-06 12:09:26 -07:00
Ben Komalo
8d042850fb Re-work the way MessageCompose handles attachments
Now attachments are actually stored in an explicit list, instead of
being inferred from the state of the UI. This makes it possible to
switch states and restore attachments, and test.

Change-Id: I8c5f80f17f8c9e78d880ac4a1ac6ae22c2ec0579
2011-05-06 11:53:53 -07:00
Todd Kennedy
bf30f94c2e Add operation and id to notification URI
In order to provide a bit more granularity for content observers, we add the
operation (e.g. "insert", "remove" or "update") as well as the id of the row
that has changed (if it's known).

Change-Id: I214d3c030872f888cde1a2db9b6b46f1bb121b7a
2011-05-06 11:36:00 -07:00
Makoto Onuki
ad71b358c6 Extract action bar related code
...so that we can easily reuse it for the one pane UI controller.

The one pane controller should eventually have its own action bar
controller, but we can use it for the time beeing, until we get
more detailed UI spec.

Change-Id: I10c92963350dad9eb834fd7474c597aedad5eb80
2011-05-05 17:21:07 -07:00
Todd Kennedy
c60fc093b4 Merge "Remove notification if messages seen off device" 2011-05-05 15:52:02 -07:00
Todd Kennedy
f2582c4706 Merge "Remove deprecated strings" 2011-05-05 12:15:09 -07:00
Todd Kennedy
3d81e234d0 Remove deprecated strings
Removed the deprecated strings and brought back the permission strings
that were actually used.

Change-Id: Ie63a948522f7e11e1950969be5dfb26d7bc58e0a
2011-05-05 12:14:41 -07:00
Ben Komalo
c01b66dcf4 Merge "Fix NPE on startup." 2011-05-05 12:11:46 -07:00
Todd Kennedy
c4cdb11d24 Remove notification if messages seen off device
If we receive new messages, we may display a notification to the user. If
those same messages are read elsewhere (i.e. via a web client), we will
remove the notification.

Change-Id: Iba09afe01942e0deaac8210fd6f9b315b1c8c93f
2011-05-05 12:00:27 -07:00
Marc Blank
c96cd4a848 Merge "Add new policies to Policy and associated data structures" 2011-05-05 11:49:55 -07:00
Marc Blank
f91a03f520 Add new policies to Policy and associated data structures
* Update Policy unit test

Change-Id: I24a980537a73e40fca9fceb1b6ad6b2feaa9c342
2011-05-05 11:49:15 -07:00
Ben Komalo
ea56ccf6dd Fix NPE on startup.
There is no invariant in the controller that the fragments it references
are non-null, so querying the fragment for state is not always valid.

Change-Id: I880053be4000260b03b54ed8741e646b01314e0d
2011-05-05 11:19:30 -07:00
Todd Kennedy
075feb4556 Implement new nested folder mocks
Change-Id: I7c0c1d41b7a40d83e1237ba31d5f7949945c7e1e
2011-05-05 10:26:54 -07:00
Makoto Onuki
f456fa88bc Merge "Remove clearContent and other stuff for reusing fragments" 2011-05-05 10:08:41 -07:00
Makoto Onuki
38847b78fa Remove clearContent and other stuff for reusing fragments
from Mailbox/MessageListFragment.

This fixes some issues with screen rotation.

(We still reuse MessageViewFragement for the phone, but this should eventually
be cleaned up too.)

Also removed obsolete comments/TODOs.

Bug 4341517

Change-Id: Ib3e713ccab023151c1c47d7d7e4cd1c0de74039d
2011-05-05 10:07:20 -07:00
Makoto Onuki
171e2eed21 Merge "Revive the list footer for the message list" 2011-05-05 09:18:59 -07:00
Marc Blank
74143e89d5 Prevent NPE's in calls to database utility methods
* Before the Email/Exchange split, EmailProvider was guaranteed not to return a null
  cursor; this is no longer true
* We now throw a new RuntimeException (ProviderUnavailableException) when calling
  commonly-used utility methods (e.g. restoreXWithId) and the cursor as returned from
  EmailProvider is null (which implies that the provider isn't available).

Change-Id: I152d13bff0129c23586cd570d23c87d69cfce372
2011-05-05 08:49:34 -07:00
Marc Blank
335a724ee6 Implement "automatic" sync lookback (Email side)
* Update sync window options to include "Automatic" and "All"
* Make the default (for new accounts) "Automatic"

Change-Id: Icbc696f55abcfad79e66079ebb414ca50778dcaa
2011-05-05 08:16:44 -07:00
Ben Komalo
c6beaaea59 Update MessageComposetests with latest refactors
Change-Id: I7ab1275f4f4a803588619952f55fd81520036526
2011-05-04 16:34:32 -07:00
Ben Komalo
c7c0b6791c Refactor MessageCompose.
This is a lot of code moves to make the asynchronous loading process
more explicit in nature:

- separate out code path for state restoration and intent resolving (no
  need to over-write mAction now)
- separate out code path for draft loading and source message
loading
- fixes an issue where loading a message accidentally set the draft
message instead of the source message
- makes it possible to switch reply/replyall/forward since now
processing a source message doesn't do crazy things

Bug: 4375775
Change-Id: I5b3a7ac9ed031abe88f9358df9cd46408dd1e9f9
2011-05-04 16:08:58 -07:00
Makoto Onuki
4452b15e2e Revive the list footer for the message list
It was accidentally removed in Ia67e7f3e.

Change-Id: I071ad25e699a96d09017609dc4463c24d0d4eab3
2011-05-04 13:49:40 -07:00
Marc Blank
5a29aa63b2 Merge "Remove scalpel left in patient" 2011-05-03 15:23:19 -07:00
Marc Blank
647007c31b Remove scalpel left in patient
Change-Id: Iea55718a815cf3eafdd2b506637c96aeac8e7cb2
2011-05-03 15:21:18 -07:00
Ben Komalo
bea743dc34 Merge "Cleanups to how "save draft" state is handled." 2011-05-03 12:33:32 -07:00
Ben Komalo
2f9cbdb37d Cleanups to how "save draft" state is handled.
- the options menu was being needlessly invalidated way too often (on
every text change)

Change-Id: I36e6363fdecb7f587dc322a1413d074070ed8a36
2011-05-03 11:41:56 -07:00
Marc Blank
55db7c098f Merge "Rework of security policy storage" 2011-05-03 11:20:46 -07:00
Marc Blank
aeee10e57e Rework of security policy storage
* Replace crazy (and soon to be "full") bit fields stored in an account's
  securityFlags with a row in a newly created Policy table (thus, fully
  expandable)
* Update code from database version 17 to 18; adds Policy table, a
  policyKey row in Account, and a revised trigger that deletes Policy
  information for deleted Accounts
* Update old PolicySet unit tests to work against the new Policy class
* Add test for the conversion of securityFlags to Policy
* Tested in a variety of scenarios; appears to be functionally equivalent

Change-Id: I1505ee75230d6a0d3c2b62a46326f39c2c7f9eb5
2011-05-03 11:11:47 -07:00
Ben Komalo
78c031d20c Merge "Fixes to MessageCompose saving." 2011-05-03 11:11:44 -07:00
Ben Komalo
0bb7f1c37c Fixes to MessageCompose saving.
- "save draft" no longer closes the message
- ensure consistent state if there are successive saves
- misc changes to the way a message is loaded if there is a pending save

Bug: 3072398
Change-Id: I9cd01319772293e4d410020ab27603821a95ec9f
2011-05-03 10:35:11 -07:00
Eric Fischer
599870ed63 Import revised translations.
Change-Id: I08f18bc297de36d9e4514f860752e79d4ed48501
2011-05-02 15:53:32 -07:00