- Use the class attribute instead of android:name in fragment tags.
- Use FragmentManager rather than openFragmentTransaction.
(There's a change on the PreferenceHeader tag too, but seems like we're
not using it.)
Bug 2922220
Change-Id: If604a97ac73b9ad7d84e453d36beb84bf31ff98f
doInBackground() returned a string[] when error, but onPostExecute() expects
null.
Also added isCancelled() check, just in case.
Bug 2918930
Change-Id: Ie87ff2e2e5b7c3fd77a062944759d03f8f09d3d9
Some tests create mock controllers. They register themselves to
MessagingController when instantiated, but never unregister.
Added a cleanup method, and call it for each instance.
(I was hoping it would spped up unit tests, but it didn't. Still
it's a nice thing to do.)
Change-Id: Ia90f0380aef388d22f7cfcf6e9203e05444b3285
Merge commit 'c2631344929f3befcfb3730930daa4cbaac057ba'
* commit 'c2631344929f3befcfb3730930daa4cbaac057ba':
Clear password related policies in PolicySet when p/w not required
Merge commit '9382eb9ff21855e98b67392f99d721a78a4cfab0' into gingerbread-plus-aosp
* commit '9382eb9ff21855e98b67392f99d721a78a4cfab0':
Clear password related policies in PolicySet when p/w not required
Merge commit 'a30631da1cae25be3f75137133297e30cef2db9c' into gingerbread
* commit 'a30631da1cae25be3f75137133297e30cef2db9c':
Clear password related policies in PolicySet when p/w not required
- Now MessageListFragment uses loaders to load data.
- Now that we use Loader's auto-requery with throttling,
removed the throttling timer from MessagesAdapter.
- Simplified footer mode. (now only "no footer" or "load more")
- Removed saving/restoring list state code.
These method don't really look like working, or at least
not always working. Now that UI's lifecycle is changing,
we'd better redo it from scratch.
- Removed MessageListUnitTests.
It only has tests for onSaveInstanceState/restore of the fragment,
which I virtually disabled.
And minor clean-ups
- Moved the code to save/restore selected state from the fragment
to Adapter.
Bug 2911766
Bug 2897500
Change-Id: I16c7aefecc5409c57fc5fc8c59b5c80d9b7fc164
Don't use restartLoader(). Use initLoader() with stopLoader() when necessary.
This allows us to make use of LoaderManager's "retaining" feature.
i.e. We won't have to requery when the screen orientation changes.
Also, don't start loading in onStart(). Fragment manager seems to kick
exisiting loaders after onStart(), so you'll end up getting onLoadFinished()
twice.
(Looks like I got unluck with this--there was no strong reason to start loading
in onStart rather than onResume, but I think we can leave other fragments as-is
as long as they don't use loaders.)
Seems to be working.
Change-Id: Ib4f72098bd0fcbfce284ae6e16055d20ee410cf3
Apparently IMAP servers may return multiple SEARCH responses for a
single SEARCH command, and we need to handle all of them.
Before the IMAP rework there was 3 methods that issued the SEARCH command.
Two of them ware doing it right, but the other wasn't, which was what
I copied from, unfortunately!
In case you're wondering, originally the test for this method was done through
upper methods, e.g. getMessage().
Bug 2911647
Change-Id: Ia50072944d5b01c1e59541c3a966067b13910cc4
* Apps trying to open attachments using AttachmentProvider were
seeing SecurityExceptions due to the fact that internal calls
from AttachmentProvider to EmailProvider didn't have their
calling identity saved/restored.
* Updated provider calls so that these calls use the Email
process' identity.
Bug: 2908737
Change-Id: Ifb71ad834530c6232728e1aad31439991f8ed379
There's something weird going on when you add an Exchange account
and we try to look up the inbox. Add log for investigation.
- Log class name
- Log normal path (MAILBOX_FOUND) as well if debug is enabled.
(Other paths are always logged. These paths shouldn't be used often,
so I think it's okay.)
Change-Id: Iff5a28a1240896f8e2b991b891cbc696e7901f06
- mConnection.destroyResponses() should be protected with
if (mConnection != null).
When we get an IOException, we close the connection and null it out in
ioExceptionHandler(). So mConnection can be null at any point after
where ioExceptionHandler() first appears.
- ioExceptionHandler should close its parent ImapFolder only if the argument
connection is mConnection.
Methods like exists() may pass an ImapConnection which is not mConnection
to ioExceptionHandler. In which case we don't have to close the ImapFolder.
Bug 2898211
Change-Id: I8f9f45d91f596bb8da1a1575593e652d66deb643
Fix for crashes caused by an incomplete account
which typically a crashed unit test leaves behind.
- "Delete account" now works for incomplete accounts
- AccountBackupRestore won't crash.
Change-Id: Ie235aa15cf9b970fd184c60f14406aa7353c6f00
- Implemented "account settings".
- Added "add account" menu. It's not clear how to get to the screen at
this point, so just added a menu item for this for testing.
Change-Id: I78cfa54f2533917cc742b6ec027c2a0624cf0c1a
- After adding an account, and when a shortcut to an account is clicked,
launch Welcome instead of MessageList.
- Then welcome launches the appropriate activity.
(MessageList or MessageListXL)
- Welcome no longer launches AccountFolderList, which will be gone
according to the current plan.
Always going through Welcome makes sure that the account backup/restore
and the reconciler will always get kicked.
Change-Id: Ia57027eba16e98c5d8854e8d3c1d8773bcfbf1e5
It's related to the use of Activity.manageQuery().
This may be a regression in the framework, but it's annoying enough and
causing a problem with testing, let's just not use managedQuery().
Bug 2901309.
Change-Id: I8ae5b6ffe17979a094d5a23d49f42e8de04ed4f0
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
- Don't swallow exception information.
- If the file exists but can't read, try to remove it.
- Don't use createNewFile. Just overwrite.
Bug 2898372
Change-Id: I7c0802f751a020c546aa07fa932b41ead31a8dc8
Unfortunately software-keyboard is disabled on master for some reason,
so we can't use the R key hack any longer...
Change-Id: Ide73e11742e5de70fec45009eee20a1a74fcbfd1
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