- 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
- 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
- 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
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
Unfortunately software-keyboard is disabled on master for some reason,
so we can't use the R key hack any longer...
Change-Id: Ide73e11742e5de70fec45009eee20a1a74fcbfd1
- 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
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
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
MessageView for regular messages and MessageFileView for EML files.
I'll break down MessageViewFragment too.
Change-Id: Iae66f33d8fb5de58084ab4aef31588e9743c5a18
* Provide unused placeholder for account_settings_exchange_summary
* Bulk cleanup all other placeholders (no longer required)
Change-Id: I55d502eb725d721c9a893c17cf76f227489bb89f
There are two major, interrelated parts to this CL:
1) Clean up the activities to reduce the use of Intents to pass
information between activities; instead, we use a common
SetupData structure that automatically saved/restored as necessary
during the setup flow. A fair amount of code and inconsistent
use of Bundle extras has been eliminated in the process.
* Create SetupData structure, setters/getters, and initialization
methods to simplify the preservation of state during setup flow
* Remove all state/flow extras from Intents; Intents now only
specify the Activity to be started, which should greatly simplify
the transition to Fragments.
* Remove all state/flow fields from Activities
* Modify existing setup activity unit tests and confirm tests pass
2) Create AccountManager accounts for POP/IMAP email accounts to
provide consistency in user experience. Also, internal flows are
now identical as between account types.
* Move account reconciliation from SyncManager to MailService, so
that reconciliation is consistent between email and exchange
accounts; move unit tests as appropriate
* Add a "Sync Email" setting for POP/IMAP/EAS
* Change MailService to respect the "Sync Email" setting in
Settings -> Accounts & sync
* Create PopImapSyncAdapterService to handle manual POP/IMAP sync as
requested by SyncManager; add EmailSyncAdapterService to perform
the same function for EAS
* Use new PopImapAuthenticatorService to add AccountManager accounts
for POP/IMAP accounts; setup appropriate stanzas in AndroidManifest
and add related xml files
* Update AccountSettings to use SetupData
Miscellaneous other changes:
* Only allow valid port numbers in incoming/outgoing setup
Bug: 1712475
Change-Id: Ibdac52fb2c5578b86bf3992ddb1acd10f162391a
How to launch:
- Kick "Email 2 Pane" in the app drawer.
Major known issues:
- When you launches "Email 2 Pane", it starts directly; the logic in Welcom
won't be executed.
- There's no UI to add accounts. Use the old UI.
- There's no way to select non-default accounts.
- The on-screen buttons except for older/newer don't work.
- No contex menus work.
Change-Id: I38374acafafbae62e46f84294a7677e54686cfc2
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
- 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
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
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
Displays actionbar properly, and the two buttons work.
Submitting with one open issue:
1. The indeterminate progress indicator is not directly supported in the
ActionBar. We're waiting for a UI call or framework support. Until
then there is a placeholder using an incorrect icon to show progress.
Change-Id: Iaf1546931376cc5b540820cd0fc020ebd176dabf
- Long-press an item to go into the selection mode.
- In the selection mode, tap items to toggle selected/non-selected.
This also means:
- No checkboxes any more.
- No context menu any more.
Color scheme hasn't been updated yet, so it looks a bit ugly for now.
Change-Id: I3cb6c45c1dc5461a234c9e9ab9e038c90a9fe8b2
* Add intent filter for application/eml and message/rfc822 mime types,
launching MessageView with a Uri
* Modify loadMessageTask to handle the Uri by parsing the attachment's
input stream with Pop3Message.parse(), and then creating an
EmailProvider message in a special Mailbox created to hold
"attachment" messages
* Delete all "attachment" messages after the parent message is closed
* Add unit tests
Change-Id: I20276ee006b9f05b889f3c808d3dc407cde26d49
* Introduce AccountFolderListFragment and its layout
* Extract all list-related UI into it
* Fix leaking cursor in AccountsAdapter and add unit test
Change-Id: Ica566847d97927b736f515d434c6691c82343290
- Extracted MessageListFragment out of the MessageList activity.
- This is basically pure extraction, with the following conceptual change.
- Now the MessageList activity doesn't know the mailbox id or
the account id. If it needs these ids, it needs to ask the fragment.
- MessageListFragment.LoadMessagesTask tries to determine the account ID
if it's unknown.
Most code in MessageListFragment is directly copied from MessageList
with minimal changes (e.g. pass mActivity instead of 'this' as a Context).
There's a few cleaning up oppotunities. I'll work on them later in a separate
CL.
Change-Id: Ie004cc49b429f2cd8f9de73df5abb94f3054ea0a
This reverts commit 3ee0cad5f5.
Because commit 284b62e1b8c3419bfd02c6fea5ba0a68146c06f8 fixes the underlying
conflict between DeviceAdmin policies and apps attempting to disable the
Keyguard Lock, this patch is no longer required.
Accounts with a server policy requiring a device PIN or Password will
now work properly.
Bug: 2737842
Change-Id: I533c27a01a8a331dc11a0cb84bcc78f48edf621c
* Moves all list-related implementation to new MailboxListFragment
* One item that remains to be done is to remove the dependency on the
activity for handling context menu (longpress) in the list.
Change-Id: I7b5769d9d81fb685cf480de3d3e18b4e1c078f2d
* The device policies that enforce the use of a device PIN or password
can be sidestepped by apps that implement KeyguardManager.KeyguardLock
* This renders the policies unuseable
* To prevent this, the email app now scans for any packages holding the
DISABLE_KEYGUARD permission. The existence of any non-system app
with this permission will put all security-enabled EAS accounts into
a security hold, and post a dialog describing the problem.
* The user must uninstall any such app(s) in order to sync their EAS data.
Bug: 2737842
Change-Id: I4c96d76b12d9242b5c755dd60d7578a825fae597