Commit Graph

3073 Commits

Author SHA1 Message Date
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
Makoto Onuki 533e0f5beb Add "change orientation" menu command.
Unfortunately software-keyboard is disabled on master for some reason,
so we can't use the R key hack any longer...

Change-Id: Ide73e11742e5de70fec45009eee20a1a74fcbfd1
2010-08-07 18:16:14 -07:00
Marc Blank c263810b08 Clear password related policies in PolicySet when p/w not required
Bug: 2883736
Change-Id: I2c9c573aea9a4fef1699ff6339e8ef628d7f2269
2010-08-07 17:27:16 -07:00
Makoto Onuki 36bdeeb0e1 Add getFirstRowInt.
It's the int version of getFirstRowLong.

Because getFirstRowLong returns a Long as opposed to a long, and the return
value can be null, it's a pain to cast to Integer.  So added this variant.

Change-Id: I2a3190e49db480e6d594be4b1fcef9a71e56cb2f
2010-08-06 11:00:44 -07:00
Makoto Onuki c2d0049167 Merge "Suppress warnings from mime4j by default." 2010-08-06 10:55:26 -07:00
Makoto Onuki 3cc02d3e68 Suppress warnings from mime4j by default.
It's now controlled by the debug setting.

Bug 2829962

Change-Id: I700c83e5a193d2f013fcca14092e4eed6a127f97
2010-08-06 10:54:47 -07:00
Makoto Onuki b0ca30d4d1 Add action buttons to actionbar on MessageListXL
- Now able to compose a new message.

Change-Id: I53cd7cc6fe850063946824748e11ccde89d7decf
2010-08-06 10:48:14 -07:00
Makoto Onuki fd8a2e8afb Automatically open Inbox when account is selected.
Change-Id: I3dc43d804d39b925ee62bebbf85911cb258aafd7
2010-08-06 10:44:45 -07:00
Makoto Onuki 9531931c7e Don't auto-requery account list.
Prevent CursorLoader's auto-reuqery.  Instead, refresh the loader
when adding/removing accounts.

Change-Id: I63091c23f8c06c32dd42669fdfbd9e783ff9eccb
2010-08-06 10:38:34 -07:00
Makoto Onuki 94506fdaf6 Small fixes/clean-ups.
- Fixed account selector default account look-up
- Renamed MessageListFragment.onRestoreInstanceState
  to loadState.
  (Activity.onRestoreInstanceState is called after onStart,
  but this one is called in onCreate, so it wasn't a good
  idea to use the same name.)
- Changed mailbox cursur requery timeout to 3 seconds
- Added some TODOs.

Change-Id: Ia2242cd9f74936d24756b800eacd126958eed330
2010-08-06 10:11:36 -07:00
Eric Fischer 8ac10f28cb Merge "Import revised translations." 2010-08-05 16:51:08 -07:00
Eric Fischer fa46f81340 Import revised translations.
Change-Id: I4a5a032aae33280650495f9231870d79908b1e21
2010-08-05 16:05:38 -07:00
Makoto Onuki 191448b430 Make Welcome launch MessageListXL
Also added the "1 pane" activity to test the phone UI.

Change-Id: I1c86d2088a2298ada5028b7a266bd090b593593c
2010-08-05 13:58:20 -07:00
Eric Fischer 6333e15108 am 13b21c66: (-s ours) am f2f268a5: Import revised translations. DO NOT MERGE
Merge commit '13b21c660a6bba3681910d2bf37d603a7b534f95'

* commit '13b21c660a6bba3681910d2bf37d603a7b534f95':
  Import revised translations.  DO NOT MERGE
2010-08-05 11:44:27 -07:00
Dmitri Plotnikov 32358f5516 Upgrading to new GAL registration API.
Change-Id: I67eaeb50ba8629a85d056da031e3b48ea7ab3858
2010-08-05 11:22:58 -07:00
Makoto Onuki 8066a925b1 Merge "Introducing ThrottlingCursorLoader." 2010-08-04 11:19:31 -07:00
Eric Fischer 13b21c660a am f2f268a5: Import revised translations. DO NOT MERGE
Merge commit 'f2f268a59e658c0514b00b0cb5bb0138d013c1b1' into gingerbread-plus-aosp

* commit 'f2f268a59e658c0514b00b0cb5bb0138d013c1b1':
  Import revised translations.  DO NOT MERGE
2010-08-04 10:56:24 -07:00
Eric Fischer f2f268a59e Import revised translations. DO NOT MERGE
Change-Id: I8d00ab574f8644ea3b2056e4d8310f453a8b8337
2010-08-04 10:42:51 -07:00
Marc Blank b91eea0119 resolved conflicts for merge of fbf501fe to master
Change-Id: Ic68cbf2de1877ab06744287f57c1c33c4e0e573a
2010-08-04 10:28:40 -07:00
Makoto Onuki 630e31ef78 Introducing ThrottlingCursorLoader.
This is a {@link CursorLoader} variant that takes {@code timeoutSecond}
in the constructor.

