aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md1
-rw-r--r--art/omemo_logo.svg273
-rw-r--r--build.gradle4
-rw-r--r--src/main/AndroidManifest.xml2
-rw-r--r--src/main/java/eu/siacs/conversations/Config.java2
-rw-r--r--src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java99
-rw-r--r--src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java13
-rw-r--r--src/main/java/eu/siacs/conversations/persistance/FileBackend.java37
-rw-r--r--src/main/java/eu/siacs/conversations/services/AbstractConnectionManager.java24
-rw-r--r--src/main/java/eu/siacs/conversations/services/XmppConnectionService.java21
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ConversationFragment.java2
-rw-r--r--src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java4
-rw-r--r--src/main/java/eu/siacs/conversations/ui/TrustKeysActivity.java2
-rw-r--r--src/main/java/eu/siacs/conversations/ui/XmppActivity.java6
-rw-r--r--src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java8
-rw-r--r--src/main/java/eu/siacs/conversations/utils/FileUtils.java144
-rw-r--r--src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java10
-rw-r--r--src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java67
-rw-r--r--src/main/java/eu/siacs/conversations/xmpp/jingle/JingleSocks5Transport.java37
-rw-r--r--src/main/res/layout/activity_edit_account.xml10
-rw-r--r--src/main/res/layout/contact_key.xml4
-rw-r--r--src/main/res/menu/encryption_choices.xml6
-rw-r--r--src/main/res/values/strings.xml27
23 files changed, 633 insertions, 170 deletions
diff --git a/README.md b/README.md
index 044d21e9c..a68b162b1 100644
--- a/README.md
+++ b/README.md
@@ -81,6 +81,7 @@ run your own XMPP server for you and your friends. These XEP's are:
#### Logo
* [Ilia Rostovtsev](https://github.com/qooob) (Progress)
* [Diego Turtulici](http://efesto.eigenlab.org/~diesys) (Original)
+* [fiaxh](https://github.com/fiaxh) (OMEMO)
#### Translations
Translations are managed on [Transifex](https://www.transifex.com/projects/p/conversations/)
diff --git a/art/omemo_logo.svg b/art/omemo_logo.svg
new file mode 100644
index 000000000..ca20a5b94
--- /dev/null
+++ b/art/omemo_logo.svg
@@ -0,0 +1,273 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ id="svg4196"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ width="2367.5596"
+ height="1451.5084"
+ viewBox="0 0 2367.5595 1451.5084"
+ sodipodi:docname="omemo_logo.svg">
+ <metadata
+ id="metadata4202">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs4200">
+ <linearGradient
+ id="linearGradient4245"
+ osb:paint="solid">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop4247" />
+ </linearGradient>
+ </defs>
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1600"
+ inkscape:window-height="836"
+ id="namedview4198"
+ showgrid="false"
+ inkscape:zoom="0.32"
+ inkscape:cx="1158.7782"
+ inkscape:cy="667.71025"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg4196"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0" />
+ <path
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 1160.235,302.29735 271.9745,-131.35135 186.9826,134.44197 24.7249,151.44038 -86.5373,135.98729 z"
+ id="path4267"
+ inkscape:connector-curvature="0"
+ inkscape:export-xdpi="15.191093"
+ inkscape:export-ydpi="15.191093" />
+ <path
+ style="fill:#f57c00;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 598.8809,1125.9476 -43.05491,131.8557 -21.52745,94.8553 4.0364,47.0913 67.27328,6.7273 80.72795,-58.5277 43.72764,-78.7098 7.40006,-55.1641 -21.52745,-71.9824 z"
+ id="path4259"
+ inkscape:connector-curvature="0"
+ inkscape:export-xdpi="15.191093"
+ inkscape:export-ydpi="15.191093" />
+ <path
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:10;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 709.52231,1171.4517 C 480.05218,1174.9052 321.72113,1008.3849 269.81593,895.97589 206.11648,758.02449 215.35674,596.92706 303.94612,450.17116 390.00741,320.24292 538.03872,188.34494 665.64434,170.1992 c 86.87989,-10.63238 215.40898,15.76659 250.11793,24.23821 35.046,8.55388 138.10213,41.16536 192.58973,67.91907 53.5186,26.27793 164.698,69.05834 309.1218,196.39025 100.3317,88.4579 183.2875,109.97875 279.7545,106.68109 52.9405,-1.80973 148.8273,-10.56706 171.5302,-24.72865 679.9746,-424.15329 639.4516,799.03733 13.1124,405.39142 -158.3183,-74.1014 -440.1478,10.5521 -637.0436,91.78671 -223.8429,92.3524 -350.01628,130.7858 -535.30499,133.5744 z"
+ id="path4225"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ssccssssscss"
+ inkscape:export-xdpi="15.191093"
+ inkscape:export-ydpi="15.191093" />
+ <path
+ inkscape:connector-curvature="0"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 2121.4484,451.36293 c -26.791,-0.0103 -69.7877,2.87028 -101.1871,10.73905 -68.1167,46.199 -138.5457,83.35128 -167.446,144.67176 -12.1866,25.8575 -15.1986,221.06115 -3.3883,250.53885 22.0574,55.0538 36.5353,68.5186 75.8437,113.5484 490.8133,255.43581 586.5854,-519.34849 196.1777,-519.49806 z"
+ id="path4225-4"
+ inkscape:export-xdpi="15.191093"
+ inkscape:export-ydpi="15.191093"
+ sodipodi:nodetypes="scsscs" />
+ <path
+ style="fill:#f57c00;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 1879.4205,872.05219 c -30.0884,-43.2017 -23.0447,-213.01732 -11.2518,-239.49258 19.553,-43.89704 110.0168,-119.19707 177.1545,-153.50421 62.2867,-31.14337 245.3285,107.06591 242.3844,259.61033 -2.4489,126.88796 -74.9751,256.91706 -216.1596,260.51446 -95.0727,-15.7629 -143.2721,-56.9801 -192.1275,-127.128 z"
+ id="path4313"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="sscscs"
+ inkscape:export-xdpi="15.191093"
+ inkscape:export-ydpi="15.191093" />
+ <path
+ style="fill:#f57c00;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 712.41248,50.975873 130.5787,23.17966 80.35619,97.354527 11.5898,38.63275 -335.33229,-24.72496 56.4038,-112.807627 z"
+ id="path4317"
+ inkscape:connector-curvature="0"
+ inkscape:export-xdpi="15.191093"
+ inkscape:export-ydpi="15.191093" />
+ <path
+ inkscape:connector-curvature="0"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 1414.8968,95.744433 c -119.2326,0.1221 -252.577,46.677797 -357.9883,141.492197 59.2267,85.339 179.6057,681.13776 68.8789,839.94337 91.9688,196.1395 767.4955,273.501 557.166,-210.17391 -15.7049,-36.1151 -49.7142,-108.75426 -41.832,-193.48626 8.4493,-90.8299 56.4409,-192.1808 64.2324,-223.9238 57.3257,-233.5482 -98.225,-354.048497 -290.457,-353.851597 z m -37.9434,48.607397 c 179.9257,-1.202 313.9232,108.10167 295.8852,273.14927 -49.0308,223.244 -65.6093,352.99519 9.7574,506.70029 0.9067,322.06951 -372.1528,246.99471 -531.1856,150.28521 136.0694,-390.78747 -67.0566,-814.79857 -78.5644,-831.62107 107.9381,-67.831 213.0862,-97.9056 304.1074,-98.5137 z"
+ id="path4227-8"
+ inkscape:export-xdpi="15.191093"
+ inkscape:export-ydpi="15.191093"
+ sodipodi:nodetypes="sccsssssccccs" />
+ <path
+ inkscape:connector-curvature="0"
+ style="fill:#f57c00;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:15;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 1371.9686,142.84932 c -91.0213,0.60808 -196.1693,30.68269 -304.1075,98.51367 11.5078,16.82249 214.6339,440.83547 78.5645,831.62311 159.0328,96.7094 532.0903,171.7842 531.1836,-150.28521 -75.3667,-153.7051 -47.9691,-295.82084 1.0617,-519.06483 19.5833,-183.59134 -126.7767,-261.98875 -306.7023,-260.78674 z m 42.0957,76.75039 c 158.8265,-0.80887 251.0755,161.9003 140.5517,325.36606 -113.709,-40.69316 -178.0341,-143.3305 -350.0787,-233.47358 73.9173,-58.593 149.3003,-91.58576 209.527,-91.89248 z"
+ id="path4229-6"
+ sodipodi:nodetypes="sccccssccs"
+ inkscape:export-xdpi="15.191093"
+ inkscape:export-ydpi="15.191093" />
+ <path
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:15;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 1354.944,727.52278 -6.0809,177.36791 128.2608,-32.6939 7.361,-132.81901 c 65.526,-55.1437 -11.1658,-135.6742 -75.9144,-147.0284 -93.1144,-16.3282 -143.1451,90.3398 -53.6265,135.1734 z"
+ id="path4233"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccsc"
+ inkscape:export-xdpi="15.191093"
+ inkscape:export-ydpi="15.191093" />
+ <path
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 598.8809,1127.2931 c -14.1274,92.1644 -82.99521,244.9415 -51.12771,263.7113 36.46239,21.4761 172.66811,-90.819 192.40161,-197.7835 18.83652,133.4254 -129.0419,247.1826 -195.76526,219.9837 -38.73013,-15.7879 4.93336,-176.7045 54.49136,-285.9115 z"
+ id="path4257"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cscsc"
+ inkscape:export-xdpi="15.191093"
+ inkscape:export-ydpi="15.191093" />
+ <path
+ style="fill:#f57c00;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 713.64035,1156.0811 23.95231,78.8109 72.62957,139.0779 118.98884,69.5389 -1.5453,-78.0381 -40.9507,-101.9905 -65.67567,-100.4452 -27.04293,-32.4515 z"
+ id="path4261"
+ inkscape:connector-curvature="0"
+ inkscape:export-xdpi="15.191093"
+ inkscape:export-ydpi="15.191093" />
+ <path
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 719.04894,1169.2163 c 9.27185,21.6343 50.66928,211.7208 189.30053,231.7965 30.3325,4.3925 -14.6805,-140.6232 -105.85379,-251.8855 102.24809,93.7488 161.32989,298.1418 122.07959,299.7901 C 810.58,1453.7045 732.44164,1267.601 719.04894,1169.2163 Z"
+ id="path4255"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cscsc"
+ inkscape:export-xdpi="15.191093"
+ inkscape:export-ydpi="15.191093" />
+ <path
+ style="fill:#f57c00;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 234.13659,657.90289 -48.22924,-33.49254 -68.9946,-29.47343 -68.324762,2.00956 -31.48299,135.97969 54.2579,195.59632 92.028162,42.154 87.08057,10.8767 79.91784,5.717 49.77454,-1.1406 z"
+ id="path4265"
+ inkscape:connector-curvature="0"
+ inkscape:export-xdpi="15.191093"
+ inkscape:export-ydpi="15.191093"
+ sodipodi:nodetypes="ccccccccccc" />
+ <path
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.81825721px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 362.2228,973.50299 c -87.01468,18.7244 -206.31388,2.7914 -260.29527,-66.2183 C 40.854878,829.20969 44.412488,641.34522 72.212698,611.40084 98.152348,583.46053 206.19233,642.42569 258.48372,672.39141 226.33414,633.9643 97.758248,551.92129 22.266478,615.19423 c -39.234376,32.88402 -22.2634293,269.25766 24.02476,303.47066 82.593032,61.047 269.567992,98.25131 315.931562,54.8381 z"
+ id="path4263"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="csscssc"
+ inkscape:export-xdpi="15.191093"
+ inkscape:export-ydpi="15.191093" />
+ <path
+ inkscape:connector-curvature="0"
+ style="fill:#f57c00;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:10;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 705.09299,169.2159 c -15.02488,0.0627 -29.55297,0.81546 -43.06769,2.46948 -127.0389,18.06512 -274.41191,149.37803 -360.09102,278.72918 -88.19593,146.10416 -97.39583,306.48603 -33.97922,443.82493 51.67469,111.90981 209.30324,277.68941 437.75427,274.25121 103.34093,-1.5552 188.21293,-14.2523 282.05624,-41.2806 l 53.34803,-135.65461 7.6922,-153.845 -32.3069,-87.691 -68.46233,-87.69283 -22.3067,-99.22916 30.769,-200.76658 -28.3598,-161.94745 c -6.6814,-1.88509 -12.5089,-3.44563 -17.1054,-4.56753 -29.15558,-7.11615 -124.80661,-26.93763 -205.94068,-26.60004 z"
+ id="path4225-42-9"
+ inkscape:export-xdpi="15.191093"
+ inkscape:export-ydpi="15.191093" />
+ <path
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 447.07437,279.1177 -67.22098,67.22099 -37.8601,46.3593 180.02862,4.63593 96.58187,45.58664 70.31161,81.90143 47.13196,130.5787 -4.63593,166.8935 -88.85533,154.531 -78.03816,55.63111 16.99841,16.2258 81.12878,2.318 72.62957,-32.4515 L 807.90426,918.10339 837.26515,722.62168 810.99488,518.64075 734.50204,415.87764 630.96627,335.52152 535.9297,298.43408 Z"
+ id="path4247"
+ inkscape:connector-curvature="0"
+ inkscape:export-xdpi="15.191093"
+ inkscape:export-ydpi="15.191093" />
+ <path
+ style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:15;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 704.34544,1170.0033 C 474.87531,1173.4568 316.54426,1006.9366 264.63906,894.52759 200.93961,756.57613 210.17987,595.47873 298.76925,448.72283 384.83054,318.7946 532.86185,186.89663 660.46747,168.75089 c 86.87989,-10.63238 215.40898,15.76659 250.1179,24.23821 35.046,8.55388 138.10213,41.16536 192.58973,67.91907 53.5186,26.27792 164.698,69.05836 309.1218,196.39026 100.3317,88.4579 183.2875,109.9787 279.7545,106.6811 52.9405,-1.8098 148.8273,-10.5671 171.5302,-24.7287 679.9746,-424.15326 639.4516,799.03727 13.1124,405.39146 -158.3183,-74.1014 -440.1478,10.5521 -637.0436,91.78671 -223.8429,92.3524 -350.0163,130.7857 -535.30496,133.5743 z"
+ id="path4225-42"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ssccssssscss"
+ inkscape:export-xdpi="15.191093"
+ inkscape:export-ydpi="15.191093" />
+ <path
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 600.77485,188.39742 c 45.59931,-168.111187 93.61702,-207.521997 165.6011,-175.903587 28.11465,12.34913 88.59168,36.45928 110.93127,66.5789 46.81515,63.119057 81.36115,162.974077 99.35615,284.156557 -8.7416,75.03201 -41.5452,164.02089 -27.3175,238.20842 17.5559,91.54126 116.68213,142.15421 125.66043,234.93028 9.4985,98.1511 -22.9467,217.44721 -86.32323,293.93611 36.78763,-80.4955 64.77883,-202.86651 55.72773,-281.91641 -15.7564,-137.61237 -102.80503,-141.89728 -115.82623,-244.76458 -9.3046,-73.506 20.1158,-155.47823 24.0394,-229.46683 3.7424,-70.5705 -32.2949,-195.09979 -74.30353,-233.83762 C 781.36459,50.911903 652.78479,43.071673 600.77485,188.39742 Z"
+ id="path4405"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="csscsscssssc"
+ inkscape:export-xdpi="15.191093"
+ inkscape:export-ydpi="15.191093" />
+ <path
+ style="fill:#f57c00;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 978.84877,929.24739 143.14363,-41.5225 87.4159,-74.3036 5.4635,-186.85146 -73.2108,-30.5956 -65.562,22.9467 -77.58163,46.986 -87.416,87.416 z"
+ id="path4289"
+ inkscape:connector-curvature="0"
+ inkscape:export-xdpi="15.191093"
+ inkscape:export-ydpi="15.191093" />
+ <path
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 913.12497,751.04553 c 45.1649,-86.3232 245.53153,-195.3877 312.51203,-177.0172 29.651,8.1322 84.3992,143.4773 -29.5028,270.98936 -50.127,56.1165 -219.63263,88.5086 -219.63263,88.5086 l 2.1854,-6.5562 c 0,0 154.41873,-31.7084 192.31513,-91.7868 38.4759,-60.9969 52.9259,-177.98746 0,-216.35436 -79.3518,-57.5234 -257.87713,132.2166 -257.87713,132.2166 z"
+ id="path4287"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cssccssc"
+ inkscape:export-xdpi="15.191093"
+ inkscape:export-ydpi="15.191093" />
+ <path
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 330.40347,402.7425 c 114.35294,-10.55962 249.75787,-2.93669 319.87917,81.90143 79.96514,96.74795 96.08396,242.01494 62.58506,351.55806 -23.16188,75.7405 -98.38474,154.531 -163.80286,199.34501 60.19701,36.3696 76.03151,31.5859 158.39427,3.8632 C 761.64992,1021.17 829.49446,914.53909 837.26515,833.88399 848.77388,714.43039 855.97093,574.91586 790.90585,472.28145 719.85004,360.19719 579.71348,287.1018 454.02827,276.79974 l -13.13513,9.27185 c 166.63592,15.4531 280.2303,99.1189 342.28616,214.02545 65.19894,120.72647 36.96723,291.05045 30.9062,330.69635 -11.59484,75.8433 -39.28607,162.0595 -121.30683,197.02701 -32.03238,13.6562 -80.61368,27.043 -116.67091,8.4993 C 636.37485,988.41499 708.98856,931.86239 729.09345,855.51829 762.38235,729.11061 744.53737,534.45916 642.55609,446.01118 573.9429,386.50322 397.62445,372.60895 347.40188,381.10816 Z"
+ id="path4245"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="csscsssccssscsscc"
+ inkscape:export-xdpi="15.191093"
+ inkscape:export-ydpi="15.191093" />
+ <path
+ style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:10;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="path4249"
+ sodipodi:type="arc"
+ sodipodi:cx="592.71979"
+ sodipodi:cy="560.36414"
+ sodipodi:rx="41.337044"
+ sodipodi:ry="48.677265"
+ sodipodi:start="0"
+ sodipodi:end="6.2714218"
+ sodipodi:open="true"
+ d="m 634.05683,560.36414 a 41.337044,48.677265 0 0 1 -41.21548,48.67705 41.337044,48.677265 0 0 1 -41.45789,-48.39075 41.337044,48.677265 0 0 1 40.97163,-48.96167 41.337044,48.677265 0 0 1 41.69888,48.10276"
+ inkscape:export-xdpi="15.191093"
+ inkscape:export-ydpi="15.191093" />
+ <path
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:15;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 329.82495,822.87809 c 50.9573,98.8977 80.17049,31.9344 81.80769,19.0432 2.98204,-23.4803 -26.03926,-8.0283 -44.87764,-12.8177 -24.76611,-6.2965 -49.64587,-30.9043 -36.93005,-6.2255 z"
+ id="path4253"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ssss"
+ inkscape:export-xdpi="15.191093"
+ inkscape:export-ydpi="15.191093" />
+ <path
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:10;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 349.24366,1015.5476 c 24.85373,22.5357 29.23211,28.8458 48.29094,41.7233 13.9627,-4.7761 21.9738,-0.484 43.60813,-17.9975 -43.655,-2.9618 -58.6749,-15.7418 -91.89907,-23.7258 z"
+ id="path4339"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cccc"
+ inkscape:export-xdpi="15.191093"
+ inkscape:export-ydpi="15.191093" />
+ <path
+ style="fill:#000000;fill-opacity:0.11764706;fill-rule:evenodd;stroke:none;stroke-width:10;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 1840.2193,917.45789 c -144.4722,-64.5024 -401.6544,9.1852 -581.3301,79.8965 C 1054.6229,1077.7432 939.48447,1111.1985 770.40085,1113.6259 560.99961,1116.632 416.51658,971.68219 369.15085,873.83489 311.02239,753.75418 319.45382,613.52678 400.29538,485.78208 478.83,372.68518 613.91429,257.87398 730.35984,242.07898 c 12.38775,-1.4461 25.70459,-2.1055 39.47656,-2.1601 74.36866,-0.2952 162.04327,17.0358 188.76757,23.2578 31.981,7.4458 126.02373,35.8332 175.74613,59.1211 48.8379,22.8738 150.2931,60.1123 282.0859,170.9492 91.5569,76.9988 167.2589,95.7317 255.2891,92.8613 48.3104,-1.5753 135.8099,-9.1984 156.5274,-21.5254 l 39.4824,-26.4785 c -22.7029,14.1616 -118.5888,22.9187 -171.5293,24.7285 -96.467,3.2976 -179.4222,-18.2237 -279.7539,-106.6816 -144.4238,-127.3319 -255.6045,-170.1108 -309.1231,-196.3887 -54.4876,-26.7537 -157.54383,-59.3661 -192.58983,-67.9199 -29.28571,-7.148 -125.36331,-27.0578 -206.8594,-26.7188 -15.09187,0.063 -29.68283,0.8192 -43.25782,2.4805 -127.60562,18.1458 -275.63793,150.0445 -361.69921,279.9727 -88.58938,146.7559 -97.82836,307.8532 -34.12891,445.80461 51.9052,112.40901 210.23495,278.92821 439.70508,275.47471 185.28865,-2.7886 311.46379,-41.2219 535.30669,-133.5743 196.8958,-81.23461 478.7247,-165.88851 637.043,-91.78711 z"
+ id="path4225-42-3"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="csssccsssssccsssssccssscc"
+ inkscape:export-xdpi="15.191093"
+ inkscape:export-ydpi="15.191093" />
+ <path
+ style="fill:#000000;fill-opacity:0.11764706;fill-rule:evenodd;stroke:none;stroke-width:10;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 707.63885,164.4148 c -15.0918,0.063 -29.6848,0.8211 -43.2597,2.4824 -127.6056,18.1458 -275.6361,150.0425 -361.6973,279.9707 -88.5894,146.7559 -97.8304,307.8533 -34.1309,445.80469 51.9052,112.40901 210.237,278.93011 439.7071,275.47661 185.2887,-2.7886 311.46185,-41.2218 535.30475,-133.5742 195.3026,-80.57741 474.1694,-164.51701 633.1757,-93.55281 -7.0564,-4.019 -14.1914,-8.2481 -21.4101,-12.7011 -151.9427,-69.8031 -422.4225,9.9405 -611.3887,86.46281 -214.8282,86.9953 -335.92133,123.1994 -513.74805,125.8262 -220.2288,3.2531 -372.1832,-153.60771 -421.9981,-259.49611 -61.1341,-129.94919 -52.2658,-281.70249 32.7559,-419.94529 82.5954,-122.3913 224.6641,-246.6373 347.1308,-263.7305 83.381,-10.0156 206.734,14.8519 240.04502,22.8321 33.6347,8.0576 132.54073,38.7767 184.83393,63.9785 51.3632,24.7535 158.0664,65.0525 296.6738,184.998 96.2911,83.3266 175.9061,103.5985 268.4883,100.4922 50.8085,-1.7048 142.8325,-9.9528 164.6211,-23.2929 0.3844,-0.2354 0.7646,-0.4611 1.1485,-0.6954 -38.3016,9.244 -106.3509,14.9537 -147.9278,16.375 -96.467,3.2976 -179.4222,-18.2237 -279.7539,-106.6816 C 1271.7855,328.1122 1160.6067,285.3314 1107.0881,259.0535 1052.6005,232.2998 949.54427,199.6894 914.49827,191.1355 885.21265,183.9876 789.13495,164.0757 707.63885,164.4148 Z"
+ id="path4421"
+ inkscape:connector-curvature="0"
+ inkscape:export-xdpi="15.191093"
+ inkscape:export-ydpi="15.191093" />
+</svg>
diff --git a/build.gradle b/build.gradle
index 96acfc9ba..e49b94a4b 100644
--- a/build.gradle
+++ b/build.gradle
@@ -48,8 +48,8 @@ android {
defaultConfig {
minSdkVersion 14
targetSdkVersion 21
- versionCode 81
- versionName "1.6.0-beta2"
+ versionCode 82
+ versionName "1.6.0-beta3"
}
compileOptions {
diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml
index b0611f848..15d5bc255 100644
--- a/src/main/AndroidManifest.xml
+++ b/src/main/AndroidManifest.xml
@@ -132,7 +132,7 @@
</activity>
<activity
android:name=".ui.TrustKeysActivity"
- android:label="@string/trust_keys"
+ android:label="@string/trust_omemo_fingerprints"
android:windowSoftInputMode="stateAlwaysHidden"/>
<activity
android:name="de.duenndns.ssl.MemorizingActivity"
diff --git a/src/main/java/eu/siacs/conversations/Config.java b/src/main/java/eu/siacs/conversations/Config.java
index f0eb96832..a92b1024a 100644
--- a/src/main/java/eu/siacs/conversations/Config.java
+++ b/src/main/java/eu/siacs/conversations/Config.java
@@ -43,6 +43,8 @@ public final class Config {
public static final boolean ENCRYPT_ON_HTTP_UPLOADED = false;
+ public static final boolean REPORT_WRONG_FILESIZE_IN_OTR_JINGLE = true;
+
public static final boolean SHOW_REGENERATE_AXOLOTL_KEYS_BUTTON = false;
public static final long MILLISECONDS_IN_DAY = 24 * 60 * 60 * 1000;
diff --git a/src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java b/src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java
index 79e4654be..0d202bb92 100644
--- a/src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java
+++ b/src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java
@@ -2,10 +2,12 @@ package eu.siacs.conversations.http;
import android.content.Intent;
import android.net.Uri;
+import android.os.PowerManager;
import android.util.Log;
import java.io.BufferedInputStream;
import java.io.IOException;
+import java.io.InputStream;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
@@ -125,6 +127,17 @@ public class HttpDownloadConnection implements Transferable {
mXmppConnectionService.updateConversationUi();
}
+ private void showToastForException(Exception e) {
+ e.printStackTrace();
+ if (e instanceof java.net.UnknownHostException) {
+ mXmppConnectionService.showErrorToastInUi(R.string.download_failed_server_not_found);
+ } else if (e instanceof java.net.ConnectException) {
+ mXmppConnectionService.showErrorToastInUi(R.string.download_failed_could_not_connect);
+ } else {
+ mXmppConnectionService.showErrorToastInUi(R.string.download_failed_file_not_found);
+ }
+ }
+
private class FileSizeChecker implements Runnable {
private boolean interactive = false;
@@ -146,7 +159,7 @@ public class HttpDownloadConnection implements Transferable {
} catch (IOException e) {
Log.d(Config.LOGTAG, "io exception in http file size checker: " + e.getMessage());
if (interactive) {
- mXmppConnectionService.showErrorToastInUi(R.string.file_not_found_on_remote_host);
+ showToastForException(e);
}
cancel();
return;
@@ -163,20 +176,23 @@ public class HttpDownloadConnection implements Transferable {
}
private long retrieveFileSize() throws IOException {
- Log.d(Config.LOGTAG,"retrieve file size. interactive:"+String.valueOf(interactive));
- changeStatus(STATUS_CHECKING);
- HttpURLConnection connection = (HttpURLConnection) mUrl.openConnection();
- connection.setRequestMethod("HEAD");
- if (connection instanceof HttpsURLConnection) {
- mHttpConnectionManager.setupTrustManager((HttpsURLConnection) connection, interactive);
- }
- connection.connect();
- String contentLength = connection.getHeaderField("Content-Length");
- if (contentLength == null) {
- throw new IOException();
- }
try {
+ Log.d(Config.LOGTAG, "retrieve file size. interactive:" + String.valueOf(interactive));
+ changeStatus(STATUS_CHECKING);
+ HttpURLConnection connection = (HttpURLConnection) mUrl.openConnection();
+ connection.setRequestMethod("HEAD");
+ if (connection instanceof HttpsURLConnection) {
+ mHttpConnectionManager.setupTrustManager((HttpsURLConnection) connection, interactive);
+ }
+ connection.connect();
+ String contentLength = connection.getHeaderField("Content-Length");
+ connection.disconnect();
+ if (contentLength == null) {
+ throw new IOException();
+ }
return Long.parseLong(contentLength, 10);
+ } catch (IOException e) {
+ throw e;
} catch (NumberFormatException e) {
throw new IOException();
}
@@ -202,37 +218,46 @@ public class HttpDownloadConnection implements Transferable {
updateImageBounds();
finish();
} catch (SSLHandshakeException e) {
- FileBackend.close(os);
changeStatus(STATUS_OFFER);
} catch (IOException e) {
- FileBackend.close(os);
- mXmppConnectionService.showErrorToastInUi(R.string.file_not_found_on_remote_host);
+ if (interactive) {
+ showToastForException(e);
+ }
cancel();
}
}
- private void download() throws IOException {
- HttpURLConnection connection = (HttpURLConnection) mUrl.openConnection();
- if (connection instanceof HttpsURLConnection) {
- mHttpConnectionManager.setupTrustManager((HttpsURLConnection) connection, interactive);
- }
- connection.connect();
- BufferedInputStream is = new BufferedInputStream(connection.getInputStream());
- file.getParentFile().mkdirs();
- file.createNewFile();
- os = AbstractConnectionManager.createOutputStream(file,true);
- long transmitted = 0;
- long expected = file.getExpectedSize();
- int count = -1;
- byte[] buffer = new byte[1024];
- while ((count = is.read(buffer)) != -1) {
- transmitted += count;
- os.write(buffer, 0, count);
- updateProgress((int) ((((double) transmitted) / expected) * 100));
+ private void download() throws IOException {
+ InputStream is = null;
+ PowerManager.WakeLock wakeLock = mHttpConnectionManager.createWakeLock("http_download_"+message.getUuid());
+ try {
+ wakeLock.acquire();
+ HttpURLConnection connection = (HttpURLConnection) mUrl.openConnection();
+ if (connection instanceof HttpsURLConnection) {
+ mHttpConnectionManager.setupTrustManager((HttpsURLConnection) connection, interactive);
+ }
+ connection.connect();
+ is = new BufferedInputStream(connection.getInputStream());
+ file.getParentFile().mkdirs();
+ file.createNewFile();
+ os = AbstractConnectionManager.createOutputStream(file, true);
+ long transmitted = 0;
+ long expected = file.getExpectedSize();
+ int count = -1;
+ byte[] buffer = new byte[1024];
+ while ((count = is.read(buffer)) != -1) {
+ transmitted += count;
+ os.write(buffer, 0, count);
+ updateProgress((int) ((((double) transmitted) / expected) * 100));
+ }
+ os.flush();
+ } catch (IOException e) {
+ throw e;
+ } finally {
+ FileBackend.close(os);
+ FileBackend.close(is);
+ wakeLock.release();
}
- os.flush();
- os.close();
- is.close();
}
private void updateImageBounds() {
diff --git a/src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java b/src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java
index 768915a94..2e5458423 100644
--- a/src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java
+++ b/src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java
@@ -3,9 +3,11 @@ package eu.siacs.conversations.http;
import android.app.PendingIntent;
import android.content.Intent;
import android.net.Uri;
+import android.os.PowerManager;
import android.util.Log;
import android.util.Pair;
+import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@@ -103,7 +105,13 @@ public class HttpUploadConnection implements Transferable {
mXmppConnectionService.getRNG().nextBytes(this.key);
this.file.setKeyAndIv(this.key);
}
- Pair<InputStream,Integer> pair = AbstractConnectionManager.createInputStream(file,true);
+ Pair<InputStream,Integer> pair;
+ try {
+ pair = AbstractConnectionManager.createInputStream(file, true);
+ } catch (FileNotFoundException e) {
+ fail();
+ return;
+ }
this.file.setExpectedSize(pair.second);
this.mFileInputStream = pair.first;
Jid host = account.getXmppConnection().findDiscoItemByFeature(Xmlns.HTTP_UPLOAD);
@@ -143,7 +151,9 @@ public class HttpUploadConnection implements Transferable {
private void upload() {
OutputStream os = null;
HttpURLConnection connection = null;
+ PowerManager.WakeLock wakeLock = mHttpConnectionManager.createWakeLock("http_upload_"+message.getUuid());
try {
+ wakeLock.acquire();
Log.d(Config.LOGTAG, "uploading to " + mPutUrl.toString());
connection = (HttpURLConnection) mPutUrl.openConnection();
if (connection instanceof HttpsURLConnection) {
@@ -211,6 +221,7 @@ public class HttpUploadConnection implements Transferable {
if (connection != null) {
connection.disconnect();
}
+ wakeLock.release();
}
}
}
diff --git a/src/main/java/eu/siacs/conversations/persistance/FileBackend.java b/src/main/java/eu/siacs/conversations/persistance/FileBackend.java
index 3a8248f16..7fd5d88b8 100644
--- a/src/main/java/eu/siacs/conversations/persistance/FileBackend.java
+++ b/src/main/java/eu/siacs/conversations/persistance/FileBackend.java
@@ -39,6 +39,7 @@ import eu.siacs.conversations.entities.Transferable;
import eu.siacs.conversations.services.XmppConnectionService;
import eu.siacs.conversations.utils.CryptoHelper;
import eu.siacs.conversations.utils.ExifHelper;
+import eu.siacs.conversations.utils.FileUtils;
import eu.siacs.conversations.xmpp.pep.Avatar;
public class FileBackend {
@@ -126,25 +127,25 @@ public class FileBackend {
return Bitmap.createBitmap(bitmap, 0, 0, w, h, mtx, true);
}
- public String getOriginalPath(Uri uri) {
- String path = null;
- if (uri.getScheme().equals("file")) {
- return uri.getPath();
- } else if (uri.toString().startsWith("content://media/")) {
- String[] projection = {MediaStore.MediaColumns.DATA};
- Cursor metaCursor = mXmppConnectionService.getContentResolver().query(uri,
- projection, null, null, null);
- if (metaCursor != null) {
- try {
- if (metaCursor.moveToFirst()) {
- path = metaCursor.getString(0);
- }
- } finally {
- metaCursor.close();
- }
- }
+ public boolean useImageAsIs(Uri uri) {
+ String path = getOriginalPath(uri);
+ if (path == null) {
+ return false;
}
- return path;
+ Log.d(Config.LOGTAG,"using image as is. path: "+path);
+ BitmapFactory.Options options = new BitmapFactory.Options();
+ options.inJustDecodeBounds = true;
+ try {
+ BitmapFactory.decodeStream(mXmppConnectionService.getContentResolver().openInputStream(uri), null, options);
+ return (options.outWidth <= Config.IMAGE_SIZE && options.outHeight <= Config.IMAGE_SIZE && options.outMimeType.contains(Config.IMAGE_FORMAT.name().toLowerCase()));
+ } catch (FileNotFoundException e) {
+ return false;
+ }
+ }
+
+ public String getOriginalPath(Uri uri) {
+ Log.d(Config.LOGTAG,"get original path for uri: "+uri.toString());
+ return FileUtils.getPath(mXmppConnectionService,uri);
}
public DownloadableFile copyFileToPrivateStorage(Message message, Uri uri) throws FileCopyException {
diff --git a/src/main/java/eu/siacs/conversations/services/AbstractConnectionManager.java b/src/main/java/eu/siacs/conversations/services/AbstractConnectionManager.java
index b7e7c8d3a..5def05dd4 100644
--- a/src/main/java/eu/siacs/conversations/services/AbstractConnectionManager.java
+++ b/src/main/java/eu/siacs/conversations/services/AbstractConnectionManager.java
@@ -1,5 +1,7 @@
package eu.siacs.conversations.services;
+import android.content.Context;
+import android.os.PowerManager;
import android.util.Log;
import android.util.Pair;
@@ -49,17 +51,13 @@ public class AbstractConnectionManager {
}
}
- public static Pair<InputStream,Integer> createInputStream(DownloadableFile file, boolean gcm) {
+ public static Pair<InputStream,Integer> createInputStream(DownloadableFile file, boolean gcm) throws FileNotFoundException {
FileInputStream is;
int size;
- try {
- is = new FileInputStream(file);
- size = (int) file.getSize();
- if (file.getKey() == null) {
- return new Pair<InputStream,Integer>(is,size);
- }
- } catch (FileNotFoundException e) {
- return null;
+ is = new FileInputStream(file);
+ size = (int) file.getSize();
+ if (file.getKey() == null) {
+ return new Pair<InputStream,Integer>(is,size);
}
try {
if (gcm) {
@@ -72,7 +70,8 @@ public class AbstractConnectionManager {
Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
cipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(file.getKey(), "AES"), ips);
Log.d(Config.LOGTAG, "opening encrypted input stream");
- return new Pair<InputStream,Integer>(new CipherInputStream(is, cipher),(size / 16 + 1) * 16);
+ final int s = Config.REPORT_WRONG_FILESIZE_IN_OTR_JINGLE ? size : (size / 16 + 1) * 16;
+ return new Pair<InputStream,Integer>(new CipherInputStream(is, cipher),s);
}
} catch (InvalidKeyException e) {
return null;
@@ -117,4 +116,9 @@ public class AbstractConnectionManager {
return null;
}
}
+
+ public PowerManager.WakeLock createWakeLock(String name) {
+ PowerManager powerManager = (PowerManager) mXmppConnectionService.getSystemService(Context.POWER_SERVICE);
+ return powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,name);
+ }
}
diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
index ffe587d69..ed3bb8792 100644
--- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
@@ -404,8 +404,12 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
}
}
- public void attachImageToConversation(final Conversation conversation,
- final Uri uri, final UiCallback<Message> callback) {
+ public void attachImageToConversation(final Conversation conversation, final Uri uri, final UiCallback<Message> callback) {
+ if (getFileBackend().useImageAsIs(uri)) {
+ Log.d(Config.LOGTAG,"using image as is");
+ attachFileToConversation(conversation, uri, callback);
+ return;
+ }
final Message message;
if (conversation.getNextEncryption() == Message.ENCRYPTION_PGP) {
message = new Message(conversation, "", Message.ENCRYPTION_DECRYPTED);
@@ -855,7 +859,7 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
} else {
Log.d(Config.LOGTAG, account.getJid().toBareJid() + ": fetching roster");
}
- iqPacket.query(Xmlns.ROSTER).setAttribute("ver",account.getRosterVersion());
+ iqPacket.query(Xmlns.ROSTER).setAttribute("ver", account.getRosterVersion());
sendIqPacket(account,iqPacket,mIqParser);
}
@@ -1000,6 +1004,10 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
public void onMessageFound(Message message) {
if (!getFileBackend().isFileAvailable(message)) {
message.setTransferable(new TransferablePlaceholder(Transferable.STATUS_DELETED));
+ final int s = message.getStatus();
+ if(s == Message.STATUS_WAITING || s == Message.STATUS_OFFERED || s == Message.STATUS_UNSEND) {
+ markMessage(message,Message.STATUS_SEND_FAILED);
+ }
}
}
});
@@ -1011,7 +1019,12 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
if (message != null) {
if (!getFileBackend().isFileAvailable(message)) {
message.setTransferable(new TransferablePlaceholder(Transferable.STATUS_DELETED));
- updateConversationUi();
+ final int s = message.getStatus();
+ if(s == Message.STATUS_WAITING || s == Message.STATUS_OFFERED || s == Message.STATUS_UNSEND) {
+ markMessage(message,Message.STATUS_SEND_FAILED);
+ } else {
+ updateConversationUi();
+ }
}
return;
}
diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
index 79cb006d1..49878463b 100644
--- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
+++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
@@ -333,7 +333,7 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
mEditMessage.setHint(getString(R.string.send_otr_message));
break;
case Message.ENCRYPTION_AXOLOTL:
- mEditMessage.setHint(getString(R.string.send_axolotl_message));
+ mEditMessage.setHint(getString(R.string.send_omemo_message));
break;
case Message.ENCRYPTION_PGP:
mEditMessage.setHint(getString(R.string.send_pgp_message));
diff --git a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java
index 7536ea753..f861e73df 100644
--- a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java
@@ -577,10 +577,10 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate
@Override
public void onClick(final View v) {
- if (copyTextToClipboard(axolotlFingerprint, R.string.axolotl_fingerprint)) {
+ if (copyTextToClipboard(axolotlFingerprint, R.string.omemo_fingerprint)) {
Toast.makeText(
EditAccountActivity.this,
- R.string.toast_message_axolotl_fingerprint,
+ R.string.toast_message_omemo_fingerprint,
Toast.LENGTH_SHORT).show();
}
}
diff --git a/src/main/java/eu/siacs/conversations/ui/TrustKeysActivity.java b/src/main/java/eu/siacs/conversations/ui/TrustKeysActivity.java
index c55518579..cf22416fb 100644
--- a/src/main/java/eu/siacs/conversations/ui/TrustKeysActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/TrustKeysActivity.java
@@ -111,7 +111,7 @@ public class TrustKeysActivity extends XmppActivity implements OnKeyStatusUpdate
}
private void populateView() {
- setTitle(getString(R.string.trust_keys));
+ setTitle(getString(R.string.trust_omemo_fingerprints));
ownKeys.removeAllViews();
foreignKeys.removeAllViews();
boolean hasOwnKeys = false;
diff --git a/src/main/java/eu/siacs/conversations/ui/XmppActivity.java b/src/main/java/eu/siacs/conversations/ui/XmppActivity.java
index 3a163ba45..7734dc116 100644
--- a/src/main/java/eu/siacs/conversations/ui/XmppActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/XmppActivity.java
@@ -696,15 +696,15 @@ public abstract class XmppActivity extends Activity {
}
if (showTag) {
- keyType.setText(getString(R.string.axolotl_fingerprint));
+ keyType.setText(getString(R.string.omemo_fingerprint));
} else {
keyType.setVisibility(View.GONE);
}
if (highlight) {
keyType.setTextColor(getResources().getColor(R.color.accent));
- keyType.setText(getString(R.string.axolotl_fingerprint_selected_message));
+ keyType.setText(getString(R.string.omemo_fingerprint_selected_message));
} else {
- keyType.setText(getString(R.string.axolotl_fingerprint));
+ keyType.setText(getString(R.string.omemo_fingerprint));
}
key.setText(CryptoHelper.prettifyFingerprint(identityKey.getFingerprint()));
diff --git a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java
index 7b4abe48c..323c67d6b 100644
--- a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java
+++ b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java
@@ -303,8 +303,7 @@ public class MessageAdapter extends ArrayAdapter<Message> {
}
final Spannable span = new SpannableString(privateMarker + " "
+ formattedBody);
- span.setSpan(new ForegroundColorSpan(activity
- .getSecondaryTextColor()), 0, privateMarker
+ span.setSpan(new ForegroundColorSpan(getMessageTextColor(type,false)), 0, privateMarker
.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
span.setSpan(new StyleSpan(Typeface.BOLD), 0,
privateMarker.length(),
@@ -396,10 +395,7 @@ public class MessageAdapter extends ArrayAdapter<Message> {
@Override
public void onClick(View v) {
- Intent intent = new Intent(Intent.ACTION_VIEW);
- intent.setDataAndType(activity.xmppConnectionService
- .getFileBackend().getJingleFileUri(message), "image/*");
- getContext().startActivity(intent);
+ openDownloadable(message);
}
});
viewHolder.image.setOnLongClickListener(openContextMenu);
diff --git a/src/main/java/eu/siacs/conversations/utils/FileUtils.java b/src/main/java/eu/siacs/conversations/utils/FileUtils.java
new file mode 100644
index 000000000..a13300d43
--- /dev/null
+++ b/src/main/java/eu/siacs/conversations/utils/FileUtils.java
@@ -0,0 +1,144 @@
+package eu.siacs.conversations.utils;
+
+import android.annotation.SuppressLint;
+import android.content.ContentUris;
+import android.content.Context;
+import android.database.Cursor;
+import android.net.Uri;
+import android.os.Build;
+import android.os.Environment;
+import android.provider.DocumentsContract;
+import android.provider.MediaStore;
+
+public class FileUtils {
+
+ /**
+ * Get a file path from a Uri. This will get the the path for Storage Access
+ * Framework Documents, as well as the _data field for the MediaStore and
+ * other file-based ContentProviders.
+ *
+ * @param context The context.
+ * @param uri The Uri to query.
+ * @author paulburke
+ */
+ @SuppressLint("NewApi")
+ public static String getPath(final Context context, final Uri uri) {
+
+ final boolean isKitKat = Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT;
+
+ // DocumentProvider
+ if (isKitKat && DocumentsContract.isDocumentUri(context, uri)) {
+ // ExternalStorageProvider
+ if (isExternalStorageDocument(uri)) {
+ final String docId = DocumentsContract.getDocumentId(uri);
+ final String[] split = docId.split(":");
+ final String type = split[0];
+
+ if ("primary".equalsIgnoreCase(type)) {
+ return Environment.getExternalStorageDirectory() + "/" + split[1];
+ }
+
+ // TODO handle non-primary volumes
+ }
+ // DownloadsProvider
+ else if (isDownloadsDocument(uri)) {
+
+ final String id = DocumentsContract.getDocumentId(uri);
+ final Uri contentUri = ContentUris.withAppendedId(
+ Uri.parse("content://downloads/public_downloads"), Long.valueOf(id));
+
+ return getDataColumn(context, contentUri, null, null);
+ }
+ // MediaProvider
+ else if (isMediaDocument(uri)) {
+ final String docId = DocumentsContract.getDocumentId(uri);
+ final String[] split = docId.split(":");
+ final String type = split[0];
+
+ Uri contentUri = null;
+ if ("image".equals(type)) {
+ contentUri = MediaStore.Images.Media.EXTERNAL_CONTENT_URI;
+ } else if ("video".equals(type)) {
+ contentUri = MediaStore.Video.Media.EXTERNAL_CONTENT_URI;
+ } else if ("audio".equals(type)) {
+ contentUri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;
+ }
+
+ final String selection = "_id=?";
+ final String[] selectionArgs = new String[]{
+ split[1]
+ };
+
+ return getDataColumn(context, contentUri, selection, selectionArgs);
+ }
+ }
+ // MediaStore (and general)
+ else if ("content".equalsIgnoreCase(uri.getScheme())) {
+ return getDataColumn(context, uri, null, null);
+ }
+ // File
+ else if ("file".equalsIgnoreCase(uri.getScheme())) {
+ return uri.getPath();
+ }
+
+ return null;
+ }
+
+ /**
+ * Get the value of the data column for this Uri. This is useful for
+ * MediaStore Uris, and other file-based ContentProviders.
+ *
+ * @param context The context.
+ * @param uri The Uri to query.
+ * @param selection (Optional) Filter used in the query.
+ * @param selectionArgs (Optional) Selection arguments used in the query.
+ * @return The value of the _data column, which is typically a file path.
+ */
+ public static String getDataColumn(Context context, Uri uri, String selection,
+ String[] selectionArgs) {
+
+ Cursor cursor = null;
+ final String column = "_data";
+ final String[] projection = {
+ column
+ };
+
+ try {
+ cursor = context.getContentResolver().query(uri, projection, selection, selectionArgs,
+ null);
+ if (cursor != null && cursor.moveToFirst()) {
+ final int column_index = cursor.getColumnIndexOrThrow(column);
+ return cursor.getString(column_index);
+ }
+ } finally {
+ if (cursor != null)
+ cursor.close();
+ }
+ return null;
+ }
+
+
+ /**
+ * @param uri The Uri to check.
+ * @return Whether the Uri authority is ExternalStorageProvider.
+ */
+ public static boolean isExternalStorageDocument(Uri uri) {
+ return "com.android.externalstorage.documents".equals(uri.getAuthority());
+ }
+
+ /**
+ * @param uri The Uri to check.
+ * @return Whether the Uri authority is DownloadsProvider.
+ */
+ public static boolean isDownloadsDocument(Uri uri) {
+ return "com.android.providers.downloads.documents".equals(uri.getAuthority());
+ }
+
+ /**
+ * @param uri The Uri to check.
+ * @return Whether the Uri authority is MediaProvider.
+ */
+ public static boolean isMediaDocument(Uri uri) {
+ return "com.android.providers.media.documents".equals(uri.getAuthority());
+ }
+}
diff --git a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java
index bf89ba816..5ac089766 100644
--- a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java
+++ b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java
@@ -81,7 +81,6 @@ public class XmppConnection implements Runnable {
private static final int PACKET_IQ = 0;
private static final int PACKET_MESSAGE = 1;
private static final int PACKET_PRESENCE = 2;
- private final Context applicationContext;
protected Account account;
private final WakeLock wakeLock;
private Socket socket;
@@ -123,7 +122,6 @@ public class XmppConnection implements Runnable {
PowerManager.PARTIAL_WAKE_LOCK, account.getJid().toBareJid().toString());
tagWriter = new TagWriter();
mXmppConnectionService = service;
- applicationContext = service.getApplicationContext();
}
protected void changeStatus(final Account.State nextStatus) {
@@ -531,14 +529,6 @@ public class XmppConnection implements Runnable {
tagWriter.writeTag(startTLS);
}
- private SharedPreferences getPreferences() {
- return PreferenceManager.getDefaultSharedPreferences(applicationContext);
- }
-
- private boolean enableLegacySSL() {
- return getPreferences().getBoolean("enable_legacy_ssl", false);
- }
-
private void switchOverToTls(final Tag currentTag) throws XmlPullParserException, IOException {
tagReader.readTag();
try {
diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java
index e9ca66b7c..7b140842a 100644
--- a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java
+++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java
@@ -5,6 +5,7 @@ import android.net.Uri;
import android.util.Log;
import android.util.Pair;
+import java.io.FileNotFoundException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
@@ -28,7 +29,6 @@ import eu.siacs.conversations.entities.TransferablePlaceholder;
import eu.siacs.conversations.persistance.FileBackend;
import eu.siacs.conversations.services.AbstractConnectionManager;
import eu.siacs.conversations.services.XmppConnectionService;
-import eu.siacs.conversations.utils.Xmlns;
import eu.siacs.conversations.xml.Element;
import eu.siacs.conversations.xmpp.OnIqPacketReceived;
import eu.siacs.conversations.xmpp.jid.Jid;
@@ -97,15 +97,13 @@ public class JingleConnection implements Transferable {
public void onFileTransmitted(DownloadableFile file) {
if (responder.equals(account.getJid())) {
sendSuccess();
+ mXmppConnectionService.getFileBackend().updateFileParams(message);
+ mXmppConnectionService.databaseBackend.createMessage(message);
+ mXmppConnectionService.markMessage(message,Message.STATUS_RECEIVED);
if (acceptedAutomatically) {
message.markUnread();
- JingleConnection.this.mXmppConnectionService
- .getNotificationService().push(message);
+ JingleConnection.this.mXmppConnectionService.getNotificationService().push(message);
}
- mXmppConnectionService.getFileBackend().updateFileParams(message);
- mXmppConnectionService.databaseBackend.createMessage(message);
- mXmppConnectionService.markMessage(message,
- Message.STATUS_RECEIVED);
} else {
if (message.getEncryption() == Message.ENCRYPTION_PGP || message.getEncryption() == Message.ENCRYPTION_DECRYPTED) {
file.delete();
@@ -274,7 +272,7 @@ public class JingleConnection implements Transferable {
});
mergeCandidate(candidate);
} else {
- Log.d(Config.LOGTAG,"no primary candidate of our own was found");
+ Log.d(Config.LOGTAG, "no primary candidate of our own was found");
sendInitRequest();
}
}
@@ -393,7 +391,11 @@ public class JingleConnection implements Transferable {
}
}
this.mFileOutputStream = AbstractConnectionManager.createOutputStream(this.file,message.getEncryption() == Message.ENCRYPTION_AXOLOTL);
- this.file.setExpectedSize(size);
+ if (message.getEncryption() == Message.ENCRYPTION_OTR && Config.REPORT_WRONG_FILESIZE_IN_OTR_JINGLE) {
+ this.file.setExpectedSize((size / 16 + 1) * 16);
+ } else {
+ this.file.setExpectedSize(size);
+ }
Log.d(Config.LOGTAG, "receiving file: expecting size of " + this.file.getExpectedSize());
} else {
this.sendCancel();
@@ -412,26 +414,31 @@ public class JingleConnection implements Transferable {
content.setTransportId(this.transportId);
this.file = this.mXmppConnectionService.getFileBackend().getFile(message, false);
Pair<InputStream,Integer> pair;
- if (message.getEncryption() == Message.ENCRYPTION_OTR) {
- Conversation conversation = this.message.getConversation();
- if (!this.mXmppConnectionService.renewSymmetricKey(conversation)) {
- Log.d(Config.LOGTAG,account.getJid().toBareJid()+": could not set symmetric key");
- cancel();
+ try {
+ if (message.getEncryption() == Message.ENCRYPTION_OTR) {
+ Conversation conversation = this.message.getConversation();
+ if (!this.mXmppConnectionService.renewSymmetricKey(conversation)) {
+ Log.d(Config.LOGTAG, account.getJid().toBareJid() + ": could not set symmetric key");
+ cancel();
+ }
+ this.file.setKeyAndIv(conversation.getSymmetricKey());
+ pair = AbstractConnectionManager.createInputStream(this.file, false);
+ this.file.setExpectedSize(pair.second);
+ content.setFileOffer(this.file, true);
+ } else if (message.getEncryption() == Message.ENCRYPTION_AXOLOTL) {
+ this.file.setKey(mXmppAxolotlMessage.getInnerKey());
+ this.file.setIv(mXmppAxolotlMessage.getIV());
+ pair = AbstractConnectionManager.createInputStream(this.file, true);
+ this.file.setExpectedSize(pair.second);
+ content.setFileOffer(this.file, false).addChild(mXmppAxolotlMessage.toElement());
+ } else {
+ pair = AbstractConnectionManager.createInputStream(this.file, false);
+ this.file.setExpectedSize(pair.second);
+ content.setFileOffer(this.file, false);
}
- this.file.setKeyAndIv(conversation.getSymmetricKey());
- pair = AbstractConnectionManager.createInputStream(this.file,false);
- this.file.setExpectedSize(pair.second);
- content.setFileOffer(this.file, true);
- } else if (message.getEncryption() == Message.ENCRYPTION_AXOLOTL) {
- this.file.setKey(mXmppAxolotlMessage.getInnerKey());
- this.file.setIv(mXmppAxolotlMessage.getIV());
- pair = AbstractConnectionManager.createInputStream(this.file,true);
- this.file.setExpectedSize(pair.second);
- content.setFileOffer(this.file, false).addChild(mXmppAxolotlMessage.toElement());
- } else {
- pair = AbstractConnectionManager.createInputStream(this.file,false);
- this.file.setExpectedSize(pair.second);
- content.setFileOffer(this.file, false);
+ } catch (FileNotFoundException e) {
+ cancel();
+ return;
}
this.mFileInputStream = pair.first;
this.transportId = this.mJingleConnectionManager.nextRandomId();
@@ -1012,4 +1019,8 @@ public class JingleConnection implements Transferable {
public int getProgress() {
return this.mProgress;
}
+
+ public AbstractConnectionManager getConnectionManager() {
+ return this.mJingleConnectionManager;
+ }
}
diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleSocks5Transport.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleSocks5Transport.java
index 7545dd646..556395aef 100644
--- a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleSocks5Transport.java
+++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleSocks5Transport.java
@@ -1,5 +1,6 @@
package eu.siacs.conversations.xmpp.jingle;
+import android.os.PowerManager;
import android.util.Log;
import java.io.FileNotFoundException;
@@ -96,14 +97,15 @@ public class JingleSocks5Transport extends JingleTransport {
}
- public void send(final DownloadableFile file,
- final OnFileTransmissionStatusChanged callback) {
+ public void send(final DownloadableFile file, final OnFileTransmissionStatusChanged callback) {
new Thread(new Runnable() {
@Override
public void run() {
InputStream fileInputStream = null;
+ final PowerManager.WakeLock wakeLock = connection.getConnectionManager().createWakeLock("jingle_send_"+connection.getSessionId());
try {
+ wakeLock.acquire();
MessageDigest digest = MessageDigest.getInstance("SHA-1");
digest.reset();
fileInputStream = connection.getFileInputStream();
@@ -138,6 +140,7 @@ public class JingleSocks5Transport extends JingleTransport {
callback.onFileTransferAborted();
} finally {
FileBackend.close(fileInputStream);
+ wakeLock.release();
}
}
}).start();
@@ -150,7 +153,9 @@ public class JingleSocks5Transport extends JingleTransport {
@Override
public void run() {
OutputStream fileOutputStream = null;
+ final PowerManager.WakeLock wakeLock = connection.getConnectionManager().createWakeLock("jingle_receive_"+connection.getSessionId());
try {
+ wakeLock.acquire();
MessageDigest digest = MessageDigest.getInstance("SHA-1");
digest.reset();
inputStream.skip(45);
@@ -166,7 +171,7 @@ public class JingleSocks5Transport extends JingleTransport {
double size = file.getExpectedSize();
long remainingSize = file.getExpectedSize();
byte[] buffer = new byte[8192];
- int count = buffer.length;
+ int count;
while (remainingSize > 0) {
count = inputStream.read(buffer);
if (count == -1) {
@@ -194,7 +199,9 @@ public class JingleSocks5Transport extends JingleTransport {
Log.d(Config.LOGTAG, connection.getAccount().getJid().toBareJid() + ": "+e.getMessage());
callback.onFileTransferAborted();
} finally {
+ wakeLock.release();
FileBackend.close(fileOutputStream);
+ FileBackend.close(inputStream);
}
}
}).start();
@@ -209,27 +216,9 @@ public class JingleSocks5Transport extends JingleTransport {
}
public void disconnect() {
- if (this.outputStream != null) {
- try {
- this.outputStream.close();
- } catch (IOException e) {
-
- }
- }
- if (this.inputStream != null) {
- try {
- this.inputStream.close();
- } catch (IOException e) {
-
- }
- }
- if (this.socket != null) {
- try {
- this.socket.close();
- } catch (IOException e) {
-
- }
- }
+ FileBackend.close(inputStream);
+ FileBackend.close(outputStream);
+ FileBackend.close(socket);
}
public boolean isEstablished() {
diff --git a/src/main/res/layout/activity_edit_account.xml b/src/main/res/layout/activity_edit_account.xml
index 581614c76..4599b3a2f 100644
--- a/src/main/res/layout/activity_edit_account.xml
+++ b/src/main/res/layout/activity_edit_account.xml
@@ -380,7 +380,7 @@
android:layout_height="wrap_content"
android:textColor="@color/black54"
android:textSize="?attr/TextSizeInfo"
- android:text="@string/this_device_axolotl_fingerprint"/>
+ android:text="@string/this_device_omemo_fingerprint"/>
</LinearLayout>
<LinearLayout
@@ -399,16 +399,16 @@
android:padding="@dimen/image_button_padding"
android:src="?attr/icon_copy"
android:visibility="visible"
- android:contentDescription="@string/copy_axolotl_clipboard_description"/>
+ android:contentDescription="@string/copy_omemo_clipboard_description"/>
<ImageButton
- android:id="@+id/action_regenerate_axolotl_key"
+ android:id="@+id/action_regenerate_omemo_key"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?android:selectableItemBackground"
android:padding="@dimen/image_button_padding"
android:src="?attr/icon_refresh"
android:visibility="gone"
- android:contentDescription="@string/regenerate_axolotl_key"/>
+ android:contentDescription="@string/regenerate_omemo_key"/>
</LinearLayout>
</RelativeLayout>
@@ -484,4 +484,4 @@
android:textColor="@color/black54" />
</LinearLayout>
-</RelativeLayout> \ No newline at end of file
+</RelativeLayout>
diff --git a/src/main/res/layout/contact_key.xml b/src/main/res/layout/contact_key.xml
index 0f61a15f1..a4fd29e97 100644
--- a/src/main/res/layout/contact_key.xml
+++ b/src/main/res/layout/contact_key.xml
@@ -8,7 +8,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
- android:padding="8dp" >
+ android:paddingTop="8dp"
+ android:paddingLeft="8dp"
+ android:paddingBottom="8dp">
<TextView
android:id="@+id/key"
diff --git a/src/main/res/menu/encryption_choices.xml b/src/main/res/menu/encryption_choices.xml
index 1b3fe76ef..9af2cd346 100644
--- a/src/main/res/menu/encryption_choices.xml
+++ b/src/main/res/menu/encryption_choices.xml
@@ -6,14 +6,14 @@
android:id="@+id/encryption_choice_none"
android:title="@string/encryption_choice_none"/>
<item
+ android:id="@+id/encryption_choice_axolotl"
+ android:title="@string/encryption_choice_omemo"/>
+ <item
android:id="@+id/encryption_choice_otr"
android:title="@string/encryption_choice_otr"/>
<item
android:id="@+id/encryption_choice_pgp"
android:title="@string/encryption_choice_pgp"/>
- <item
- android:id="@+id/encryption_choice_axolotl"
- android:title="@string/encryption_choice_axolotl"/>
</group>
</menu> \ No newline at end of file
diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml
index 0c7557e4f..b01c62177 100644
--- a/src/main/res/values/strings.xml
+++ b/src/main/res/values/strings.xml
@@ -80,7 +80,7 @@
<string name="choose_presence">Choose presence to contact</string>
<string name="send_plain_text_message">Send plain text message</string>
<string name="send_otr_message">Send OTR encrypted message</string>
- <string name="send_axolotl_message">Send Multi-End encrypted message</string>
+ <string name="send_omemo_message">Send OMEMO encrypted message</string>
<string name="send_pgp_message">Send OpenPGP encrypted message</string>
<string name="your_nick_has_been_changed">Your nickname has been changed</string>
<string name="send_unencrypted">Send unencrypted</string>
@@ -155,7 +155,7 @@
<string name="encryption_choice_none">Plain text</string>
<string name="encryption_choice_otr">OTR</string>
<string name="encryption_choice_pgp">OpenPGP</string>
- <string name="encryption_choice_axolotl">Multi-End</string>
+ <string name="encryption_choice_omemo">OMEMO</string>
<string name="mgmt_account_edit">Edit account</string>
<string name="mgmt_account_delete">Delete account</string>
<string name="mgmt_account_disable">Temporarily disable</string>
@@ -208,14 +208,13 @@
<string name="reception_failed">Reception failed</string>
<string name="your_fingerprint">Your fingerprint</string>
<string name="otr_fingerprint">OTR fingerprint</string>
- <string name="axolotl_fingerprint">Multi-End fingerprint</string>
- <string name="axolotl_fingerprint_selected_message">Multi-End fingerprint of message</string>
- <string name="this_device_axolotl_fingerprint">Own Multi-End fingerprint</string>
+ <string name="omemo_fingerprint">OMEMO fingerprint</string>
+ <string name="omemo_fingerprint_selected_message">OMEMO fingerprint of message</string>
+ <string name="this_device_omemo_fingerprint">Own OMEMO fingerprint</string>
<string name="other_devices">Other devices</string>
- <string name="trust_keys">Trust Multi-End Keys</string>
+ <string name="trust_omemo_fingerprints">Trust OMEMO Fingerprints</string>
<string name="fetching_keys">Fetching keys...</string>
<string name="done">Done</string>
- <string name="axolotl_devicelist">Other own Multi-End Devices</string>
<string name="verify">Verify</string>
<string name="decrypt">Decrypt</string>
<string name="conferences">Conferences</string>
@@ -322,7 +321,7 @@
<string name="pref_conference_name">Conference name</string>
<string name="pref_conference_name_summary">Use room’s subject instead of JID to identify conferences</string>
<string name="toast_message_otr_fingerprint">OTR fingerprint copied to clipboard!</string>
- <string name="toast_message_axolotl_fingerprint">Multi-End fingerprint copied to clipboard!</string>
+ <string name="toast_message_omemo_fingerprint">OMEMO fingerprint copied to clipboard!</string>
<string name="conference_banned">You are banned from this conference</string>
<string name="conference_members_only">This conference is members only</string>
<string name="conference_kicked">You have been kicked from this conference</string>
@@ -389,11 +388,11 @@
<string name="reset">Reset</string>
<string name="account_image_description">Account avatar</string>
<string name="copy_otr_clipboard_description">Copy OTR fingerprint to clipboard</string>
- <string name="copy_axolotl_clipboard_description">Copy Multi-End fingerprint to clipboard</string>
- <string name="regenerate_axolotl_key">Copy Axolotl fingerprint to clipboard</string>
- <string name="wipe_axolotl_pep">Wipe other devices from PEP</string>
+ <string name="copy_omemo_clipboard_description">Copy OMEMO fingerprint to clipboard</string>
+ <string name="regenerate_omemo_key">Regenerate OMEMO key</string>
+ <string name="wipe_omemo_pep">Wipe other devices from PEP</string>
<string name="clear_other_devices">Clear devices</string>
- <string name="clear_other_devices_desc">Are you sure you want to clear all other devices from the Multi-End announcement? The next time your devices connect, they will reannounce themselves, but they might not receive messages sent in the meantime.</string>
+ <string name="clear_other_devices_desc">Are you sure you want to clear all other devices from the OMEMO announcement? The next time your devices connect, they will reannounce themselves, but they might not receive messages sent in the meantime.</string>
<string name="purge_key">Purge key</string>
<string name="purge_key_desc_part1">Are you sure you want to purge this key?</string>
<string name="purge_key_desc_part2">It will irreversibly be considered compromised, and you can never build a session with it again.</string>
@@ -495,7 +494,6 @@
<string name="none">None</string>
<string name="recently_used">Most recently used</string>
<string name="choose_quick_action">Choose quick action</string>
- <string name="file_not_found_on_remote_host">File not found on remote server</string>
<string name="search_for_contacts_or_groups">Search for contacts or groups</string>
<string name="send_private_message">Send private message</string>
<string name="user_has_left_conference">%s has left the conference!</string>
@@ -503,4 +501,7 @@
<string name="username">Username</string>
<string name="username_hint">Username</string>
<string name="invalid_username">This is not a valid username</string>
+ <string name="download_failed_server_not_found">Download failed: Server not found</string>
+ <string name="download_failed_file_not_found">Download failed: File not found</string>
+ <string name="download_failed_could_not_connect">Download failed: Could not connect to host</string>
</resources>