summaryrefslogtreecommitdiff
path: root/src/com/android/mail/ui/AbstractConversationViewFragment.java
Commit message (Collapse)AuthorAgeFilesLines
* Peek mode for 2-pane landscapeAndy Huang2014-10-151-21/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Peek mode allows CV fragments to be visible but not marked viewed and read. TPC keeps a global flag for whether the current conversation should be peeked vs marked read. I have tried to manually reset the flag in the 6 cases that cause the current conversation to change: 1. tap another conversation (don't peek) 2. swipe to another conversation (don't peek) 3. keyboard-advance to another conversation (peek) 4. auto-advance=newer|older (don't peek) 5. auto-advance=list (go older & peek) 6. empty CV and a list cursor has loaded (peek at i=0) Swipe, in particular, required a new onConversationViewSwitched() call in CPA because onPageSelected() is triggered both when swiping around in the view pager AND when simply setting the initial page as part of constructing a view pager. Thankfully, there is only ever one copy of this peek flag in the app, in TPC, since AAC/TPC is where all the work is done both to mark conversations seen and to switch to new conversations. Rotation to portrait on tablets now requires tearing down a ViewPager; this code and thought process is documented here: http://go/xqaxk TODO: selected indicator for transition from peek->read state in-place TODO: touches in CVF should mark it read Bug: 17291366 Change-Id: I24f71a2b7985773814d8caad9f3ab3fe5c3609c8
* Disable unused menu itemsJin Cao2014-09-291-1/+1
| | | | | | | | | | Since we now have keyboard shortcuts, it's no longer enough to simply set menu items invisible. For menu items that are no longer valid, use both setVisible and setEnabled. b/17692730 Change-Id: Iad9fb9b6638a68a4650cba699ea430c5c6e6e0fe
* New keyboard shortcutsJin Cao2014-09-251-5/+12
| | | | | | | | | Does not include ctrl+ENTER for SEND & we need a new key for REPLY since we are not supporting shift. b/17070243 Change-Id: Ia5f179336dfc2b6631e1a5f26ee888f82f4873c0
* Gmail crash in webviewJames Lemieux2014-09-161-1/+2
| | | | | | | | | | | b/17324135 It is possible for the cursor backing the conversation view to be null at various points. The webview client has now started execising an existing method in ConversationViewFragment at times when this cursor *is* null and exposed this bug in old code. Change-Id: If8c2d56cb31fb5214994f94b7a86bb344ea17751
* switch to appcompat. b/16664350Andrew Sapperstein2014-08-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently only for MailActivity, ComposeActivity, and FolderSelectionActivity. Any activity that inherits from ActionBarActivity must use an Appcompat-derived style. Three styles currently exist: UnifiedEmail.Appcompat, UnifiedEmail.Appcompat.Toolbar, and ShortcutWidgetTheme are all based on appcompat. go/appcompat-material-doc contains the full migration guide. The fast version is: All MenuItem-related work that relates to actions must use the MenuItemCompat-equivalent. Any theming should use the appcompat versions which don't require a namespace prefix. For instance, use actionBarStyle instead of android:actionBarStyle. There are a few missing styles on views that can't use appcompat versions. Those still use style overrides for v21 changes. All others use appcompat versions. A few methods on activity should now use the support equivalents: getSupportActionBar() supportInvalidateOptionsMenu() startSupportActionMode() Change-Id: Ic6f5964f4115ab4bde49c19df5fe49c9086df965
* Revert "Revert "Use getAccountId for AccountPreferences and FolderPreferences.""Paul Westbrook2014-07-301-1/+1
| | | | | | This reverts commit ce9372d8ee7daf9b05569e98f684f5b7e14f6a04. Change-Id: Ie5d560e4a29502078e0df15eb20d4ea7f153779a
* Revert "Use getAccountId for AccountPreferences and FolderPreferences."Régis Décamps2014-07-291-1/+1
| | | | | | | | Due to b/16645621 [Smoke test] Not receiving notifications when a new email arrives. This reverts commit 8d7d0b7dda368390c04dc6fd8156cf7a6ed72d6e. Change-Id: I3ab3aaa552a8f0c25ab369c0aceba4ec44c5a3e8
* Use getAccountId for AccountPreferences and FolderPreferences.Ray Chen2014-07-281-1/+1
| | | | Change-Id: I7dab0aa619a9372b38c2336af9ab19df1629da84
* Fix Null context in AbstractConversationViewFragment.Ray Chen2014-07-231-1/+1
| | | | | | b/16485789 Change-Id: Iad4b74ca037467f1c99e91d5498f65cc002ed698
* Delegate Account creation to builder class.Ray Chen2014-07-161-3/+3
| | | | | | | Account contructors are no longer public and clients need to use Account.builder().buildFrom(...) instead. Change-Id: I8f072e893b49b64d962fa7a075e5c15364c4c05f
* Add getAccountId() method to Gmail Account so it can be used toRay Chen2014-07-101-1/+1
| | | | | | | | retrieve AccountPreference. b/15666250 Change-Id: I61c6f02e4d00a23b30c90a6c5f4be266aefc8889
* Allow alternate sources for contact images.Andrew Sapperstein2014-05-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | Makes some classes that overridable in order to provide alternative implementations: ContactResolver, ContactResolverTask, ContactLoaderCallbacks, and ContactPhotoFetcher all can be subclassed to provide new behavior. Also added hooks in ControllableActivity and MailIntentService to override building these classes. NotificationUtils was also updated to force all calls through MailIntentService which can be overridden. Finally, moved the BitmapCache used in conversation list to the activity level instead of at AnimatedAdapter-level (which is effectively fragment level). This speeds up subsequent queries for images dramatically. We reset the cache when changing accounts. b/11387812. Change-Id: Ie70d800862b073163ccbfa5295d6950e57d64009
* Merge "Fix some code style nits." into ub-mail-masterAndrew Sapperstein2014-03-291-1/+0
|\
| * Fix some code style nits.Andrew Sapperstein2014-03-291-1/+0
| | | | | | | | Change-Id: Ie12948b2d35d1184bc5c4e3d8bd3433ad0a8d2ab
* | allow an extra option on attachments (in bar and tile UI)Andy Huang2014-03-251-0/+1
|/ | | | | | Bug: 7659807 Change-Id: I4c1294d2ba772a70139e0b37429b17bc6096cafd
* View entire message UI.Andrew Sapperstein2014-03-141-5/+0
| | | | | | | | | | | | | We need the per-message plid server support, but we are forwarding the clipped bit to the UI and showing a button based on that bit. Clicking that bit will open the plid viewer for gmail. Email should be unaffected as it does not ever return clipped as true. b/2887917. Change-Id: Iddb54e37cf650ca16a75fcbe69f1861becdd81b9
* the dump has '%' chars in it...Tony Mantler2014-03-031-1/+1
| | | | | | b/13286958 Change-Id: Ibc726b8a640e905ee55f22572f2dbe636091685d
* Remove Print/Print All from conversation view in Email.James Lemieux2014-01-151-2/+24
| | | | | | | b/12245916 A secondary change in this defect is to dynamically show either Print or Print All in GMail conversation menus depending on whether the conversation includes 1 or many messages. Change-Id: If78dced66893c0ae619850f2272c007747e98e26
* Deduplicate Address classTony Mantler2014-01-081-2/+1
| | | | Change-Id: I4f6df51f5641475ffaf96b0189ccc00748880cc0
* View inline images in photo viewer. b/5555553.Andrew Sapperstein2014-01-071-0/+5
| | | | | | | | | | | | | | | | Uses the existing javascript image src rewriting step to build a mapping of urls to message ids. This mapping is passed into the InlineAttachmentViewIntentBuilder so that it can use this information along with the conversation id and account name to build attachment and attachment list uris so that a photo viewer open intent can be created. Additionally, SecureConversationViewController will need a different mechanism for this UI to work in Email/the eml viewer. Change-Id: If14800348fe2191d0633bf768b8cb4e9746f6578
* More name/email mixups.Tony Mantler2013-11-251-1/+1
| | | | | | b/11855572 Change-Id: I262bd652c409bdc2ee18c37bc58d0ff1041c7a4a
* misc analyticsAndy Huang2013-11-211-0/+37
| | | | | | | | | | | | | | * lots of new menu items * log auto-advance setting * log message header taps * log photo-viewer menu items * log conversation views (including enclosing label, synced state, message count) * log folder views (including bucketed total counts) * log pager swipes (including folder type) Bug: 11253673 Change-Id: Iffdcbf19b202fbb3b6b33e0f7f0e9e4c24fa948d
* Abstracted out snap headers for ads UI refresh.Andrew Sapperstein2013-10-151-0/+1
| | | | | | | | | b/11132059 Rather than directly including the snap header in conversation_view, we inflate it at runtime via an override-able method in ConversationViewFragment. Change-Id: Icaec39f6461313a894eef5506448b3f7513df044
* Print single message and offscreen webview.Andrew Sapperstein2013-10-111-1/+5
| | | | | | | | | b/10712542. Also supports Eml printing and secure printing (though that's email only and has some buggy rendering). Also fixes the no subject crash. b/11136365 Change-Id: Ie5f6e7d7e1762c115df3169b6e62dc439545f08c
* am fc08f9df: Merge "Clean up use of Account.name where an email address is ↵Tony Mantler2013-10-101-1/+1
|\ | | | | | | | | | | | | expected" into jb-ub-mail-ur10 * commit 'fc08f9dfb8338574421ac9395dd4b71153096bfe': Clean up use of Account.name where an email address is expected
| * Clean up use of Account.name where an email address is expectedTony Mantler2013-10-101-1/+1
| | | | | | | | | | | | b/11066314 Change-Id: I65d3c92d6a50ed918a7039fba10ed4dff6a422f7
* | Printing: support tablet message header overflow.Andrew Sapperstein2013-10-091-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | b/10712542 Adds new behavior for v19 devices, both phone and tablet. On phone, new printing option in MessageHeaderView overflow menu. On tablet, new printing option in same place but since we now have an overflow, we use the reply/reply all setting to show only one of reply/reply all on tablet as well. As a result, we also changed the string for that setting for v19 tablets. Change-Id: I71db88ce4a50479b03775b9d50d65e3626231589
* | Show images by default. b/11044804.Andrew Sapperstein2013-10-021-0/+6
| | | | | | | | | | | | | | | | | | Needs final UX on preference placement and strings but otherwise, it works on Gmail. It's off and the setting is hidden in Email. Currently a checkbox preference. Change-Id: I97ce4361e9093e5ce7b3300205cba8f58e27b3d6
* | Initial printing support.Andrew Sapperstein2013-09-261-0/+7
|/ | | | | | | | | | | | | Needs mocks and redlines and such. b/10712542 TODO: Logos for Email and Gmail. Attachment support. Use offscreen webview. Secure conversation view support. Change-Id: Iec37a9a46e506ccf12fbbb775c1b47b08a0d9724
* basic analytics supportAndy Huang2013-08-121-0/+8
| | | | | Bug: 9861033 Change-Id: I940e25dc12a7cbfe91b1d5ec457c7fc1045171df
* Add new ViewMode.Andrew Sapperstein2013-08-071-1/+1
| | | | | | | Works in OnePaneController. Need to wire up the buttons. Change-Id: Ia9aa5e696cbba1d170038e47d4941cc6fcf0a967
* Change all resid switches to if-elseif-elseScott Kennedy2013-07-311-9/+7
| | | | | | | | | | | | | | | | | I really want to get this building in an IDE. As per http://tools.android.com/tips/non-constant-fields, library projects (like UnifiedEmail will be) have non-final R constants. They are not final until packaged into the main application project's (Gmail/Email)'s R.java. As such, they cannot be used in switch case statements, and we must use if-elseif-elseif-elseif-...-else instead. "This is typically in UI code and the performance impact is negligible." Change-Id: Ie699c13e1becd51c59c1b2ea81bc902d4f2e28d9
* Remove ad code.Andrew Sapperstein2013-07-311-14/+23
| | | | | | | | Moved to UnifiedGmail. Also refactored HtmlConversationTemplates to use HtmlMessage, a new interface instead of the Message class. Change-Id: Ie14694b37800ed9eb9fc692d434508f66660d55b
* Hash account when building base uri in conv view.Andrew Sapperstein2013-07-011-1/+1
| | | | | | | | | | Fixes b/9170480. Previously we just used account name to build the base uri for viewing the conversation in web view. That breaks when the account name has an apostrophe. So instead just hash the name and use that instead. Change-Id: I84f6dd4f67371795bc46c6f97573230e3981a4cc
* Clean up a bunch of warningsScott Kennedy2013-06-251-1/+1
| | | | | Bug: 9565838 Change-Id: Ie3a380581e81c63aaa0764875c55bfdccd5f2b13
* fix crash on link openAndy Huang2013-06-121-1/+1
| | | | | Bug: 9396858 Change-Id: I409d0d648120d0f61b97da1c1fcfdc91ced1c0f8
* Working implementation of eml viewer.Andrew Sapperstein2013-06-121-5/+5
| | | | | | | | | Everything works except attachments. The implementation uses a controller that is used by both SecureConversationViewFragment and the new EmlMessageViewFragment to do the rendering work. Change-Id: I4d8b9b56e6609c3a81b902b102a90f1e50c115cd
* Refactoring of AbstractConversationViewFragment.Andrew Sapperstein2013-06-101-294/+15
| | | | | | | | | | In order to support EML viewing, we need a bunch of the overhead provided by AbstractConversationViewFragment without actually inheriting from it. Additionally, most of the code was inner classes that had no business being such. These are now moved into their own classes. Change-Id: I80769d2606b52c41dc116a6bdee17c00adc66a5a
* Unify LogTagScott Kennedy2013-06-051-2/+1
| | | | | | | | | | | | | | | | | | | | There is now only one LogTag class. The static initializer of GmailApplication (existing) and EmailApplication (new) will now set the log tag to "Gmail" and "Email", respectively. Up until that code is run, it will be "UnifiedEmail". "setprop log.tag.Gmail VERBOSE" (or .Email) will trigger all logs to be printed as long as they go through LogUtils, regardless of what tag is used by that individual log. This lets us still turn on logging everywhere in one command, but also lets us use more descriptive tags (like the class name). And since we no longer have three com.android.mail.utils.LogTag classes, builds will be much easier. Also, we now use LogUtils everywhere. Change-Id: Iec53e87cad0a46b73d2afbbd8d44aca097a5087a
* Refactor ConversationMessage out of MessageCursor.Andrew Sapperstein2013-06-041-1/+1
| | | | | | | | Just moved the static final inner class to its own file and fixed up the imports. Also moved the MimeMessage parsing into Message instead of in ConversationMessage. Change-Id: Ic35d4cf5e52b392d68898ff47efaeeee4d0865b0
* Properly size text in Email.Andrew Sapperstein2013-05-291-0/+18
| | | | | | | | | Now matches the Gmail behavior where we set the text size to 80% and then scale up. Also refactored the scale up portion into AbstractConversationViewFragment. Fixes b/9176401. Change-Id: I902b399f96d4b6e8a7dd2450108e6c8bf5e24ab1
* Prevent an NPEAlice Yang2013-05-231-2/+4
| | | | | Bug: 9111116 Change-Id: I5b3916c6d8a04ebb86d985196ae1ee086a1aca09
* Merge "Add gservices flag for disabling transforms" into jb-ub-mail-ur9Alice Yang2013-05-101-1/+2
|\
| * Add gservices flag for disabling transformsAlice Yang2013-05-101-1/+2
| | | | | | | | | | | | Bug 8876381 Change-Id: Id6f144bcb964307c6ab73a3555b9c7e019a2d6ea
* | Use an ObjectCursorLoader for MessagesPaul Westbrook2013-05-091-15/+21
|/ | | | | Bug: 8763530 Change-Id: I0a70c92dd52eff5d10c067fdb78b371bfd8178ac
* Merge "Revert "Disable transforms temporarily"" into jb-ub-mail-ur9Alice Yang2013-05-081-3/+1
|\
| * Revert "Disable transforms temporarily"Alice Yang2013-05-081-3/+1
| | | | | | | | | | | | This reverts commit ebfbfbd4a429a0ae720735cb988c9f48f646999a Change-Id: I806a76d0d0887db3f867748f5ffc33a6b1cd162d
* | Merge "Disable transforms temporarily" into jb-ub-mail-ur9Alice Yang2013-05-071-1/+3
|\|
| * Disable transforms temporarilyAlice Yang2013-05-071-1/+3
| | | | | | | | | | | | | | | | | | Checking this in temporarily to obtain a signed build with transforms disabled. Will revert once we have a build. Bug 8835996 Change-Id: Ibb61dc548381c393f4cc82b273889ec3dbb2035f
* | More loggingScott Kennedy2013-05-071-0/+8
|/ | | | | Bug: 8824046 Change-Id: I99c63dc62393f1446938c52699ca03b6ea2fad3a