When it detects changes in the underlying data, it'll wait until the timeout
before doing a requery.

We use this to throttle # of queries.  We don't want to issue a query every
time something changes in the DB while we're syncing.

Change-Id: I098366bce923c3242c42964bc166493610ee0f6f
2010-08-03 17:45:51 -07:00
Makoto Onuki 907774e763 Merge "Aadd special boxes to mailbox list." 2010-08-03 17:21:14 -07:00
Makoto Onuki 833fe73b99 Aadd special boxes to mailbox list.
Change-Id: I36616f53555346ca7fbb6f3426a0c3196d7bacbc
2010-08-03 17:06:04 -07:00
Marc Blank 88000e8bdc Merge "Fix tests that broke due to DST changes in African countries" 2010-08-03 14:36:47 -07:00
Marc Blank 92861b5c2b Fix tests that broke due to DST changes in African countries
* In particular, "Africa/Casablanca" has DST in 2010 now, so it can't
  be used as a test for non-DST time zones

Bug: 2882900
Change-Id: I3026ae4816fc068bd6c783fa3ca879666e796fc9
2010-08-03 11:32:58 -07:00
Makoto Onuki 77c6ccdd61 Merge "Clean up MailboxListFragment." 2010-08-03 11:03:38 -07:00
Marc Blank fbf501fefd am 4e619a2d: am 2b2b3448: Handle inactivity timeout > maximum allowed properly
Merge commit '4e619a2d5051811262496e48ec99a0e916822d44' into gingerbread-plus-aosp

* commit '4e619a2d5051811262496e48ec99a0e916822d44':
  Handle inactivity timeout > maximum allowed properly
2010-08-02 20:43:50 -07:00
Marc Blank 4e619a2d50 am 2b2b3448: Handle inactivity timeout > maximum allowed properly
Merge commit '2b2b3448ec200f3d649e5f57309908d28ce3bfc7' into gingerbread

* commit '2b2b3448ec200f3d649e5f57309908d28ce3bfc7':
  Handle inactivity timeout > maximum allowed properly
2010-08-02 20:41:55 -07:00
Marc Blank 2b2b3448ec Handle inactivity timeout > maximum allowed properly
* In a recent change, we mistakenly removed the logic for handling
  too-long inactivity timeouts; we should just fall back to the maximum
  since this is stricter than what we're being asked to enforce
* Restore this logic and update the unit test
* The regression was caused by change Ida5663a9, to wit:
  Backport: Handle "Allow non-provisionable devices" properly

Bug: 2886746
Change-Id: I99cf9a37441b80477cc1c2c7ec2a78f8a14a83da
2010-08-02 19:39:09 -07:00
Dmitri Plotnikov 5ab18497f6 Adding support for a full-contact (entities) query.
Change-Id: Ib1cdd998dcc4f60124dbc37a42fd61ee0f6802fd
2010-08-02 18:19:25 -07:00
Makoto Onuki 7ef278202e Clean up MailboxListFragment.
- Remove AsyncTasks, and use CursorLoader to load data.
- Get message counts for the drafts/trash mailboxes directly from
  the db column.
- Remove obsolete code from MailboxesAdapter.

Change-Id: I93c72977c19b60581e1169ba9bd429912ba3e68f
2010-08-02 16:33:23 -07:00
Makoto Onuki d0c2178063 Merge "Add the messageCount column to the mailbox table." 2010-08-02 16:01:32 -07:00
Makoto Onuki 2a9f783e34 Fix crash in one-pane message view
Forgot to fix the resource file.

Two-pane is okay because we don't put the class name in layouts.
(We create fragments at runtime.)

Bug 2887134

Change-Id: I033c2283be4b104941af34a1fbb5e4663337ef68
2010-08-02 11:47:10 -07:00
Makoto Onuki 574854b528 Add the messageCount column to the mailbox table.
- Use trrigers to keep them up-to-date.
- Batch-update them upon upgrade.

- Motivation:
  On the mailbox list, we show the number of messages in trash/drafts.
  We currently do this with count(*) on the fly, which is okay
  because MailboxList is really shown right now.
  However, on the 2 pane, it's always shown and constantly refreshed,
  so the use of count(*) can be a huge penalty.

  It also make the code significantly simpler.

Change-Id: I26efa238d5183df43420a65925876248ef6c6cb6
2010-07-30 17:37:28 -07:00
Makoto Onuki 20bf78222b Merge "Fix failing tests." 2010-07-30 16:06:36 -07:00
Makoto Onuki b6c1ad0f01 Rename MessageViewFragment2
Change-Id: I28e23c0ff18211db999396c5ba1ad9ef898d4515
2010-07-30 15:41:40 -07:00
Makoto Onuki 206d4e842d Split up MessageViewFragment like we did to MessageView.
Break MessageViewFragment up into two fragments, MessageViewFragment, which
is used to show regular messages, and MessageFileViewFragment, which shows
EML messages.  (And their base class, MessageViewFragmentBase.)

MessageViewFragmentBase's javadoc has a class diagram.

