Commit Graph

189 Commits

Author SHA1 Message Date
cketti ba69b3a647 Remove ActionBarSherlock 2014-06-21 17:09:45 +02:00
Joe Steele 00a60a0f4f Clean up lint items
Eliminate unused variables/fields/imports
2014-05-03 12:51:37 -04:00
Joe Steele 5cc4d7c6a9 Avoid NPE in MessageOpenPgpView.updateLayout()
E/AndroidRuntime(24914): FATAL EXCEPTION: main
E/AndroidRuntime(24914): Process: com.fsck.k9, PID: 24914
E/AndroidRuntime(24914): java.lang.NullPointerException
E/AndroidRuntime(24914):    at org.openintents.openpgp.util.OpenPgpServiceConnection.<init>(OpenPgpServiceConnection.java:35)
E/AndroidRuntime(24914):    at com.fsck.k9.view.MessageOpenPgpView.updateLayout(MessageOpenPgpView.java:115)
E/AndroidRuntime(24914):    at com.fsck.k9.view.SingleMessageView.setMessage(SingleMessageView.java:623)
E/AndroidRuntime(24914):    at com.fsck.k9.fragment.MessageViewFragment$Listener$2.run(MessageViewFragment.java:602)
E/AndroidRuntime(24914):    at android.os.Handler.handleCallback(Handler.java:733)
E/AndroidRuntime(24914):    at android.os.Handler.dispatchMessage(Handler.java:95)
E/AndroidRuntime(24914):    at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime(24914):    at android.app.ActivityThread.main(ActivityThread.java:5081)
E/AndroidRuntime(24914):    at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(24914):    at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime(24914):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
E/AndroidRuntime(24914):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)
E/AndroidRuntime(24914):    at dalvik.system.NativeStart.main(Native Method)
2014-05-03 11:43:05 -04:00
Dominik Schürmann c36ef88e64 Hide lookup key button explicitly, previously it was still visible after downloading a key 2014-04-03 15:42:57 +02:00
cketti 49dbaf034c Try to use the correct identity with OpenPGP API's EXTRA_ACCOUNT_NAME 2014-04-01 02:44:47 +02:00
cketti cc8353d255 Merge pull request #457 from openpgp-keychain/openpgp
OpenPGP Provider API
2014-04-01 02:44:32 +02:00
Dominik Schürmann 6175c4c72d Use identity instead of account in MessageCompose, simplify account naming 2014-04-01 00:16:14 +02:00
Dominik Schürmann 974a73b07d Use new account extra to allow multiple accounts 2014-03-26 22:11:19 +01:00
Dominik Schürmann 949f8ae47e Fix documentation and variable naming 2014-03-06 13:58:06 +01:00
Dominik Schürmann 6881daae6a Remove debug logs 2014-03-04 22:11:42 +01:00
Dominik Schürmann f5b1ed920b Handle SIGNATURE_SUCCESS_UNCERTIFIED, code cleanup 2014-03-04 15:10:20 +01:00
Dominik Schürmann 4a69ef1509 New OpenPGP Provider API 2014-03-02 16:51:47 +01:00
yulin2 fa7118dab3 Put long-running operation into AsyncTask 2014-03-01 06:04:50 +01:00
cketti 90f63ba057 Remove old setting for message content font size
- export new setting
- add upgrade code to convert old setting to new format
2014-02-13 04:22:45 +01:00
cketti cf228583bc Merge pull request #448
Change message body font size with slider
2014-02-01 00:52:32 +01:00
Sergii Pylypenko 67abde055a Change message body font size with slider, using new setTextZoom() WebView API, from 40% to 250% 2014-01-31 23:09:25 +02:00
cketti a62f7aaa29 Don't crash when startActivity() fails
Fixes issue 6201
2014-01-31 20:05:00 +01:00
Troy Rollo abb3318846 Alternative fix for issue 5697 - ASUS display bug 2014-01-30 19:56:30 +01:00
Joe Steele 094156cc2a Fix issue 6064: Inline images don't display on KitKat
Eliminate the invocation of
WebSettings.setBlockNetworkImage(boolean flag),
thus maintaining the the default setting of "false".

On Android versions prior to KitKat, this setting has no
effect on inline image attachments loaded with content:
URIs.  Such images would load regardless.

With KitKat, this setting does have an effect -- a
setting of "true" will block image attachments loaded
with content: URIs.