MessageViewFragment is actually named MessageViewFragment2 at this point
so that GIT correctly finds out the rename from MessageViewFragment to
MessageViewFragmentBase.  I'll rename it back in a following CL.

Also added very basic unit tests for MessageView and MessageFileView.
At this point, they just make sure the activities really open and show
messages without exceptions.

I feel like the current naming schema for the activities/fragments is
kinda confusing.  Let me know if you come up with better names.

Change-Id: Iff948f4b68cfdb7c1e68f225927b0ce58d34766b
2010-07-30 15:38:53 -07:00
Makoto Onuki 2d5b4f25f9 Fix failing tests.
Bug 2844798
Bug 2882894

Change-Id: I683c67ddc7ce7c22f06e4b39df330d3850513862
2010-07-30 10:34:00 -07:00
Makoto Onuki b8f31d5490 Helper to create isolated context for provider tests.
The logic came from ProviderTestCase2, but it can be used with other
kind of test cases, such as InstrumentationTestCase.

Extracted from an existing class.  We'll need it for new activity tests.

Change-Id: I5741f01d4749fd397704cef330082470f6051bcf
2010-07-29 17:22:58 -07:00
Marc Blank 1f1be33191 am a95e40df: am 4f12c25e: am 05b0bb56: Release held mailboxes after policy refresh
Merge commit 'a95e40df2f4c6c17e53a438e1229199d823efca6'

* commit 'a95e40df2f4c6c17e53a438e1229199d823efca6':
  Release held mailboxes after policy refresh
2010-07-28 18:35:40 -07:00
Marc Blank a95e40df2f am 4f12c25e: am 05b0bb56: Release held mailboxes after policy refresh
Merge commit '4f12c25ed9e0e3c0884da642e1fc3450eb781b98' into gingerbread-plus-aosp

* commit '4f12c25ed9e0e3c0884da642e1fc3450eb781b98':
  Release held mailboxes after policy refresh
2010-07-28 18:33:07 -07:00
Marc Blank 4f12c25ed9 am 05b0bb56: Release held mailboxes after policy refresh
Merge commit '05b0bb56254d9ed924dff4c09ad227eec611a695' into gingerbread

* commit '05b0bb56254d9ed924dff4c09ad227eec611a695':
  Release held mailboxes after policy refresh
2010-07-28 18:31:22 -07:00
Makoto Onuki ec15f2356e Extract the mailbox lookup logic into an independent class
This new class MailboxFinder is responsible for looking for a mailbox
by an account id and a mailbox type.

If a mailbox is not found on the first try, it'll tell Controller
to refresh the mailbox list, and try again later.

This will be used by MessageListXL.

Change-Id: I4adc3db025fb271c254aa2b58b3b753281dc7398
2010-07-28 16:36:34 -07:00
Makoto Onuki d9907c7641 Merge "Adding account selector." 2010-07-28 14:12:37 -07:00
Makoto Onuki 4de80f22ae Merge "Move isSecurityHold/clearAccountHoldFlags to Account" 2010-07-28 13:44:42 -07:00
Makoto Onuki ee216da74a Adding account selector.
Also
- Renamed MessageListXLFragmentManager.setStart to onStart.  (was typo)
- Fixed flag handling bug in MailboxListFragment
- Fixed the R key handling code.  (The first R key was always ignored,
  because the default requested orientation was neither landscape or
  portrait.)

Change-Id: I0e14ce9f4fc5be973f7c0091f88fd4551a4329fa
2010-07-28 13:41:57 -07:00
Makoto Onuki ae8fc30b41 Fix "disk I/O error" in LocalStoreUnitTests
The problem was that we didn't close the LocalStores created in these
testDbUpgradeXxx tests.

Also,
- Make sure to close databases.
- Make sure to close cursors.
- Cleard up warnings (unnecessary casts, etc.)

Bug 2859264

Change-Id: Ifaddbb6cf07794a7b5978564ea8fbb3cbf75b978
2010-07-28 13:07:33 -07:00
Makoto Onuki bcf32320e2 Move isSecurityHold/clearAccountHoldFlags to Account
- Added unit tests
- I see the "open a cursor, move to the first row, read a column" pattern over
  and over.  Added a utility method for this.  (Let's try not to bloat the
  binary by copying code around!)
- Added helper classes for database related tests
- Removed code dup

Change-Id: I380959215cc1661b252158f0f6e35369b499cdf8
2010-07-28 11:12:38 -07:00
Makoto Onuki 0943a75ba8 Merge "Refactoring MessageListXL" 2010-07-27 15:47:01 -07:00
Makoto Onuki bccb10a5a8 Merge "Break MessageView into 2 separate activities." 2010-07-27 15:46:38 -07:00
Makoto Onuki e105fbe510 Break MessageView into 2 separate activities.
MessageView for regular messages and MessageFileView for EML files.

I'll break down MessageViewFragment too.

Change-Id: Iae66f33d8fb5de58084ab4aef31588e9743c5a18
2010-07-27 15:45:58 -07:00