By removing this call, K-9 Mail behaves the same on KitKat
as on earlier Android versions, and the behavior on earlier
versions is unchanged.
2014-01-19 01:31:55 +01:00
Joe Steele e91e3f4e7d Eliminate needless use of reflection
The minSdkVersion was recently increased from 8 to 15.

WebSettings.setBlockNetworkLoads has been publicly available
since API level 8 (Froyo).

StrictMode has been publicly available since API level 9
(Gingerbread).
2014-01-10 18:27:55 -05:00
cketti 94296ec7df Revert "Add work-around for Asus Transformer WebView display bug"
This reverts commit 78428e287b.
2014-01-05 04:16:34 +01:00
Jasper Klein 78428e287b Add work-around for Asus Transformer WebView display bug 2013-12-16 17:11:28 +01:00
Jesse Vincent d4246a0976 With the new webview scrollview combo we've got loadinoverviewmode seems to behave better. 2013-11-07 10:39:37 -08:00
Joe Steele 1cbdd390f3 Use non-deprecated constants 2013-11-05 16:26:29 -05:00
Joe Steele 5311a2ef01 NonLockingScrollview fixes.
Implement methods missing in API 7

Fix coordinate reference frame mismatch.  Touch events are
relative to the view display, whereas view children are relative
to the view.
2013-11-05 16:26:28 -05:00
Joe Steele fa962e7bd7 Move AOSP files.
Patch RigidWebView for K9.
MessageWebView would need to extend RigidWebView.
2013-11-05 16:26:27 -05:00
Joe Steele 7b0082026c Revert auto-scroll changes that are no longer needed.
Revert "Only Jelly Bean seems to have the auto-scroll issue"

This reverts commit a3802a7a8e.

Revert "Hack around WebView's initial auto-scrolling past the message header"

This reverts commit 8dcc769c50.

Conflicts:

	src/com/fsck/k9/view/MessageWebView.java
2013-11-05 16:26:25 -05:00
Joe Steele 94a4585317 Switch to using NonLockingScrollView
This implements the AOSP Email solution for incorporating
a Webview inside a ScrollView, while still being able to
scroll diagonally.

This replaces the functionality of TitleBarWebView (which
is now removed).
2013-11-05 16:26:23 -05:00
Danny Baumann 890e0e22e3 Some assorted warning fixes. 2013-09-25 15:20:43 +02:00
Jesse Vincent ee234b65f8 Return to old style chips for accounts, folders and messages.
My circle design stopped being even a little bit useful when we stopped showing
the "complex" versions of the shapes
2013-08-22 20:56:55 -04:00
cketti 20fcd6f63d Add setting to toggle colored background of fallback contact pictures 2013-08-16 18:43:00 +02:00
Joe Steele 2df436e7bc Close stream when done (StrictMode error). 2013-08-02 12:56:10 -04:00
Joe Steele fce39f0fce HTML tag cleanup
Effective with earlier commit e2c5229e85,
messages are wrapped with <html> tags at display time, rather than
when messages are saved.

For consistency, this commit removes tags from a status message, because
they, too, will be added back at display time.

Closes pull request 286.
2013-08-01 19:38:48 -04:00
Stephan Fuhrmann 16f6d85ea2 GMail-app-style generated colorful one-letter contact pictures for pictureless contacts 2013-07-21 14:34:45 -04:00
Jesse Vincent fa1b7dec31 broaden a 'catch' to catch other failures showing all headers.
Market reported NPE:

java.lang.NullPointerException
at com.fsck.k9.view.MessageHeader.showAdditionalHeaders(MessageHeader.java:186)
at com.fsck.k9.view.MessageHeader.onShowAdditionalHeaders(MessageHeader.java:318)
at com.fsck.k9.fragment.MessageViewFragment.onToggleAllHeadersView(MessageViewFragment.java:300)
at com.fsck.k9.activity.MessageList.onOptionsItemSelected(MessageList.java:867)
at android.support.v4.app.Watson.onMenuItemSelected(Watson.java:119)
at com.actionbarsherlock.ActionBarSherlock.callbackOptionsItemSelected(ActionBarSherlock.java:603)
at com.actionbarsherlock.internal.ActionBarSherlockNative.dispatchOptionsItemSelected(ActionBarSherlockNative.java:78)
at com.actionbarsherlock.app.SherlockFragmentActivity.onMenuItemSelected(SherlockFragmentActivity.java:205)
at com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected(PhoneWindow.java:1047)
at com.android.internal.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:735)
at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:149)
at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:874)
at com.android.internal.view.menu.ListMenuPresenter.onItemClick(ListMenuPresenter.java:180)
at android.widget.AdapterView.performItemClick(AdapterView.java:301)
at android.widget.AbsListView.performItemClick(AbsListView.java:1276)
at android.widget.AbsListView$PerformClick.run(AbsListView.java:3067)
at android.widget.AbsListView$1.run(AbsListView.java:3963)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4898)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
at dalvik.system.NativeStart.main(Native Method)
2013-06-30 18:52:27 -04:00
cketti 79059e30da Remove override annotation so we can use the latest SDK to compile 2013-05-23 16:45:19 +02:00
Jesse Vincent 2e74d28da9 Merge branch 'Issue_4503_auto-fit_messages_option' of https://github.com/zjw/k-9 into zjw-Issue_4503_auto-fit_messages_option
* 'Issue_4503_auto-fit_messages_option' of https://github.com/zjw/k-9:
  Revert "Don't show a disabled preference if there is nothing a user can do to enable it."
  Fix indentation
  Correct preference version number.
  Issue 4503: Auto-fit messages option
  Don't show a disabled preference if there is nothing a user can do to enable it.
2013-05-07 21:49:12 -04:00
cketti 1c722876f1 Use very light grey instead of white for message text in dark theme 2013-04-24 01:05:11 +02:00
Joe Steele 84769d2433 Fix indentation 2013-04-11 22:26:32 -04:00
Joe Steele d9979cb1a2 Issue 4503: Auto-fit messages option
Create a preference option to automatically shrink messages
to fit the screen width (default setting is "shrink").
2013-04-04 17:11:17 -04:00
cketti 9ea46cf03b Merge branch 'Issue_4019_pinch_zoom'
Conflicts:
	src/com/fsck/k9/view/MessageWebView.java
2013-03-19 21:09:23 +01:00
cketti aff9bec92b Work around a bug in ListView 2013-03-18 22:56:56 +01:00
cketti a3802a7a8e Only Jelly Bean seems to have the auto-scroll issue 2013-03-14 03:19:42 +01:00
cketti 8dcc769c50 Hack around WebView's initial auto-scrolling past the message header 2013-03-12 07:54:38 +01:00
cketti e77c341542 Avoid NPE reported via Play Store 2013-03-05 03:31:18 +01:00
Joe Steele c790fa73c1 Don't store the font-family preference with plain text messages.
Dynamically generate the CSS style for <pre> elements
for inclusion in the HTML <head> element when messages
are displayed.

This permits a user to change their font-family preference
for plain text messages and see the results immediately.

Obviously any old locally-stored messages that had their
font-family stored with them will continue to display using
that font-family, irrespective of the user's current
preference setting.
2013-03-01 18:48:46 -05:00
Joe Steele 548b8e07a6 Refactor code for MessageWebView.setText()
The MIME type for the supplied text was always text/html,
so there is no need to pass that as a parameter.
Furthermore, we are relying on it being text/html because
we are wrapping it with HTML code.

Likewise, change/simplify/rename AccessibleWebView.loadDataWithBaseURL().
2013-03-01 14:32:16 -05:00
Joe Steele 6a844a2553 Remove unused code in HtmlConverter.
HtmlConverter.getHtmlHeader() and getHtmlFooter() are
no longer used.  Remove them and other related code.
2013-03-01 14:30:42 -05:00
Joe Steele e2c5229e85 Change when <html> tags are applied to messages.
Previously, <html>, <head>, & <body> tags were
attached to messages before they were stored locally.
But now that the <head> element also needs to include
a <meta> element (for proper MessageWebView display),
it seems unecesary to store all these tags with each
message.

Now the tags are no longer stored with the messages.  Instead,
MessageWebView applies the tags before displaying the message.

This also eliminates the need to upgrade an older
message database where all the old messages would have
otherwise needed to be wrapped with the new tags.
2013-03-01 12:59:59 -05:00
Joe Steele 28212bc04f Issue 4019 -- Fix inability to zoom out.
Thanks to davidgca...@gmail.com for references in
his comments 80 & 81.
2013-02-27 16:11:08 -05:00