Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3cef68fab1 | ||
|
|
2ac1b83896 | ||
|
|
2adf648391 | ||
|
|
b4a85463b3 | ||
|
|
0c252ee628 | ||
|
|
a28ffbcb04 | ||
|
|
e1201af5da | ||
|
|
3191d52845 | ||
|
|
39c63d5402 | ||
|
|
a70028f6ff | ||
|
|
28b86fea57 | ||
|
|
9ca37d4de6 | ||
|
|
58832b176d | ||
|
|
8f80f7ce57 | ||
|
|
abf952c919 | ||
|
|
6a71cac2a2 | ||
|
|
bd897d856c | ||
|
|
393874eab6 | ||
|
|
da5f6ef7e1 | ||
|
|
e5bbb7101c | ||
|
|
c7d605c9d7 | ||
|
|
fba917684c | ||
|
|
0dcf16c362 | ||
|
|
6763093efd | ||
|
|
28e7caedda | ||
|
|
d8cf4f8464 | ||
|
|
8724aa8ca2 | ||
|
|
d7923e4808 | ||
|
|
aa06d482f4 | ||
|
|
19bc97c748 | ||
|
|
4f6062d634 | ||
|
|
4c12656aef | ||
|
|
20691aec12 | ||
|
|
486cafea32 | ||
|
|
912ab03f95 | ||
|
|
ebe0078618 | ||
|
|
b0d7798f44 | ||
|
|
0459dabbe5 | ||
|
|
941c55e827 | ||
|
|
7ea3c81b9a | ||
|
|
2472fa28ab | ||
|
|
f24981f70f | ||
|
|
2d656768c2 | ||
|
|
02541fb15c | ||
|
|
bf2d7904b3 | ||
|
|
5c7a9ead2d | ||
|
|
6640923b34 | ||
|
|
3b9bc59ec6 | ||
|
|
f7ec2264c5 | ||
|
|
732a65ca09 | ||
|
|
237c3f48cb | ||
|
|
85745e05fd | ||
|
|
a6d3eb42ba | ||
|
|
120a98c145 | ||
|
|
76fa26bf71 | ||
|
|
1488aa2463 | ||
|
|
7dd2ef968f | ||
|
|
768223ba59 | ||
|
|
81ec210030 | ||
|
|
b3b656a02b | ||
|
|
465d7e65c5 | ||
|
|
7fbdaaaf42 | ||
|
|
59f94d441b | ||
|
|
ead643153d | ||
|
|
9649a23e7c | ||
|
|
088b99881c | ||
|
|
20223b6e39 | ||
|
|
14f7e27775 | ||
|
|
f7d7cc282b | ||
|
|
9e0e7646c9 | ||
|
|
9569b494c4 | ||
|
|
252d14d758 | ||
|
|
37d458f13c | ||
|
|
11e7657308 | ||
|
|
e73f0de06a | ||
|
|
67a1d0ab39 | ||
|
|
2c97fdbc5b | ||
|
|
8e769f3dee | ||
|
|
db9faef791 | ||
|
|
d3a0a22054 | ||
|
|
d7bbbeb8d0 | ||
|
|
74d3d0e861 | ||
|
|
62ff71c7d7 | ||
|
|
b485a43124 | ||
|
|
d0772cebda | ||
|
|
852948c392 | ||
|
|
68451f9158 | ||
|
|
89a25330c5 | ||
|
|
33a2d9bf58 | ||
|
|
d2b8d547f2 | ||
|
|
95baebb266 | ||
|
|
7af7d35764 | ||
|
|
807f6cd685 | ||
|
|
485b35d57f | ||
|
|
0520619991 | ||
|
|
55035433c2 | ||
|
|
f846cd6ba5 | ||
|
|
e5c6f628e9 | ||
|
|
df60247703 | ||
|
|
5d4b919126 | ||
|
|
7f7775e171 | ||
|
|
96732fa4a5 | ||
|
|
8285c9bafa | ||
|
|
a1ea1a3dcc | ||
|
|
7fb8c6fe8a | ||
|
|
0174e42ac8 | ||
|
|
7d9ffe1110 | ||
|
|
ff0115e139 | ||
|
|
9b3b03cb75 | ||
|
|
6850dd96e0 | ||
|
|
e69ca41338 | ||
|
|
f820ca6b38 | ||
|
|
7d7831ca5b | ||
|
|
aab09bafe0 | ||
|
|
864b859a44 | ||
|
|
5274f77d6a | ||
|
|
585a92f88f | ||
|
|
ef6f19bb3d | ||
|
|
a748296ff3 | ||
|
|
412ba319fc | ||
|
|
8c571543dc | ||
|
|
baaf886493 | ||
|
|
47130fda40 | ||
|
|
563302588b | ||
|
|
7b00ec4b87 | ||
|
|
effc84e37f | ||
|
|
eff5a9fad8 | ||
|
|
92888da16d | ||
|
|
b49c0733b4 | ||
|
|
51c41d5a02 | ||
|
|
0d55ff519e | ||
|
|
90e9decd7e | ||
|
|
5d10833038 | ||
|
|
6f2eecac26 | ||
|
|
20c4e4e824 | ||
|
|
3b4fe3ffed | ||
|
|
2945f08955 | ||
|
|
2557fb878a | ||
|
|
6bf051db9b | ||
|
|
584aede1b4 | ||
|
|
4a5fa7e34d | ||
|
|
01dad337c1 | ||
|
|
2e91f5873c | ||
|
|
8bd51eedb5 | ||
|
|
6c8336975c | ||
|
|
541ab1f0a1 | ||
|
|
ad9c8598c2 | ||
|
|
9b4a3885b9 | ||
|
|
106a831462 | ||
|
|
5c5cad51bd | ||
|
|
f46f54fd67 | ||
|
|
7f065dcff6 | ||
|
|
5f8d24fbc1 | ||
|
|
796a997a68 | ||
|
|
e57709b1cf | ||
|
|
11db3ca799 | ||
|
|
5c189a7ff7 | ||
|
|
38a0afb21b | ||
|
|
8e661485ee | ||
|
|
75afc1c3bc | ||
|
|
7c2e1d4c5c | ||
|
|
28466b1c71 | ||
|
|
7e867bd21e | ||
|
|
7ccc15b6cc | ||
|
|
c07c062eba | ||
|
|
effec21892 | ||
|
|
ee77228f8b | ||
|
|
a5a42a91e5 | ||
|
|
81a668e0f8 | ||
|
|
26737bcfac | ||
|
|
b0eac26998 | ||
|
|
f685b1a7ca | ||
|
|
48ca0c28fe | ||
|
|
2606fda318 | ||
|
|
801b576cc7 | ||
|
|
4837d7e669 | ||
|
|
e55ec3904c | ||
|
|
a731547dea | ||
|
|
2db919d6e2 | ||
|
|
2d103c6299 | ||
|
|
3c7059f0bc | ||
|
|
07dc1c14e2 | ||
|
|
5c334124fb | ||
|
|
ae0066edca | ||
|
|
59888632f1 | ||
|
|
b6d93deebf | ||
|
|
c9e90d92dc | ||
|
|
7138fcfe7e | ||
|
|
55fc0800d6 | ||
|
|
4e78a1fe17 | ||
|
|
aba5f8b026 | ||
|
|
b52a377cbc | ||
|
|
a3778d8500 | ||
|
|
cb539ce664 | ||
|
|
33666acb1e | ||
|
|
253e60b24a | ||
|
|
a5be86dc51 | ||
|
|
082a16dc1f | ||
|
|
9312c9f9f5 | ||
|
|
783720f890 | ||
|
|
d2debf2317 | ||
|
|
ae8ac7572f | ||
|
|
d131fab21a | ||
|
|
5ed1ddd6c5 | ||
|
|
375ece2cb9 | ||
|
|
31af29ec5c | ||
|
|
30e4055b3f | ||
|
|
8058e01e2e | ||
|
|
d40c94d011 | ||
|
|
d984360203 | ||
|
|
caf4eb0b7d | ||
|
|
abb38517ec | ||
|
|
a4241ab0c7 | ||
|
|
c2426b5eb5 | ||
|
|
5972e647a8 | ||
|
|
280c052596 | ||
|
|
d5c4626a7a | ||
|
|
b8cdd8f860 | ||
|
|
3ff68f5626 | ||
|
|
0a3231d3b4 | ||
|
|
9abc99bec7 | ||
|
|
8122e8c7b5 | ||
|
|
b065278cd3 | ||
|
|
5f4305734f | ||
|
|
d80585e268 | ||
|
|
c96b39cd0a | ||
|
|
0939b8e6c0 | ||
|
|
40394c9b3c | ||
|
|
a9bed9aad8 | ||
|
|
0b3f91453c | ||
|
|
b7dda612be | ||
|
|
898c8d7b89 | ||
|
|
9706892dbd | ||
|
|
488856cddc | ||
|
|
b8620b6533 | ||
|
|
e1a919a114 | ||
|
|
d5396d4b5a | ||
|
|
493532d38f | ||
|
|
04ff7578be | ||
|
|
6ebacfdc8f | ||
|
|
2b2b49e85b | ||
|
|
9e20de2c1b | ||
|
|
3d0cfa3ae0 | ||
|
|
3f7487d9d2 | ||
|
|
b5165e0d57 | ||
|
|
947d2cb550 | ||
|
|
fecb47dc19 | ||
|
|
72894486ee | ||
|
|
44b98ca268 | ||
|
|
87bc77bfeb | ||
|
|
03441093f4 | ||
|
|
404586ffcd | ||
|
|
e3a02ef34e | ||
|
|
612e864182 | ||
|
|
3b2a7c0d8b | ||
|
|
c1754f5f2b | ||
|
|
d093a69118 | ||
|
|
06f3870fcd | ||
|
|
de1b717251 | ||
|
|
2bdbd280da | ||
|
|
c98e2fbfa8 | ||
|
|
fd2be85b6b | ||
|
|
7a9d088adf | ||
|
|
51a56f7c36 | ||
|
|
93a3b2efac | ||
|
|
5d10a54819 | ||
|
|
69e3a08209 | ||
|
|
de2ecc66d9 | ||
|
|
b1d0174b11 | ||
|
|
e42a5405a5 | ||
|
|
88ca292fa3 | ||
|
|
298996bca6 | ||
|
|
9d2b648383 | ||
|
|
d1ac629d5c | ||
|
|
7d377209e8 | ||
|
|
cb9213bac3 | ||
|
|
1debe40a3f | ||
|
|
38028f7ef0 | ||
|
|
b09f263e47 | ||
|
|
d0239d56f5 | ||
|
|
dd1ee0e13d | ||
|
|
c120bcc40e | ||
|
|
f8ffe99212 | ||
|
|
06898aa8f7 | ||
|
|
37503b1b59 | ||
|
|
ded5026866 | ||
|
|
6cc518d0d8 | ||
|
|
393d9aaea8 | ||
|
|
ee44c8da7f | ||
|
|
95072a5b3a | ||
|
|
c7e1fe7b28 | ||
|
|
58e9010e9a | ||
|
|
4857af7aa4 | ||
|
|
9b528cf6fa | ||
|
|
55d0570669 | ||
|
|
8a77916265 | ||
|
|
819c2ecfcb | ||
|
|
ef2b7adc85 | ||
|
|
889a587cf6 | ||
|
|
65774dd435 | ||
|
|
98992f8fca | ||
|
|
fabaa22eae | ||
|
|
4c9efdeefb | ||
|
|
3016787717 | ||
|
|
ccc3df216e | ||
|
|
07850390e2 | ||
|
|
de647c6c9e | ||
|
|
8e8a95ed29 | ||
|
|
b382bcff28 | ||
|
|
43ed561ec9 | ||
|
|
32fc0750e6 | ||
|
|
17a53a948b | ||
|
|
3314afbd81 | ||
|
|
162473a025 | ||
|
|
61a71d33d0 | ||
|
|
73f59188d1 | ||
|
|
825f5aae69 | ||
|
|
f1285579ce | ||
|
|
306401772b | ||
|
|
ef91e7fd57 | ||
|
|
3edb8416fa | ||
|
|
e5b09d1433 | ||
|
|
7166163b03 | ||
|
|
8af1976acb | ||
|
|
993e684a95 | ||
|
|
5c4036f6a2 | ||
|
|
7ca94042f4 | ||
|
|
cb03506b90 | ||
|
|
14eed9f5f1 | ||
|
|
b42ceec141 | ||
|
|
2ae68242e1 | ||
|
|
a43978c797 | ||
|
|
0bebf0f20f | ||
|
|
2fa4f35afd | ||
|
|
416db99d33 | ||
|
|
fed13409ca | ||
|
|
2da61fa0e7 | ||
|
|
5d130a2d6f | ||
|
|
5e7e216d65 | ||
|
|
6bc2024c39 | ||
|
|
2f2c0cfa28 | ||
|
|
e49ef434a1 | ||
|
|
ab77f4bfcf | ||
|
|
345d91c992 | ||
|
|
656306bac7 | ||
|
|
5128498089 | ||
|
|
72acdd3def | ||
|
|
b21cda7af4 | ||
|
|
9790941cbe | ||
|
|
0ce657f9d0 | ||
|
|
12fb16f294 | ||
|
|
d22f5fe92c | ||
|
|
7a143d7d9e | ||
|
|
d9cdcf224f | ||
|
|
47dec7d142 | ||
|
|
35c388d652 | ||
|
|
a27209c6ad | ||
|
|
4cc80785c2 | ||
|
|
846dacabf0 | ||
|
|
888acbb701 | ||
|
|
579d797c71 | ||
|
|
ff4f506dc7 | ||
|
|
ed5fc8edc5 | ||
|
|
f532d081ba | ||
|
|
5d26fd1788 | ||
|
|
262a1707b7 | ||
|
|
db7ca579c3 | ||
|
|
0e97346535 | ||
|
|
5c99a3e976 | ||
|
|
2d2e4501a0 | ||
|
|
790e12d6c9 | ||
|
|
a5f5d5cb34 | ||
|
|
dccf68065f | ||
|
|
2d255030dc | ||
|
|
e758738f5a | ||
|
|
9daced6535 | ||
|
|
cb7388bc3a | ||
|
|
9906cec46b | ||
|
|
7a7e2be550 | ||
|
|
c3395d671e | ||
|
|
122ded3468 | ||
|
|
75c90bbfc1 | ||
|
|
6a263fdd11 | ||
|
|
fd40f8c624 | ||
|
|
e07dec0e4f | ||
|
|
f9d2776c0f | ||
|
|
0eeccd522f | ||
|
|
d46917bc35 | ||
|
|
d8d1bae404 | ||
|
|
6d93e85297 | ||
|
|
d233585663 | ||
|
|
9a985c3518 | ||
|
|
2cb1991199 | ||
|
|
b8b283cf86 | ||
|
|
d7b7db5fb2 | ||
|
|
299368a62a | ||
|
|
ce329ebe23 | ||
|
|
616a84c230 | ||
|
|
2b55c309d8 | ||
|
|
2c00e2ef6b | ||
|
|
97ca58f6f3 | ||
|
|
b2c6dc4eae | ||
|
|
f5cafc83ae | ||
|
|
a6377539a2 | ||
|
|
1cbe35259d | ||
|
|
ca2562e54a | ||
|
|
5f9e736a37 | ||
|
|
ea272cf862 | ||
|
|
83ce4e70f6 | ||
|
|
958f9e218d | ||
|
|
5692f3e4c2 | ||
|
|
0ab1fdc9dd | ||
|
|
e48d385aa5 | ||
|
|
773fbcddf9 | ||
|
|
44a88f4543 | ||
|
|
022f741da7 | ||
|
|
c81f07795f | ||
|
|
8272678a2d | ||
|
|
151f72a886 | ||
|
|
2074e2f362 | ||
|
|
65593dabcb | ||
|
|
ce2fac33bf | ||
|
|
8b1ed6d18c | ||
|
|
c41cce2f04 | ||
|
|
da996aefc7 | ||
|
|
a99b9c2845 | ||
|
|
198f829eef | ||
|
|
56ebf988c1 | ||
|
|
501830d67b | ||
|
|
ba092cee7b | ||
|
|
c4b1382bbf | ||
|
|
15b47c2025 | ||
|
|
522427427b | ||
|
|
77d22fd9bb | ||
|
|
343f9bd3da | ||
|
|
5a7a6667e7 | ||
|
|
515297e259 | ||
|
|
38d8175cdd | ||
|
|
13ac8c6dbf | ||
|
|
7e909ea6b9 | ||
|
|
8c0e39c66c | ||
|
|
400fc6ac5a | ||
|
|
6dd6c989e4 | ||
|
|
69a4d453a6 | ||
|
|
bb8ae4e4c8 | ||
|
|
41e18d4129 | ||
|
|
d43bc03d0b | ||
|
|
bcc70fda0d | ||
|
|
524f9afaf8 | ||
|
|
21748b4899 | ||
|
|
28abcad91a | ||
|
|
c632f3f453 | ||
|
|
ecf148033b | ||
|
|
56bab2e418 | ||
|
|
f17c0ef04b | ||
|
|
76096d2e64 | ||
|
|
0d03ed96c0 | ||
|
|
810559126a | ||
|
|
d9bff2a631 | ||
|
|
fa9add4217 | ||
|
|
780592fbc6 | ||
|
|
7121523442 | ||
|
|
36ce0fd69b | ||
|
|
a2e5c86db3 | ||
|
|
02ab0852e4 | ||
|
|
3b42f3b39d | ||
|
|
672c769790 | ||
|
|
f6d15dbcd8 | ||
|
|
d898829af2 | ||
|
|
741791f7ef | ||
|
|
89d9893434 | ||
|
|
938cf8c720 | ||
|
|
5d0c59593e | ||
|
|
8022ea5064 | ||
|
|
46631569e9 | ||
|
|
a1819de1ee | ||
|
|
1bbfd6001f | ||
|
|
46fab4f07a | ||
|
|
4dec99d87d | ||
|
|
eb9337d06e | ||
|
|
fe855d651e | ||
|
|
19cebd610b | ||
|
|
bd6fae8ff3 | ||
|
|
4f9389924e | ||
|
|
1dd48fc51c | ||
|
|
9d5b55e0a2 | ||
|
|
b3d3c5b3bc | ||
|
|
c773cbe777 | ||
|
|
72e19b55ad | ||
|
|
a904dd4dc3 | ||
|
|
c517ca339b | ||
|
|
425cac602c | ||
|
|
9b3f1acf89 | ||
|
|
da7cf3a853 | ||
|
|
8c3639762a | ||
|
|
dd78be073a | ||
|
|
a1db7187f7 | ||
|
|
a6d89a97e5 | ||
|
|
85490f7d44 | ||
|
|
0188e2e33d | ||
|
|
ff1d344782 | ||
|
|
fcfaf2bace | ||
|
|
cf19728063 | ||
|
|
f27605dc13 | ||
|
|
617f6e74b6 | ||
|
|
cedf0be331 | ||
|
|
0e486d84e7 | ||
|
|
6e2cc8f38c | ||
|
|
db5ac0206b | ||
|
|
14936b3c45 | ||
|
|
a0780b7154 | ||
|
|
3b91dbb335 | ||
|
|
4789809df2 | ||
|
|
61178f3532 | ||
|
|
d50d8c34c6 | ||
|
|
61db8db122 | ||
|
|
6276e743e2 | ||
|
|
f6a2a8def2 | ||
|
|
25d4b54e5c | ||
|
|
940da7325d | ||
|
|
39620c105d | ||
|
|
cda7b00e84 | ||
|
|
bfcf6b919b | ||
|
|
134ed43d34 | ||
|
|
5a8cd879f1 | ||
|
|
33478d2f7d | ||
|
|
2494c13a66 | ||
|
|
edd4f7cae5 | ||
|
|
1339acd035 | ||
|
|
32a66b96c2 | ||
|
|
7d86c5282d | ||
|
|
e2c9dddda8 | ||
|
|
fffa235b79 | ||
|
|
532b65a66d | ||
|
|
52e91cb72a | ||
|
|
e43c1b5fec | ||
|
|
058bb9704a | ||
|
|
d747efa134 | ||
|
|
8bf2cf8355 | ||
|
|
dbb6d997be | ||
|
|
4a8611738c | ||
|
|
55b80312f4 | ||
|
|
b76e64b294 | ||
|
|
408646db01 | ||
|
|
7be1cdc2d5 | ||
|
|
39bf645f1c | ||
|
|
0239d3b955 | ||
|
|
702316c444 | ||
|
|
88cc730c0e | ||
|
|
eb07297f91 | ||
|
|
bbbf55765d | ||
|
|
b3a23166ac | ||
|
|
dda2439393 | ||
|
|
96cda366cb | ||
|
|
944647dc72 | ||
|
|
6f6fe94218 | ||
|
|
a04abec2f1 | ||
|
|
0145deb320 | ||
|
|
ac8860e8fd | ||
|
|
34776e1125 | ||
|
|
0a2346491b | ||
|
|
a7fb57daff | ||
|
|
5e9ba17298 | ||
|
|
ed5093914d | ||
|
|
744bbe93bc | ||
|
|
a6d6f88a79 | ||
|
|
28c8dc1613 | ||
|
|
b3b8b4c9e1 | ||
|
|
5fa5175698 | ||
|
|
919dd1fef8 | ||
|
|
af099f17c4 | ||
|
|
ba9baafbe6 | ||
|
|
c450bf1e1a | ||
|
|
94cc2fb38d | ||
|
|
31c0bc5cf8 | ||
|
|
d89116d7ff | ||
|
|
ba0452bb06 | ||
|
|
baf36f4473 | ||
|
|
52ff0290e6 | ||
|
|
aa83e6b41b | ||
|
|
a0151fee46 | ||
|
|
1b39f35af6 | ||
|
|
c6a317cd78 | ||
|
|
24417af511 | ||
|
|
0ed4459eac | ||
|
|
89efc52a6b | ||
|
|
4bdc3a1667 | ||
|
|
760c8c5d8f | ||
|
|
c63cdcf6ef | ||
|
|
5d0b3559ca | ||
|
|
99e8bd3f71 | ||
|
|
219058770b | ||
|
|
f8dcfefea5 | ||
|
|
f07d88e197 | ||
|
|
abb201c1c4 | ||
|
|
1fb07f6692 | ||
|
|
74eb71aded | ||
|
|
acca3b5e08 | ||
|
|
d14657e493 | ||
|
|
ab356b356a | ||
|
|
eb581bdda5 | ||
|
|
25eb96ed0f | ||
|
|
c1baee06f6 | ||
|
|
4c3ebdf19f | ||
|
|
243e940b22 | ||
|
|
86ef6701d3 | ||
|
|
742b803ea8 | ||
|
|
3ebef317ad | ||
|
|
ac5a957ca1 | ||
|
|
0332ce4475 | ||
|
|
c85c9904d7 | ||
|
|
55a55940f5 | ||
|
|
8da05f4559 | ||
|
|
dbe750d368 | ||
|
|
a3b8019f0a | ||
|
|
7b74ed53ef | ||
|
|
d45bb6b848 | ||
|
|
c6c5ad5176 | ||
|
|
92600904a1 | ||
|
|
6428ed7c02 | ||
|
|
78775f143d | ||
|
|
b6f0222caa | ||
|
|
2fe5a7d284 | ||
|
|
b321407b77 | ||
|
|
7e9a9040d3 | ||
|
|
16b6b4c878 | ||
|
|
0e62ecdcf0 | ||
|
|
5484adf4ab | ||
|
|
26ac31a362 | ||
|
|
d4099dd946 | ||
|
|
23f2bd43a1 | ||
|
|
4cc79e1bcb | ||
|
|
b81c60cbe7 | ||
|
|
7431ea337c | ||
|
|
6a715b5a42 | ||
|
|
59353923c6 | ||
|
|
9121d12699 | ||
|
|
88dcd1f244 | ||
|
|
88e755f560 | ||
|
|
870cb1f794 | ||
|
|
cbcef968e3 | ||
|
|
40edf50f86 | ||
|
|
0e9193594b | ||
|
|
c2c44c4bdf | ||
|
|
25ade84d89 | ||
|
|
3a9f25f496 | ||
|
|
1d50abafd4 | ||
|
|
ffdd318c5f | ||
|
|
82cec264f0 | ||
|
|
f8f495d7fd | ||
|
|
3f9ccf96b0 | ||
|
|
9dc0271b99 | ||
|
|
f5a9c4067e | ||
|
|
aac405c430 | ||
|
|
e93f404eb0 | ||
|
|
fa0c0a4edb | ||
|
|
bc94b966fd | ||
|
|
9b95160214 | ||
|
|
62e1aeba2c | ||
|
|
17c0322715 | ||
|
|
c1871306f3 | ||
|
|
bd8ad58cfc | ||
|
|
b020cc51b7 | ||
|
|
c77ffe2afb | ||
|
|
50ba869b91 | ||
|
|
991a84ad5e | ||
|
|
af889a40ee | ||
|
|
7b4c1a9338 | ||
|
|
34bf82e59c | ||
|
|
ff67766cb6 | ||
|
|
a4e5a6f0e5 | ||
|
|
78afffb0c4 | ||
|
|
9e5f3b8ca5 | ||
|
|
111ebaf4bd | ||
|
|
2656b810f3 | ||
|
|
00f9ec9451 | ||
|
|
9cebde80af | ||
|
|
d9362b73c1 | ||
|
|
2744da47b8 | ||
|
|
793c516f1f | ||
|
|
59f33abf53 | ||
|
|
fe3746b61f | ||
|
|
0b6fbbc79f | ||
|
|
836d7f670b | ||
|
|
de78b22e66 | ||
|
|
a287f8ecaf | ||
|
|
4b21bf3687 | ||
|
|
efb29b0fe9 | ||
|
|
9cfa1dafbe | ||
|
|
def417dbd5 | ||
|
|
f6fb0a5cf0 | ||
|
|
072a45bdd6 | ||
|
|
2c32f1dc37 | ||
|
|
efedc11aaa | ||
|
|
8c9bc8e595 | ||
|
|
638df22080 | ||
|
|
9b60ca7798 | ||
|
|
03d0c9fa4a | ||
|
|
1d7a427bd4 | ||
|
|
46f7e0af4e | ||
|
|
1e653d5eaf | ||
|
|
8f291127ba | ||
|
|
f862099e20 | ||
|
|
b25fe94af0 | ||
|
|
21becb9363 | ||
|
|
88c478e40e | ||
|
|
6cc809e0c7 | ||
|
|
99da61cd22 | ||
|
|
649a9e0902 | ||
|
|
77373f54b2 | ||
|
|
da6bed8424 | ||
|
|
efe6692050 | ||
|
|
874d10928b | ||
|
|
fdd0a8016c | ||
|
|
03b1114e7b | ||
|
|
1f6948a633 | ||
|
|
d7133e9a32 | ||
|
|
c7ba9715f7 | ||
|
|
89aceed2b3 | ||
|
|
86985234e4 | ||
|
|
4757465a0a | ||
|
|
b21b3ad9c8 | ||
|
|
78ef8e37fe | ||
|
|
73593de509 | ||
|
|
9dd89462fe | ||
|
|
0ab852e785 | ||
|
|
afbf4b79ec | ||
|
|
5b2b20fedd | ||
|
|
1ae1f50384 | ||
|
|
5140c797c1 | ||
|
|
66f38a094f | ||
|
|
57aaf139a2 | ||
|
|
c3f4fe8ccd | ||
|
|
9194d2e10f | ||
|
|
937bdfd66f | ||
|
|
18a35a2586 | ||
|
|
2d76982d47 | ||
|
|
e8a92a0031 | ||
|
|
816f532417 | ||
|
|
65be7efa2d | ||
|
|
d6115cbf85 | ||
|
|
d1d99c5e3f | ||
|
|
b203c48c51 | ||
|
|
cbc44a6014 | ||
|
|
69661e6951 | ||
|
|
9a2ae6cb0b | ||
|
|
9f86064b81 | ||
|
|
73da2a1d14 | ||
|
|
93bb169c6c | ||
|
|
cf1e7013f4 | ||
|
|
8258843ae1 | ||
|
|
67baae4441 | ||
|
|
a5509797bc | ||
|
|
3ff2d58a25 | ||
|
|
e3d43e754d | ||
|
|
bcb55a0e4c | ||
|
|
a9fbec2934 | ||
|
|
140e923982 | ||
|
|
680cf56746 | ||
|
|
7162aa65f4 | ||
|
|
a6e16a4e71 | ||
|
|
eac4e49ceb | ||
|
|
90382c5889 | ||
|
|
ce841a3c4f | ||
|
|
d5ee0ef158 | ||
|
|
d06a4b155d | ||
|
|
3ddb48b647 | ||
|
|
957484588e | ||
|
|
cf22541dd5 | ||
|
|
61338bbb0c | ||
|
|
788ebbcdab | ||
|
|
ce35d6448e | ||
|
|
a1bc147849 |
No files matched your search
@@ -0,0 +1 @@
|
||||
scripts/lint/lint-results.txt merge=theirs
|
||||
@@ -1,5 +1,778 @@
|
||||
## 1.4.3 (May 22, 2017)
|
||||
- Hotfix: ignore oauth header for now and use basic auth to allow new logins for nc12
|
||||
## 2017-08-02 10:04
|
||||
New branches:
|
||||
/
|
||||
|
||||
Updated branches:
|
||||
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
|
||||
|
||||
Conflicting branches:
|
||||
/
|
||||
|
||||
## 2017-08-02 09:58
|
||||
New branches:
|
||||
/
|
||||
|
||||
Updated branches:
|
||||
- Resized images (nextcloud/resizedImages) [https://github.com/nextcloud/android/pull/69] updated
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
Conflicting branches:
|
||||
/
|
||||
|
||||
## 2017-08-02 00:30
|
||||
New branches:
|
||||
/
|
||||
|
||||
Updated branches:
|
||||
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
|
||||
|
||||
Conflicting branches:
|
||||
/
|
||||
|
||||
## 2017-08-01 00:30
|
||||
New branches:
|
||||
/
|
||||
|
||||
Updated branches:
|
||||
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
Conflicting branches:
|
||||
/
|
||||
|
||||
## 2017-07-31 00:30
|
||||
New branches:
|
||||
/
|
||||
|
||||
Updated branches:
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
Conflicting branches:
|
||||
- Error feedback improvement (nextcloud/errorFeedback) [https://github.com/nextcloud/android/pull/1198] conflicting
|
||||
|
||||
## 2017-07-30 00:31
|
||||
New branches:
|
||||
/
|
||||
|
||||
Updated branches:
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
Conflicting branches:
|
||||
- Error feedback improvement (nextcloud/errorFeedback) [https://github.com/nextcloud/android/pull/1198] conflicting
|
||||
|
||||
## 2017-07-29 00:31
|
||||
New branches:
|
||||
- On receiving untrusted ssl cert, test if it was previously accepted user (nextcloud/newWebLoginUntrustedCert) [https://github.com/nextcloud/android/pull/1206] added
|
||||
|
||||
Updated branches:
|
||||
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
|
||||
- Show empty message when receiving external files (nextcloud/emptyMessageReceiveExternalFiles) [https://github.com/nextcloud/android/pull/1214] updated
|
||||
- Show empty message again (nextcloud/showEmptyMessageAgain) [https://github.com/nextcloud/android/pull/1213] updated
|
||||
- On receiving untrusted ssl cert, test if it was previously accepted user (nextcloud/newWebLoginUntrustedCert) [https://github.com/nextcloud/android/pull/1206] updated
|
||||
- Comment out adding all new downloaded files to folder observer (nextcloud/folderObserver) [https://github.com/nextcloud/android/pull/1155] updated
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
Conflicting branches:
|
||||
- Error feedback improvement (nextcloud/errorFeedback) [https://github.com/nextcloud/android/pull/1198] conflicting
|
||||
|
||||
## 2017-07-28 00:30
|
||||
New branches:
|
||||
/
|
||||
|
||||
Updated branches:
|
||||
/
|
||||
|
||||
Conflicting branches:
|
||||
- Extract html code and make it non-translatable (nextcloud/participateUrls) [https://github.com/nextcloud/android/pull/1224] conflicting
|
||||
- Show empty message when receiving external files (nextcloud/emptyMessageReceiveExternalFiles) [https://github.com/nextcloud/android/pull/1214] conflicting
|
||||
- Show empty message again (nextcloud/showEmptyMessageAgain) [https://github.com/nextcloud/android/pull/1213] conflicting
|
||||
- resolves: #1207 make daily contact backup string translatable (nextcloud/dailyBackupString) [https://github.com/nextcloud/android/pull/1208] conflicting
|
||||
- On receiving untrusted ssl cert, test if it was previously accepted user (nextcloud/newWebLoginUntrustedCert) [https://github.com/nextcloud/android/pull/1206] conflicting
|
||||
- Auto upload crash if filepath is null (nextcloud/autoUploadCrashIfFilepathIsNull) [https://github.com/nextcloud/android/pull/1201] conflicting
|
||||
- Comment out adding all new downloaded files to folder observer (nextcloud/folderObserver) [https://github.com/nextcloud/android/pull/1155] conflicting
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] conflicting
|
||||
|
||||
## 2017-07-27 00:31
|
||||
New branches:
|
||||
/
|
||||
|
||||
Updated branches:
|
||||
- Show empty message again (nextcloud/showEmptyMessageAgain) [https://github.com/nextcloud/android/pull/1213] updated
|
||||
|
||||
Conflicting branches:
|
||||
- resolves: #1207 make daily contact backup string translatable (nextcloud/dailyBackupString) [https://github.com/nextcloud/android/pull/1208] conflicting
|
||||
- Auto upload crash if filepath is null (nextcloud/autoUploadCrashIfFilepathIsNull) [https://github.com/nextcloud/android/pull/1201] conflicting
|
||||
- revamped details screen (nextcloud/new_details_view_animations) [https://github.com/nextcloud/android/pull/1156] conflicting
|
||||
- Comment out adding all new downloaded files to folder observer (nextcloud/folderObserver) [https://github.com/nextcloud/android/pull/1155] conflicting
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] conflicting
|
||||
|
||||
## 2017-07-26 00:31
|
||||
New branches:
|
||||
- Show empty message when receiving external files (nextcloud/emptyMessageReceiveExternalFiles) [https://github.com/nextcloud/android/pull/1214] added
|
||||
|
||||
Updated branches:
|
||||
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
|
||||
- Show empty message when receiving external files (nextcloud/emptyMessageReceiveExternalFiles) [https://github.com/nextcloud/android/pull/1214] updated
|
||||
|
||||
Conflicting branches:
|
||||
/
|
||||
|
||||
## 2017-07-25 00:32
|
||||
New branches:
|
||||
- On device: show only folders containing downloaded files #983 (jsrck/983_hide-folders) [https://github.com/nextcloud/android/pull/1220] added
|
||||
|
||||
Updated branches:
|
||||
- On device: show only folders containing downloaded files #983 (jsrck/983_hide-folders) [https://github.com/nextcloud/android/pull/1220] updated
|
||||
|
||||
Conflicting branches:
|
||||
- Extract html code and make it non-translatable (nextcloud/participateUrls) [https://github.com/nextcloud/android/pull/1224] conflicting
|
||||
- Show empty message when receiving external files (nextcloud/emptyMessageReceiveExternalFiles) [https://github.com/nextcloud/android/pull/1214] conflicting
|
||||
- Show empty message again (nextcloud/showEmptyMessageAgain) [https://github.com/nextcloud/android/pull/1213] conflicting
|
||||
- resolves: #1207 make daily contact backup string translatable (nextcloud/dailyBackupString) [https://github.com/nextcloud/android/pull/1208] conflicting
|
||||
- Auto upload crash if filepath is null (nextcloud/autoUploadCrashIfFilepathIsNull) [https://github.com/nextcloud/android/pull/1201] conflicting
|
||||
- revamped details screen (nextcloud/new_details_view_animations) [https://github.com/nextcloud/android/pull/1156] conflicting
|
||||
- Comment out adding all new downloaded files to folder observer (nextcloud/folderObserver) [https://github.com/nextcloud/android/pull/1155] conflicting
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] conflicting
|
||||
|
||||
## 2017-07-24 08:54
|
||||
New branches:
|
||||
/
|
||||
|
||||
Updated branches:
|
||||
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
|
||||
|
||||
Conflicting branches:
|
||||
/
|
||||
|
||||
## 2017-07-24 00:31
|
||||
New branches:
|
||||
/
|
||||
|
||||
Updated branches:
|
||||
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
|
||||
|
||||
Conflicting branches:
|
||||
/
|
||||
|
||||
## 2017-07-23 00:31
|
||||
New branches:
|
||||
/
|
||||
|
||||
Updated branches:
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
Conflicting branches:
|
||||
/
|
||||
|
||||
## 2017-07-22 00:32
|
||||
New branches:
|
||||
/
|
||||
|
||||
Updated branches:
|
||||
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
|
||||
- Feature request: Select all particularly in search #637 (jsrck/master) [https://github.com/nextcloud/android/pull/1196] updated
|
||||
|
||||
Conflicting branches:
|
||||
/
|
||||
|
||||
## 2017-07-21 10:33
|
||||
New branches:
|
||||
/
|
||||
|
||||
Updated branches:
|
||||
/
|
||||
|
||||
Conflicting branches:
|
||||
/
|
||||
|
||||
## 2017-07-21 10:25
|
||||
New branches:
|
||||
/
|
||||
|
||||
Updated branches:
|
||||
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
|
||||
|
||||
Conflicting branches:
|
||||
/
|
||||
|
||||
## 2017-07-21 08:57
|
||||
New branches:
|
||||
- Show empty message again (nextcloud/showEmptyMessageAgain) [https://github.com/nextcloud/android/pull/1213] added
|
||||
- Feature request: Select all particularly in search #637 (jsrck/master) [https://github.com/nextcloud/android/pull/1196] added
|
||||
|
||||
Updated branches:
|
||||
- Show empty message again (nextcloud/showEmptyMessageAgain) [https://github.com/nextcloud/android/pull/1213] updated
|
||||
- Feature request: Select all particularly in search #637 (jsrck/master) [https://github.com/nextcloud/android/pull/1196] updated
|
||||
|
||||
Conflicting branches:
|
||||
/
|
||||
|
||||
## 2017-07-21 07:24
|
||||
New branches:
|
||||
/
|
||||
|
||||
Updated branches:
|
||||
/
|
||||
|
||||
Conflicting branches:
|
||||
/
|
||||
|
||||
## 2017-07-21 00:30
|
||||
/
|
||||
|
||||
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
|
||||
/
|
||||
|
||||
## 2017-07-20 15:29
|
||||
/
|
||||
|
||||
/
|
||||
/
|
||||
|
||||
## 2017-07-20 00:31
|
||||
no new branches added
|
||||
|
||||
no branches updated
|
||||
|
||||
## 2017-07-19 00:32
|
||||
no new branches added
|
||||
|
||||
no branches updated
|
||||
|
||||
## 2017-07-18 00:31
|
||||
- Auto upload crash if filepath is null (nextcloud/autoUploadCrashIfFilepathIsNull) [https://github.com/nextcloud/android/pull/1201] added
|
||||
|
||||
- Auto upload crash if filepath is null (nextcloud/autoUploadCrashIfFilepathIsNull) [https://github.com/nextcloud/android/pull/1201] updated
|
||||
|
||||
## 2017-07-17 00:31
|
||||
no new branches added
|
||||
|
||||
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
|
||||
- revamped details screen (nextcloud/new_details_view_animations) [https://github.com/nextcloud/android/pull/1156] updated
|
||||
- Comment out adding all new downloaded files to folder observer (nextcloud/folderObserver) [https://github.com/nextcloud/android/pull/1155] updated
|
||||
|
||||
## 2017-07-16 00:31
|
||||
no new branches added
|
||||
|
||||
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
|
||||
|
||||
## 2017-07-15 00:30
|
||||
no new branches added
|
||||
|
||||
no branches updated
|
||||
|
||||
## 2017-07-14 00:30
|
||||
- revamped details screen (nextcloud/new_details_view_animations) [https://github.com/nextcloud/android/pull/1156] added
|
||||
- Resized images (nextcloud/resizedImages) [https://github.com/nextcloud/android/pull/69] added
|
||||
|
||||
- revamped details screen (nextcloud/new_details_view_animations) [https://github.com/nextcloud/android/pull/1156] updated
|
||||
- Resized images (nextcloud/resizedImages) [https://github.com/nextcloud/android/pull/69] updated
|
||||
|
||||
## 2017-07-13 00:31
|
||||
no new branches added
|
||||
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-07-12 00:31
|
||||
- Catch a rare exception while setting activity list adapter (nextcloud/ErrorInActivityListAdapter) [https://github.com/nextcloud/android/pull/1173] added
|
||||
|
||||
- Catch a rare exception while setting activity list adapter (nextcloud/ErrorInActivityListAdapter) [https://github.com/nextcloud/android/pull/1173] updated
|
||||
- Theming Dynamically use server color (nextcloud/userTheming) [https://github.com/nextcloud/android/pull/1031] updated
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-07-11 00:30
|
||||
no new branches added
|
||||
|
||||
- Theming Dynamically use server color (nextcloud/userTheming) [https://github.com/nextcloud/android/pull/1031] updated
|
||||
|
||||
## 2017-07-10 00:31
|
||||
no new branches added
|
||||
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-07-09 00:31
|
||||
no new branches added
|
||||
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-07-08 00:30
|
||||
no new branches added
|
||||
|
||||
no branches updated
|
||||
|
||||
## 2017-07-07 00:30
|
||||
- Theming Dynamically use server color (nextcloud/userTheming) [https://github.com/nextcloud/android/pull/1031] added
|
||||
|
||||
- Theming Dynamically use server color (nextcloud/userTheming) [https://github.com/nextcloud/android/pull/1031] updated
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-07-06 00:30
|
||||
- Fix: no shared folders after \ (nextcloud/sharedFolderMissing) [https://github.com/nextcloud/android/pull/1165] added
|
||||
|
||||
- Fix: no shared folders after \ (nextcloud/sharedFolderMissing) [https://github.com/nextcloud/android/pull/1165] updated
|
||||
|
||||
## 2017-07-05 00:31
|
||||
no new branches added
|
||||
|
||||
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
|
||||
|
||||
## 2017-07-04 00:31
|
||||
no new branches added
|
||||
|
||||
no branches updated
|
||||
|
||||
## 2017-07-03 00:31
|
||||
no new branches added
|
||||
|
||||
no branches updated
|
||||
|
||||
## 2017-07-02 00:30
|
||||
no new branches added
|
||||
|
||||
no branches updated
|
||||
|
||||
## 2017-07-01 00:30
|
||||
- Comment out adding all new downloaded files to folder observer (nextcloud/folderObserver) [https://github.com/nextcloud/android/pull/1155] added
|
||||
|
||||
- Comment out adding all new downloaded files to folder observer (nextcloud/folderObserver) [https://github.com/nextcloud/android/pull/1155] updated
|
||||
|
||||
## 2017-06-30 00:32
|
||||
no new branches added
|
||||
|
||||
- 1089 sharing with password rule (nextcloud/1089_sharing_with_password_rule) [https://github.com/nextcloud/android/pull/1110] updated
|
||||
|
||||
## 2017-06-29 00:31
|
||||
- Cancel pending thumbnail tasks (nextcloud/stopAsyncTasks) [https://github.com/nextcloud/android/pull/1149] added
|
||||
|
||||
- Cancel pending thumbnail tasks (nextcloud/stopAsyncTasks) [https://github.com/nextcloud/android/pull/1149] updated
|
||||
|
||||
## 2017-06-28 00:32
|
||||
no new branches added
|
||||
|
||||
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
|
||||
- Fix settings on android 4.x (nextcloud/settingsOn4x) [https://github.com/nextcloud/android/pull/1133] updated
|
||||
- 1089 sharing with password rule (nextcloud/1089_sharing_with_password_rule) [https://github.com/nextcloud/android/pull/1110] updated
|
||||
|
||||
## 2017-06-27 00:31
|
||||
- Prevent NPE when disabling \ (nextcloud/autoUploadWithoutStoragePermission) [https://github.com/nextcloud/android/pull/1140] added
|
||||
- Auto upload rotation bug (nextcloud/autoUploadRotationBug) [https://github.com/nextcloud/android/pull/1138] added
|
||||
- Opens share by clicking icon in file listing (nextcloud/shareDialog) [https://github.com/nextcloud/android/pull/1135] added
|
||||
- Fix settings on android 4.x (nextcloud/settingsOn4x) [https://github.com/nextcloud/android/pull/1133] added
|
||||
- 1089 sharing with password rule (nextcloud/1089_sharing_with_password_rule) [https://github.com/nextcloud/android/pull/1110] added
|
||||
- Enhance UI\ (nextcloud/contactsBackupUI) [https://github.com/nextcloud/android/pull/1027] added
|
||||
|
||||
- Prevent NPE when disabling \ (nextcloud/autoUploadWithoutStoragePermission) [https://github.com/nextcloud/android/pull/1140] updated
|
||||
- Auto upload rotation bug (nextcloud/autoUploadRotationBug) [https://github.com/nextcloud/android/pull/1138] updated
|
||||
- Opens share by clicking icon in file listing (nextcloud/shareDialog) [https://github.com/nextcloud/android/pull/1135] updated
|
||||
- Fix settings on android 4.x (nextcloud/settingsOn4x) [https://github.com/nextcloud/android/pull/1133] updated
|
||||
- 1089 sharing with password rule (nextcloud/1089_sharing_with_password_rule) [https://github.com/nextcloud/android/pull/1110] updated
|
||||
- Enhance UI\ (nextcloud/contactsBackupUI) [https://github.com/nextcloud/android/pull/1027] updated
|
||||
|
||||
## 2017-06-26 00:31
|
||||
no new branches added
|
||||
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-06-25 00:30
|
||||
no new branches added
|
||||
|
||||
no branches updated
|
||||
|
||||
## 2017-06-24 00:31
|
||||
- Sdcard: test if writable before offering it (nextcloud/removedSDcard) [https://github.com/nextcloud/android/pull/1119] added
|
||||
- Delete all local files on account removal (nextcloud/deleteFilesOnAccountRemoval) [https://github.com/nextcloud/android/pull/1109] added
|
||||
|
||||
- Sdcard: test if writable before offering it (nextcloud/removedSDcard) [https://github.com/nextcloud/android/pull/1119] updated
|
||||
- Delete all local files on account removal (nextcloud/deleteFilesOnAccountRemoval) [https://github.com/nextcloud/android/pull/1109] updated
|
||||
|
||||
## 2017-06-23 00:31
|
||||
- Transaction too large (nextcloud/transactionTooLarge) [https://github.com/nextcloud/android/pull/1102] added
|
||||
|
||||
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
|
||||
- Transaction too large (nextcloud/transactionTooLarge) [https://github.com/nextcloud/android/pull/1102] updated
|
||||
|
||||
## 2017-06-22 00:31
|
||||
no new branches added
|
||||
|
||||
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
|
||||
|
||||
## 2017-06-21 00:31
|
||||
no new branches added
|
||||
|
||||
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-06-18 00:30
|
||||
no new branches added
|
||||
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-06-17 00:31
|
||||
no new branches added
|
||||
|
||||
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-06-16 00:31
|
||||
no new branches added
|
||||
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-06-15 00:31
|
||||
no new branches added
|
||||
|
||||
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-06-14 00:30
|
||||
no new branches added
|
||||
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-06-13 00:30
|
||||
no new branches added
|
||||
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-06-12 00:31
|
||||
no new branches added
|
||||
|
||||
no branches updated
|
||||
|
||||
## 2017-06-11 00:31
|
||||
no new branches added
|
||||
|
||||
no branches updated
|
||||
|
||||
## 2017-06-10 00:30
|
||||
no new branches added
|
||||
|
||||
no branches updated
|
||||
|
||||
## 2017-06-09 00:30
|
||||
no new branches added
|
||||
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-06-08 00:31
|
||||
no new branches added
|
||||
|
||||
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
|
||||
|
||||
## 2017-06-07 00:31
|
||||
no new branches added
|
||||
|
||||
no branches updated
|
||||
|
||||
## 2017-06-06 00:31
|
||||
no new branches added
|
||||
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-06-05 00:30
|
||||
no new branches added
|
||||
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-06-04 00:30
|
||||
no new branches added
|
||||
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-06-03 00:30
|
||||
no new branches added
|
||||
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-06-02 00:30
|
||||
no new branches added
|
||||
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-06-01 00:31
|
||||
no new branches added
|
||||
|
||||
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
|
||||
|
||||
## 2017-05-31 00:30
|
||||
no new branches added
|
||||
|
||||
no branches updated
|
||||
|
||||
## 2017-05-30 00:30
|
||||
no new branches added
|
||||
|
||||
no branches updated
|
||||
|
||||
## 2017-05-29 00:31
|
||||
no new branches added
|
||||
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-05-28 00:30
|
||||
no new branches added
|
||||
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-05-27 00:30
|
||||
no new branches added
|
||||
|
||||
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
|
||||
|
||||
## 2017-05-26 00:30
|
||||
no new branches added
|
||||
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-05-25 00:30
|
||||
no new branches added
|
||||
|
||||
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-05-24 00:31
|
||||
no new branches added
|
||||
|
||||
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
|
||||
|
||||
## 2017-05-23 00:30
|
||||
no new branches added
|
||||
|
||||
no branches updated
|
||||
|
||||
## 2017-05-22 00:31
|
||||
no new branches added
|
||||
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-05-21 00:32
|
||||
no new branches added
|
||||
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-05-20 00:31
|
||||
- Search view wrong files (nextcloud/searchViewWrongFiles) [https://github.com/nextcloud/android/pull/896] added
|
||||
- Pinch zoom (nextcloud/pinchZoom) [https://github.com/nextcloud/android/pull/143] added
|
||||
|
||||
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
|
||||
- Search view wrong files (nextcloud/searchViewWrongFiles) [https://github.com/nextcloud/android/pull/896] updated
|
||||
- Pinch zoom (nextcloud/pinchZoom) [https://github.com/nextcloud/android/pull/143] updated
|
||||
|
||||
## 2017-05-19 00:31
|
||||
no new branches added
|
||||
|
||||
- Crash due to non-existing empty string (nextcloud/crashDueToEmptyString) [https://github.com/nextcloud/android/pull/995] updated
|
||||
|
||||
## 2017-05-18 00:30
|
||||
no new branches added
|
||||
|
||||
- Crash due to non-existing empty string (nextcloud/crashDueToEmptyString) [https://github.com/nextcloud/android/pull/995] updated
|
||||
|
||||
## 2017-05-17 15:07
|
||||
- Crash due to non-existing empty string (nextcloud/crashDueToEmptyString) [https://github.com/nextcloud/android/pull/995] added
|
||||
|
||||
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
|
||||
- Crash due to non-existing empty string (nextcloud/crashDueToEmptyString) [https://github.com/nextcloud/android/pull/995] updated
|
||||
|
||||
## 2017-05-17 00:32
|
||||
no new branches added
|
||||
|
||||
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
|
||||
|
||||
## 2017-05-16 14:27
|
||||
no new branches added
|
||||
|
||||
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
|
||||
|
||||
## 2017-05-16 13:43
|
||||
no new branches added
|
||||
|
||||
no branches updated
|
||||
|
||||
## 2017-05-16 00:31
|
||||
no new branches added
|
||||
|
||||
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
|
||||
|
||||
## 2017-05-15 00:32
|
||||
no new branches added
|
||||
|
||||
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-05-13 09:04
|
||||
- Re-use second fragment if available (nextcloud/audioRotationBug) [https://github.com/nextcloud/android/pull/985] added
|
||||
|
||||
- Re-use second fragment if available (nextcloud/audioRotationBug) [https://github.com/nextcloud/android/pull/985] updated
|
||||
|
||||
## 2017-05-13 00:31
|
||||
no new branches added
|
||||
|
||||
no branches updated
|
||||
|
||||
## 2017-05-12 00:31
|
||||
no new branches added
|
||||
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-05-11 00:31
|
||||
no new branches added
|
||||
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-05-10 00:31
|
||||
no new branches added
|
||||
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-05-09 00:30
|
||||
no new branches added
|
||||
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-05-08 00:31
|
||||
no new branches added
|
||||
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-05-07 00:31
|
||||
no new branches added
|
||||
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-05-06 00:30
|
||||
no new branches added
|
||||
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-05-05 00:31
|
||||
no new branches added
|
||||
|
||||
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-05-04 00:31
|
||||
no new branches added
|
||||
|
||||
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-05-03 16:25
|
||||
- Enhance external Sdcard usage (nextcloud/externalStorage) [https://github.com/nextcloud/android/pull/947] added
|
||||
|
||||
- Enhance external Sdcard usage (nextcloud/externalStorage) [https://github.com/nextcloud/android/pull/947] updated
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-05-03 00:30
|
||||
no new branches added
|
||||
|
||||
no branches updated
|
||||
|
||||
## 2017-05-02 00:31
|
||||
no new branches added
|
||||
|
||||
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
|
||||
|
||||
## 2017-05-01 00:31
|
||||
no new branches added
|
||||
|
||||
no branches updated
|
||||
|
||||
## 2017-04-30 00:30
|
||||
no new branches added
|
||||
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-04-29 00:32
|
||||
no new branches added
|
||||
|
||||
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-04-28 00:30
|
||||
no new branches added
|
||||
|
||||
no branches updated
|
||||
|
||||
## 2017-04-27 00:31
|
||||
no new branches added
|
||||
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-04-26 00:30
|
||||
no new branches added
|
||||
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-04-25 00:31
|
||||
no new branches added
|
||||
|
||||
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
|
||||
|
||||
## 2017-04-24 00:30
|
||||
no new branches added
|
||||
|
||||
no branches updated
|
||||
|
||||
## 2017-04-23 00:31
|
||||
no new branches added
|
||||
|
||||
no branches updated
|
||||
|
||||
## 2017-04-22 00:40
|
||||
no new branches added
|
||||
|
||||
no branches updated
|
||||
|
||||
## 2017-04-21 00:31
|
||||
no new branches added
|
||||
|
||||
no branches updated
|
||||
|
||||
## 2017-04-20 00:31
|
||||
no new branches added
|
||||
|
||||
no branches updated
|
||||
|
||||
## 2017-04-19 00:30
|
||||
no new branches added
|
||||
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-04-18 16:42
|
||||
no new branches added
|
||||
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-04-15 00:30
|
||||
no new branches added
|
||||
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 2017-04-14 00:31
|
||||
no new branches added
|
||||
|
||||
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
|
||||
|
||||
## 2017-04-13 14:50
|
||||
no new branches added
|
||||
|
||||
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
|
||||
|
||||
## 2017-04-13 14:18
|
||||
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] added
|
||||
- Dev base (nextcloud/dev-base) [https://github.com/nextcloud/android/tree/dev-base] added
|
||||
|
||||
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
|
||||
|
||||
## 2017-04-13 09:55
|
||||
|
||||
|
||||
## 2017-04-13 09:27
|
||||
|
||||
- Added fingerprint support (Flole998/master) [https://github.com/nextcloud/android/pull/624] updated
|
||||
- Fix file modification date on upload (nextcloud/fix_file_modification_date_on_upload) [https://github.com/nextcloud/android/pull/451] updated
|
||||
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
|
||||
|
||||
## 1.4.2 (March 14, 2017)
|
||||
- Auto Upload for newly taken photos/images (Android 6+)
|
||||
|
||||
@@ -75,13 +75,17 @@ android {
|
||||
|
||||
multiDexEnabled true
|
||||
|
||||
applicationId "com.nextcloud.android.beta"
|
||||
versionCode 20170802
|
||||
versionName "20170802"
|
||||
|
||||
// adapt structure from Eclipse to Gradle/Android Studio expectations;
|
||||
// see http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Configuring-the-Structure
|
||||
|
||||
productFlavors {
|
||||
// used for f-droid
|
||||
generic {
|
||||
applicationId 'com.nextcloud.client'
|
||||
applicationId 'com.nextcloud.android.beta'
|
||||
}
|
||||
|
||||
gplay {
|
||||
@@ -121,6 +125,10 @@ android {
|
||||
exclude 'META-INF/LICENSE'
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
release
|
||||
}
|
||||
|
||||
task checkstyle(type: Checkstyle) {
|
||||
configFile = file("${rootProject.projectDir}/checkstyle.xml")
|
||||
configProperties.checkstyleSuppressionsPath = file("${project.rootDir}/config/quality/checkstyle/suppressions.xml").absolutePath
|
||||
@@ -172,6 +180,19 @@ android {
|
||||
}
|
||||
check.dependsOn 'checkstyle', 'findbugs', 'pmd', 'lint'
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (project.hasProperty('RELEASE_STORE_FILE')) {
|
||||
android.signingConfigs.release.storeFile = file(RELEASE_STORE_FILE)
|
||||
android.signingConfigs.release.storePassword = RELEASE_STORE_PASSWORD
|
||||
android.signingConfigs.release.keyAlias = RELEASE_KEY_ALIAS
|
||||
android.signingConfigs.release.keyPassword = RELEASE_KEY_PASSWORD
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -179,7 +200,7 @@ dependencies {
|
||||
compile name: 'touch-image-view'
|
||||
compile 'com.android.support:multidex:1.0.1'
|
||||
|
||||
compile 'com.github.nextcloud:android-library:1.0.22'
|
||||
compile 'com.github.nextcloud:android-library:dev-SNAPSHOT'
|
||||
compile "com.android.support:support-v4:${supportLibraryVersion}"
|
||||
compile "com.android.support:design:${supportLibraryVersion}"
|
||||
compile 'com.jakewharton:disklrucache:2.0.2'
|
||||
@@ -188,7 +209,7 @@ dependencies {
|
||||
compile 'com.github.tobiasKaminsky:android-floating-action-button:1.10.2'
|
||||
compile 'com.google.code.findbugs:annotations:2.0.1'
|
||||
compile group: 'commons-io', name: 'commons-io', version: '2.4'
|
||||
compile 'com.github.evernote:android-job:v1.1.9'
|
||||
compile 'com.github.evernote:android-job:v1.1.10'
|
||||
compile 'com.jakewharton:butterknife:8.4.0'
|
||||
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
|
||||
compile 'org.greenrobot:eventbus:3.0.0'
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
2017-08-02 10:04:46
|
||||
Branches: 10
|
||||
[00 / 10] Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] was updated successfully
|
||||
[01 / 10] Enabling dom storage api (nextcloud/domAPI) [https://github.com/nextcloud/android/pull/1253] no update needed
|
||||
[02 / 10] Reduce lint errors (nextcloud/reduceLintErrors) [https://github.com/nextcloud/android/pull/1252] no update needed
|
||||
[03 / 10] Show empty message when receiving external files (nextcloud/emptyMessageReceiveExternalFiles) [https://github.com/nextcloud/android/pull/1214] no update needed
|
||||
[04 / 10] Show empty message again (nextcloud/showEmptyMessageAgain) [https://github.com/nextcloud/android/pull/1213] no update needed
|
||||
[05 / 10] Error feedback improvement (nextcloud/errorFeedback) [https://github.com/nextcloud/android/pull/1198] no update needed
|
||||
[06 / 10] Comment out adding all new downloaded files to folder observer (nextcloud/folderObserver) [https://github.com/nextcloud/android/pull/1155] no update needed
|
||||
[07 / 10] Search inside of text files (nextcloud/bugfix-454) [https://github.com/nextcloud/android/pull/565] no update needed
|
||||
[08 / 10] Resized images (nextcloud/resizedImages) [https://github.com/nextcloud/android/pull/69] no update needed
|
||||
[09 / 10] Master (nextcloud/master) [https://github.com/nextcloud/android] no update needed
|
||||
[10 / 10] Dev base (nextcloud/dev-base) [https://github.com/nextcloud/android/tree/dev-base] no update needed
|
||||
@@ -0,0 +1,5 @@
|
||||
Die Nextcloud App erlaubt Dir Zugriff auf alle Dateien in Deiner Nextcloud.
|
||||
|
||||
Die ist die Dev-Version der offiziellen Nextcloud App und enthält neue Features, die noch nicht ausgiebig getestet wurden. Dies kann zu Datenverlust oder Instabilität führen. Die App ist nur zum Testen der neuen Funktionen, melden von Fehlern und nicht für den alltäglichen Einsatz vorgesehen.
|
||||
|
||||
Die Dev-Version kann parallel zu der offiziellen Nextcloud-App installiert werden.
|
||||
|
After Width: | Height: | Size: 821 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 79 KiB |
@@ -0,0 +1 @@
|
||||
Die Nextcloud App erlaubt Dir Zugriff auf alle Dateien in Deiner Nextcloud.
|
||||
@@ -0,0 +1 @@
|
||||
Nextcloud Dev
|
||||
@@ -0,0 +1,4 @@
|
||||
A safe home for all your data. Access & share your files, calendars, contacts, mail & more from any device, on your terms.
|
||||
This is a dev version of the official Nextcloid app and includes brand-new, untested features which might lead to instabilities and data loss. The app is designed for users willing to test the new features and to report bugs if they occur. Do not use it for your productive work!
|
||||
|
||||
The dev version can be installed alongside the official Nextcloud app which is available at F-Droid, too. Once a day it is checked if the source code was updated, so there can be longer pauses between builds.
|
||||
|
After Width: | Height: | Size: 821 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 79 KiB |
@@ -0,0 +1 @@
|
||||
A safe home for all your data. Access & share your files, calendars, contacts, mail & more from any device, on your terms.
|
||||
@@ -0,0 +1 @@
|
||||
Nextcloud Dev
|
||||
@@ -0,0 +1,31 @@
|
||||
Flole998/master
|
||||
jsrck/983_hide-folders
|
||||
jsrck/master
|
||||
nextcloud/1089_sharing_with_password_rule
|
||||
nextcloud/audioRotationBug
|
||||
nextcloud/autoUploadCrashIfFilepathIsNull
|
||||
nextcloud/autoUploadRotationBug
|
||||
nextcloud/autoUploadWithoutStoragePermission
|
||||
nextcloud/contactsBackupUI
|
||||
nextcloud/crashDueToEmptyString
|
||||
nextcloud/deleteFilesOnAccountRemoval
|
||||
nextcloud/dev
|
||||
nextcloud/emptyMessageReceiveExternalFiles
|
||||
nextcloud/ErrorInActivityListAdapter
|
||||
nextcloud/externalStorage
|
||||
nextcloud/fix_file_modification_date_on_upload
|
||||
nextcloud/folderObserver
|
||||
nextcloud/master
|
||||
nextcloud/new_details_view_animations
|
||||
nextcloud/newWebLoginUntrustedCert
|
||||
nextcloud/pinchZoom
|
||||
nextcloud/removedSDcard
|
||||
nextcloud/resizedImages
|
||||
nextcloud/searchViewWrongFiles
|
||||
nextcloud/settingsOn4x
|
||||
nextcloud/sharedFolderMissing
|
||||
nextcloud/shareDialog
|
||||
nextcloud/showEmptyMessageAgain
|
||||
nextcloud/stopAsyncTasks
|
||||
nextcloud/transactionTooLarge
|
||||
nextcloud/userTheming
|
||||
@@ -0,0 +1,44 @@
|
||||
#!/bin/bash
|
||||
date=$(date +%Y%m%d)
|
||||
|
||||
# use the current date
|
||||
mkdir -p ~/apks
|
||||
echo $date > ~/apks/latest
|
||||
|
||||
# always use dev branch for android library
|
||||
sed -i s"#'com.github.nextcloud:android-library.*#'com.github.nextcloud:android-library:dev-SNAPSHOT'#" build.gradle
|
||||
|
||||
# use current date for version code/name
|
||||
sed -i s"#android:versionCode=.*#android:versionCode=\"$date\"#" src/main/AndroidManifest.xml
|
||||
sed -i s"#versionCode .*#versionCode $date#" build.gradle
|
||||
|
||||
sed -i s"#android:versionName=.*\"#android:versionName=\"$date\"#" src/main/AndroidManifest.xml
|
||||
sed -i s"#versionName .*#versionName \"$date\"#" build.gradle
|
||||
|
||||
# sed -e 's#\@string/app_name#Nextcloud dev#' -e 's#\@string/copy_link#Copy link#' -e 's#\@string/share_dialog_title#Sharing#' -e 's#\@string/manage_space_title#Manage space#' src/main/AndroidManifest.xml -i
|
||||
|
||||
# build signed apk
|
||||
gradle assembleGenericRelease >> /tmp/dev.log 2>&1
|
||||
|
||||
if [ $? != 0 ] ; then
|
||||
echo "Build error!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mv build/outputs/apk/android-generic-release.apk ~/apks/nextcloud-dev-$date.apk
|
||||
ln -s nextcloud-dev-$date.apk latest.apk
|
||||
mv latest.apk ~/apks/
|
||||
|
||||
# remove all but the latest 5 apks
|
||||
/bin/ls -t ~/apks/*.apk | awk 'NR>6' | xargs rm -f
|
||||
|
||||
git add .
|
||||
git commit -m "daily dev $date"
|
||||
git push
|
||||
|
||||
git tag dev-$date
|
||||
git push origin dev-$date
|
||||
|
||||
# remove all but the latest 5 tags
|
||||
git tag|grep dev | sort -r | awk 'NR>5' | xargs -n 1 git push --delete origin
|
||||
git tag|grep dev | sort -r | awk 'NR>5' | xargs -n 1 git tag -d
|
||||
@@ -0,0 +1,41 @@
|
||||
#!/bin/bash
|
||||
|
||||
currentCommit=$(git rev-parse HEAD)
|
||||
statusFile="devUpdateStatus"
|
||||
touch mergedBranches
|
||||
|
||||
# check if branch was changed
|
||||
git pull -q || exit
|
||||
|
||||
branches=$(scripts/getBranchesForDev)
|
||||
branchesCount=$(echo "$branches" | wc -l)
|
||||
count=1
|
||||
conflictingBranches=0
|
||||
|
||||
date "+%F %X" > $statusFile
|
||||
|
||||
while read -r branch; do
|
||||
branchName=$(echo $branch | cut -d"(" -f2 | cut -d")" -f1 | tr ":" "/")
|
||||
|
||||
if [ $(echo $branchName | grep -c "^origin") -eq 0 ] ; then
|
||||
# remote repo
|
||||
git fetch -q $(echo $branchName | cut -f1 -d"/") 1> /dev/null
|
||||
fi
|
||||
|
||||
mergeOutput=$(git merge --no-edit $branchName)
|
||||
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "[$(printf "%02d" $count) / $(printf "%02d" $branchesCount)] $branch CONFLICT" >> $statusFile
|
||||
let conflictingBranches++
|
||||
git merge --abort
|
||||
fi
|
||||
|
||||
let count++
|
||||
done <<< "$branches"
|
||||
|
||||
if [ $conflictingBranches -gt 0 ] ; then
|
||||
grep -i conflict $statusFile | mail -s "[Nextcloud-Dev] $(date '+%F %X') Conflicting branches!" $1
|
||||
fi
|
||||
|
||||
# reset to previous commit, delete all inbetween commits
|
||||
git reset --hard $currentCommit
|
||||
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
source ~/.git/githubPass
|
||||
|
||||
pullRequests=$(curl -u "$GITHUB_USER:$GITHUB_PASS" 2>/dev/null https://api.github.com/search/issues?q=repo:nextcloud/android+state:open+type:pr+label:%22ready%20for%20dev%22 | grep pulls | cut -d'"' -f4)
|
||||
|
||||
for pr in $pullRequests; do
|
||||
xml=$(curl -u "$GITHUB_USER:$GITHUB_PASS" 2> /dev/null $pr)
|
||||
branchName=$(echo "$xml" | grep \"label\" | head -n1 | cut -d'"' -f 4| tr ":" "/")
|
||||
title=$(echo "$xml" | grep "title" | head -n1 | cut -d'"' -f 4 | tr -d "(" | tr -d ")" | tr -d "[" | tr -d "]")
|
||||
htmlUrl=$(echo "$xml" |grep html_url | grep pull | cut -d'"' -f4)
|
||||
|
||||
echo "$title ("$branchName") ["$htmlUrl"]"
|
||||
done
|
||||
|
||||
# manually add master and dev-base branch
|
||||
echo "Master (nextcloud/master) [https://github.com/nextcloud/android]"
|
||||
echo "Dev base (nextcloud/dev-base) [https://github.com/nextcloud/android/tree/dev-base]"
|
||||
|
||||
## add remote repos
|
||||
for repoUrl in $(curl -u "$GITHUB_USER:$GITHUB_PASS" 2> /dev/null $pullRequests | grep \"git_url\" | sort | uniq | cut -f4 -d"\"" ); do
|
||||
repoName=$(echo $repoUrl | cut -f4 -d"/")
|
||||
git remote add $repoName $repoUrl 2>/dev/null
|
||||
done
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
DO NOT TOUCH; GENERATED BY DRONE
|
||||
<span class="mdl-layout-title">Lint Report: 41 errors and 779 warnings</span>
|
||||
<span class="mdl-layout-title">Lint Report: 20 errors and 678 warnings</span>
|
||||
@@ -0,0 +1,97 @@
|
||||
#!/bin/bash
|
||||
|
||||
statusFile="devUpdateStatus"
|
||||
touch mergedBranches
|
||||
|
||||
# check if branch was changed
|
||||
git fetch
|
||||
devBranchWasUpdated=$(git status | grep "dem selben Stand" -c)
|
||||
|
||||
git pull -q || exit
|
||||
|
||||
branches=$(scripts/getBranchesForDev)
|
||||
branchesCount=$(echo "$branches" | wc -l)
|
||||
count=1
|
||||
conflictingBranches=0
|
||||
|
||||
date "+%F %X" > $statusFile
|
||||
echo "Branches: $branchesCount" >> $statusFile
|
||||
|
||||
if [ $devBranchWasUpdated -eq 0 ]; then
|
||||
# branch was updated outside, so build new dev
|
||||
echo "[00 / $(printf "%02d" $branchesCount)] Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] was updated successfully" >> $statusFile
|
||||
fi
|
||||
|
||||
while read -r branch; do
|
||||
echo -n "[$(printf "%02d" $count) / $(printf "%02d" $branchesCount)] " >> $statusFile
|
||||
|
||||
branchName=$(echo $branch | cut -d"(" -f2 | cut -d")" -f1 | tr ":" "/")
|
||||
|
||||
if [ $(echo $branchName | grep -c "^origin") -eq 0 ] ; then
|
||||
# remote repo
|
||||
git fetch -q $(echo $branchName | cut -f1 -d"/") 1> /dev/null
|
||||
fi
|
||||
|
||||
mergeOutput=$(git merge --no-edit $branchName)
|
||||
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "$branch CONFLICT" >> $statusFile
|
||||
let conflictingBranches++
|
||||
git merge --abort
|
||||
else
|
||||
if [ $(echo $mergeOutput | grep "up-to-date" -c) -eq 0 ] ; then
|
||||
# branch has newer state
|
||||
echo "$branch merged successfully" >> $statusFile
|
||||
else
|
||||
echo "$branch no update needed" >> $statusFile
|
||||
fi
|
||||
fi
|
||||
|
||||
let count++
|
||||
done <<< "$branches"
|
||||
|
||||
## Update Changelog.md
|
||||
tmpFile=$(tempfile)
|
||||
cp CHANGELOG.md $tmpFile
|
||||
|
||||
echo "## $(date '+%F %H:%M')" > CHANGELOG.md
|
||||
|
||||
## add new branches
|
||||
echo "New branches:" >> CHANGELOG.md
|
||||
if [ $(comm -13 mergedBranches <(cat devUpdateStatus | grep succ | cut -d"(" -f2 | cut -d")" -f1 | sort) | wc -l) -gt 0 ] ; then
|
||||
egrep "$(comm -13 mergedBranches <(cat devUpdateStatus | grep succ | cut -d"(" -f2 | cut -d")" -f1 | sort) )" devUpdateStatus | cut -d"]" -f2 | sed s'#$#]#'g | sed s'#^#-#'g | sed s'#$# added#'g >> CHANGELOG.md
|
||||
else
|
||||
echo "/" >> CHANGELOG.md
|
||||
fi
|
||||
|
||||
cat devUpdateStatus | grep succ | cut -d"(" -f2 | cut -d")" -f1 >> mergedBranches
|
||||
sort -u mergedBranches -o mergedBranches_unique
|
||||
mv mergedBranches_unique mergedBranches
|
||||
|
||||
echo >> CHANGELOG.md
|
||||
|
||||
## add updated branches
|
||||
echo "Updated branches:" >> CHANGELOG.md
|
||||
if [ $(cat devUpdateStatus | grep succ -c) -gt 0 ]; then
|
||||
cat devUpdateStatus | grep succ | cut -d"]" -f2 | sed s'#$#]#'g | sed s'#^#-#'g | sed s'#$# updated#'g >> CHANGELOG.md
|
||||
else
|
||||
echo "/" >> CHANGELOG.md
|
||||
fi
|
||||
echo >> CHANGELOG.md
|
||||
|
||||
## add conflicted branches
|
||||
echo "Conflicting branches:" >> CHANGELOG.md
|
||||
if [ $(cat devUpdateStatus | grep conflict -ci) -gt 0 ]; then
|
||||
cat devUpdateStatus | grep -i conflict | cut -d"]" -f2 | sed s'#$#]#'g | sed s'#^#-#'g | sed s'#$# conflicting#'g >> CHANGELOG.md
|
||||
else
|
||||
echo "/" >> CHANGELOG.md
|
||||
fi
|
||||
|
||||
echo >> CHANGELOG.md
|
||||
cat $tmpFile >> CHANGELOG.md
|
||||
|
||||
git add .
|
||||
git commit -m "update dev $(date +%F)"
|
||||
git push
|
||||
|
||||
exit $conflictingBranches
|
||||
@@ -0,0 +1,43 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo -n "git pull:"
|
||||
git pull || exit
|
||||
echo
|
||||
|
||||
branches=$(scripts/getBranchesForDev)
|
||||
branchesCount=$(echo "$branches" | wc -l)
|
||||
|
||||
count=1
|
||||
echo "Branches: $branchesCount"
|
||||
|
||||
while read -u 3 -r branch; do
|
||||
branchName=$(echo $branch | cut -d"(" -f2 | cut -d")" -f1 | tr ":" "/")
|
||||
|
||||
echo -n "[$(printf "%02d" $count) / $(printf "%02d" $branchesCount)] $branch"
|
||||
|
||||
|
||||
if [ $(echo $branchName | grep -c "^origin") -eq 0 ] ; then
|
||||
# remote repo
|
||||
git fetch -q $(echo $branchName | cut -f1 -d"/") 1> /dev/null
|
||||
fi
|
||||
|
||||
git merge --no-edit $branchName 1> /dev/null
|
||||
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "resolve conflict in androidStudio, after resolving press RETURN"
|
||||
read
|
||||
git add . && git commit --no-edit 1> /dev/null
|
||||
else
|
||||
echo " merged"
|
||||
fi
|
||||
|
||||
let count++
|
||||
|
||||
done 3<<< "$branches"
|
||||
|
||||
echo "git push? [y/n]"
|
||||
read -r result
|
||||
|
||||
if [ $result = "y" ] ; then
|
||||
git push
|
||||
fi
|
||||
@@ -8,7 +8,7 @@
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "",
|
||||
"android_client_info": {
|
||||
"package_name": "com.nextcloud.client"
|
||||
"package_name": "com.nextcloud.android.beta"
|
||||
}
|
||||
},
|
||||
"oauth_client": [],
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
-->
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.owncloud.android"
|
||||
android:versionCode="10040399"
|
||||
android:versionName="1.4.3">
|
||||
android:versionCode="20170802"
|
||||
android:versionName="20170802">
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="14"
|
||||
@@ -84,8 +84,9 @@
|
||||
<activity android:name=".ui.activity.UserInfoActivity" />
|
||||
<activity android:name=".ui.activity.NotificationsActivity"/>
|
||||
<activity android:name=".ui.activity.ParticipateActivity" />
|
||||
<activity android:name=".ui.activity.ActivitiesListActivity"
|
||||
android:configChanges="orientation|screenSize|keyboardHidden" />
|
||||
<activity
|
||||
android:name=".ui.activity.ActivitiesListActivity"
|
||||
android:configChanges="orientation|screenSize|keyboardHidden"/>
|
||||
<activity android:name=".ui.activity.FolderSyncActivity" />
|
||||
<activity android:name=".ui.activity.UploadFilesActivity" />
|
||||
<activity android:name=".ui.activity.ExternalSiteWebView"
|
||||
@@ -182,6 +183,12 @@
|
||||
android:resource="@xml/exposed_filepaths" />
|
||||
</provider>
|
||||
|
||||
<provider
|
||||
android:name=".providers.DiskLruImageCacheFileProvider"
|
||||
android:authorities="org.nextcloud.imageCache.provider"
|
||||
android:exported="true">
|
||||
</provider>
|
||||
|
||||
<activity
|
||||
android:name=".authentication.AuthenticatorActivity"
|
||||
android:exported="true"
|
||||
@@ -219,7 +226,7 @@
|
||||
<activity android:name=".ui.activity.ConflictsResolveActivity"/>
|
||||
<activity android:name=".ui.activity.GenericExplanationActivity"/>
|
||||
<activity android:name=".ui.activity.ErrorsWhileCopyingHandlerActivity"/>
|
||||
|
||||
|
||||
<activity android:name=".ui.activity.LogHistoryActivity"/>
|
||||
|
||||
<activity android:name=".ui.errorhandling.ErrorShowActivity" />
|
||||
|
||||
@@ -112,11 +112,9 @@ public class MainApp extends MultiDexApplication {
|
||||
// initialise thumbnails cache on background thread
|
||||
new ThumbnailsCacheManager.InitDiskCacheTask().execute();
|
||||
|
||||
if (BuildConfig.DEBUG) {
|
||||
// use app writable dir, no permissions needed
|
||||
Log_OC.startLogging(getAppContext());
|
||||
Log_OC.d("Debug", "start logging");
|
||||
}
|
||||
// use app writable dir, no permissions needed
|
||||
Log_OC.startLogging(getAppContext());
|
||||
Log_OC.d("Debug", "start logging");
|
||||
|
||||
cleanOldEntries();
|
||||
updateAutoUploadEntries();
|
||||
|
||||
@@ -35,8 +35,8 @@ import com.owncloud.android.lib.common.accounts.AccountUtils.Constants;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
|
||||
import com.owncloud.android.lib.common.utils.Log_OC;
|
||||
import com.owncloud.android.lib.resources.status.OwnCloudVersion;
|
||||
import com.owncloud.android.ui.activity.ManageAccountsActivity;
|
||||
import com.owncloud.android.operations.GetCapabilitiesOperarion;
|
||||
import com.owncloud.android.ui.activity.ManageAccountsActivity;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
@@ -82,7 +82,7 @@ public class AccountUtils {
|
||||
|
||||
if (defaultAccount == null && ocAccounts.length > 0) {
|
||||
// take first which is not pending for removal account as fallback
|
||||
for (Account account: ocAccounts) {
|
||||
for (Account account : ocAccounts) {
|
||||
boolean pendingForRemoval = arbitraryDataProvider.getBooleanValue(account,
|
||||
ManageAccountsActivity.PENDING_FOR_REMOVAL);
|
||||
|
||||
|
||||
@@ -60,6 +60,7 @@ import android.os.Handler;
|
||||
import android.os.IBinder;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.design.widget.TextInputLayout;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.support.v4.app.Fragment;
|
||||
@@ -122,6 +123,7 @@ import com.owncloud.android.ui.dialog.SslUntrustedCertDialog;
|
||||
import com.owncloud.android.ui.dialog.SslUntrustedCertDialog.OnSslUntrustedCertListener;
|
||||
import com.owncloud.android.utils.AnalyticsUtils;
|
||||
import com.owncloud.android.utils.DisplayUtils;
|
||||
import com.owncloud.android.utils.ErrorMessageAdapter;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.security.cert.Certificate;
|
||||
@@ -210,7 +212,8 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
||||
private TextView mServerStatusView;
|
||||
|
||||
private TextWatcher mHostUrlInputWatcher;
|
||||
private int mServerStatusText = 0, mServerStatusIcon = 0;
|
||||
private String mServerStatusText;
|
||||
private int mServerStatusIcon = 0;
|
||||
|
||||
private boolean mServerIsChecked = false;
|
||||
private boolean mServerIsValid = false;
|
||||
@@ -229,7 +232,8 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
||||
|
||||
private WebView mLoginWebView;
|
||||
|
||||
private int mAuthStatusText = 0, mAuthStatusIcon = 0;
|
||||
private String mAuthStatusText;
|
||||
private int mAuthStatusIcon = 0;
|
||||
|
||||
private String mAuthToken = "";
|
||||
private AuthenticatorAsyncTask mAsyncTask;
|
||||
@@ -367,11 +371,12 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
||||
|
||||
mLoginWebView.getSettings().setAllowFileAccess(false);
|
||||
mLoginWebView.getSettings().setJavaScriptEnabled(true);
|
||||
mLoginWebView.getSettings().setDomStorageEnabled(true);
|
||||
mLoginWebView.getSettings().setUserAgentString(getWebLoginUserAgent());
|
||||
mLoginWebView.getSettings().setSaveFormData(false);
|
||||
mLoginWebView.getSettings().setSavePassword(false);
|
||||
|
||||
if (baseURL != null && !baseURL.isEmpty()){
|
||||
if (baseURL != null && !baseURL.isEmpty()) {
|
||||
Map<String, String> headers = new HashMap<>();
|
||||
headers.put(RemoteOperation.OCS_API_HEADER, RemoteOperation.OCS_API_HEADER_VALUE);
|
||||
mLoginWebView.loadUrl(baseURL + WEB_LOGIN, headers);
|
||||
@@ -562,7 +567,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
||||
/// step 2 - set properties of UI elements (text, visibility, enabled...)
|
||||
Button welcomeLink = (Button) findViewById(R.id.welcome_link);
|
||||
welcomeLink.setVisibility(isWelcomeLinkVisible ? View.VISIBLE : View.GONE);
|
||||
welcomeLink.setText(String.format(getString(R.string.auth_register), getString(R.string.app_name)));
|
||||
welcomeLink.setText(getString(R.string.auth_register));
|
||||
|
||||
TextView instructionsView = (TextView) findViewById(R.id.instructions_message);
|
||||
if (instructionsMessageText != null) {
|
||||
@@ -600,7 +605,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
||||
mServerInfo.mIsSslConn = mServerInfo.mBaseUrl.startsWith(HTTPS_PROTOCOL);
|
||||
}
|
||||
} else {
|
||||
mServerStatusText = savedInstanceState.getInt(KEY_SERVER_STATUS_TEXT);
|
||||
mServerStatusText = savedInstanceState.getString(KEY_SERVER_STATUS_TEXT);
|
||||
mServerStatusIcon = savedInstanceState.getInt(KEY_SERVER_STATUS_ICON);
|
||||
|
||||
mServerIsValid = savedInstanceState.getBoolean(KEY_SERVER_VALID);
|
||||
@@ -665,7 +670,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
||||
if (mAuthStatusIcon != 0) {
|
||||
Log_OC.d(TAG, "onTextChanged: hiding authentication status");
|
||||
mAuthStatusIcon = 0;
|
||||
mAuthStatusText = 0;
|
||||
mAuthStatusText = "";
|
||||
showAuthStatus();
|
||||
}
|
||||
}
|
||||
@@ -712,7 +717,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
||||
}
|
||||
} else {
|
||||
isPasswordExposed = savedInstanceState.getBoolean(KEY_PASSWORD_EXPOSED, false);
|
||||
mAuthStatusText = savedInstanceState.getInt(KEY_AUTH_STATUS_TEXT);
|
||||
mAuthStatusText = savedInstanceState.getString(KEY_AUTH_STATUS_TEXT);
|
||||
mAuthStatusIcon = savedInstanceState.getInt(KEY_AUTH_STATUS_ICON);
|
||||
mAuthToken = savedInstanceState.getString(KEY_AUTH_TOKEN);
|
||||
}
|
||||
@@ -817,7 +822,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
||||
|
||||
if (!webViewLoginMethod) {
|
||||
/// Server PRE-fragment state
|
||||
outState.putInt(KEY_SERVER_STATUS_TEXT, mServerStatusText);
|
||||
outState.putString(KEY_SERVER_STATUS_TEXT, mServerStatusText);
|
||||
outState.putInt(KEY_SERVER_STATUS_ICON, mServerStatusIcon);
|
||||
outState.putBoolean(KEY_SERVER_CHECKED, mServerIsChecked);
|
||||
outState.putBoolean(KEY_SERVER_VALID, mServerIsValid);
|
||||
@@ -825,7 +830,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
||||
/// Authentication PRE-fragment state
|
||||
outState.putBoolean(KEY_PASSWORD_EXPOSED, isPasswordVisible());
|
||||
outState.putInt(KEY_AUTH_STATUS_ICON, mAuthStatusIcon);
|
||||
outState.putInt(KEY_AUTH_STATUS_TEXT, mAuthStatusText);
|
||||
outState.putString(KEY_AUTH_STATUS_TEXT, mAuthStatusText);
|
||||
outState.putString(KEY_AUTH_TOKEN, mAuthToken);
|
||||
}
|
||||
|
||||
@@ -1074,7 +1079,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
||||
}
|
||||
|
||||
if (mHostUrlInput != null) {
|
||||
mServerStatusText = R.string.auth_testing_connection;
|
||||
mServerStatusText = getResources().getString(R.string.auth_testing_connection);
|
||||
mServerStatusIcon = R.drawable.progress_small;
|
||||
showServerStatus();
|
||||
}
|
||||
@@ -1090,7 +1095,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
||||
}
|
||||
|
||||
} else {
|
||||
mServerStatusText = 0;
|
||||
mServerStatusText = "";
|
||||
mServerStatusIcon = 0;
|
||||
if (!webViewLoginMethod) {
|
||||
showServerStatus();
|
||||
@@ -1173,7 +1178,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
||||
mServerInfo.mBaseUrl == null ||
|
||||
mServerInfo.mBaseUrl.length() == 0) {
|
||||
mServerStatusIcon = R.drawable.ic_alert;
|
||||
mServerStatusText = R.string.auth_wtf_reenter_URL;
|
||||
mServerStatusText = getResources().getString(R.string.auth_wtf_reenter_URL);
|
||||
showServerStatus();
|
||||
mOkButton.setEnabled(false);
|
||||
return;
|
||||
@@ -1232,7 +1237,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
||||
private void startOauthorization() {
|
||||
// be gentle with the user
|
||||
mAuthStatusIcon = R.drawable.progress_small;
|
||||
mAuthStatusText = R.string.oauth_login_connection;
|
||||
mAuthStatusText = getResources().getString(R.string.oauth_login_connection);
|
||||
showAuthStatus();
|
||||
|
||||
// GET AUTHORIZATION request
|
||||
@@ -1264,7 +1269,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
||||
private void startSamlBasedFederatedSingleSignOnAuthorization() {
|
||||
/// be gentle with the user
|
||||
mAuthStatusIcon = R.drawable.progress_small;
|
||||
mAuthStatusText = R.string.auth_connecting_auth_server;
|
||||
mAuthStatusText = getResources().getString(R.string.auth_connecting_auth_server);
|
||||
showAuthStatus();
|
||||
|
||||
/// Show SAML-based SSO web dialog
|
||||
@@ -1504,74 +1509,74 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
||||
switch (result.getCode()) {
|
||||
case OK_SSL:
|
||||
mServerStatusIcon = R.drawable.ic_lock_white;
|
||||
mServerStatusText = R.string.auth_secure_connection;
|
||||
mServerStatusText = getResources().getString(R.string.auth_secure_connection);
|
||||
break;
|
||||
|
||||
case OK_NO_SSL:
|
||||
case OK:
|
||||
if (mHostUrlInput.getText().toString().trim().toLowerCase().startsWith(HTTP_PROTOCOL)) {
|
||||
mServerStatusText = R.string.auth_connection_established;
|
||||
mServerStatusText = getResources().getString(R.string.auth_connection_established);
|
||||
mServerStatusIcon = R.drawable.ic_ok;
|
||||
} else {
|
||||
mServerStatusText = R.string.auth_nossl_plain_ok_title;
|
||||
mServerStatusText = getResources().getString(R.string.auth_nossl_plain_ok_title);
|
||||
mServerStatusIcon = R.drawable.ic_lock_open_white;
|
||||
}
|
||||
break;
|
||||
|
||||
case NO_NETWORK_CONNECTION:
|
||||
mServerStatusIcon = R.drawable.no_network;
|
||||
mServerStatusText = R.string.auth_no_net_conn_title;
|
||||
mServerStatusText = getResources().getString(R.string.auth_no_net_conn_title);
|
||||
break;
|
||||
|
||||
case SSL_RECOVERABLE_PEER_UNVERIFIED:
|
||||
mServerStatusText = R.string.auth_ssl_unverified_server_title;
|
||||
mServerStatusText = getResources().getString(R.string.auth_ssl_unverified_server_title);
|
||||
break;
|
||||
case BAD_OC_VERSION:
|
||||
mServerStatusText = R.string.auth_bad_oc_version_title;
|
||||
mServerStatusText = getResources().getString(R.string.auth_bad_oc_version_title);
|
||||
break;
|
||||
case WRONG_CONNECTION:
|
||||
mServerStatusText = R.string.auth_wrong_connection_title;
|
||||
mServerStatusText = getResources().getString(R.string.auth_wrong_connection_title);
|
||||
break;
|
||||
case TIMEOUT:
|
||||
mServerStatusText = R.string.auth_timeout_title;
|
||||
mServerStatusText = getResources().getString(R.string.auth_timeout_title);
|
||||
break;
|
||||
case INCORRECT_ADDRESS:
|
||||
mServerStatusText = R.string.auth_incorrect_address_title;
|
||||
mServerStatusText = getResources().getString(R.string.auth_incorrect_address_title);
|
||||
break;
|
||||
case SSL_ERROR:
|
||||
mServerStatusText = R.string.auth_ssl_general_error_title;
|
||||
mServerStatusText = getResources().getString(R.string.auth_ssl_general_error_title);
|
||||
break;
|
||||
case UNAUTHORIZED:
|
||||
mServerStatusText = R.string.auth_unauthorized;
|
||||
mServerStatusText = getResources().getString(R.string.auth_unauthorized);
|
||||
break;
|
||||
case HOST_NOT_AVAILABLE:
|
||||
mServerStatusText = R.string.auth_unknown_host_title;
|
||||
mServerStatusText = getResources().getString(R.string.auth_unknown_host_title);
|
||||
break;
|
||||
case INSTANCE_NOT_CONFIGURED:
|
||||
mServerStatusText = R.string.auth_not_configured_title;
|
||||
mServerStatusText = getResources().getString(R.string.auth_not_configured_title);
|
||||
break;
|
||||
case FILE_NOT_FOUND:
|
||||
mServerStatusText = R.string.auth_incorrect_path_title;
|
||||
mServerStatusText = getResources().getString(R.string.auth_incorrect_path_title);
|
||||
break;
|
||||
case OAUTH2_ERROR:
|
||||
mServerStatusText = R.string.auth_oauth_error;
|
||||
mServerStatusText = getResources().getString(R.string.auth_oauth_error);
|
||||
break;
|
||||
case OAUTH2_ERROR_ACCESS_DENIED:
|
||||
mServerStatusText = R.string.auth_oauth_error_access_denied;
|
||||
mServerStatusText = getResources().getString(R.string.auth_oauth_error_access_denied);
|
||||
break;
|
||||
case UNHANDLED_HTTP_CODE:
|
||||
case UNKNOWN_ERROR:
|
||||
mServerStatusText = R.string.auth_unknown_error_title;
|
||||
mServerStatusText = getResources().getString(R.string.auth_unknown_error_title);
|
||||
break;
|
||||
case OK_REDIRECT_TO_NON_SECURE_CONNECTION:
|
||||
mServerStatusIcon = R.drawable.ic_lock_open_white;
|
||||
mServerStatusText = R.string.auth_redirect_non_secure_connection_title;
|
||||
mServerStatusText = getResources().getString(R.string.auth_redirect_non_secure_connection_title);
|
||||
break;
|
||||
case MAINTENANCE_MODE:
|
||||
mServerStatusText = R.string.maintenance_mode;
|
||||
mServerStatusText = getResources().getString(R.string.maintenance_mode);
|
||||
break;
|
||||
default:
|
||||
mServerStatusText = 0;
|
||||
mServerStatusText = "";
|
||||
mServerStatusIcon = 0;
|
||||
break;
|
||||
}
|
||||
@@ -1589,85 +1594,48 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
||||
switch (result.getCode()) {
|
||||
case OK_SSL:
|
||||
mAuthStatusIcon = R.drawable.ic_lock_white;
|
||||
mAuthStatusText = R.string.auth_secure_connection;
|
||||
mAuthStatusText = getResources().getString(R.string.auth_secure_connection);
|
||||
break;
|
||||
|
||||
case OK_NO_SSL:
|
||||
case OK:
|
||||
if (mHostUrlInput.getText().toString().trim().toLowerCase().startsWith(HTTP_PROTOCOL)) {
|
||||
mAuthStatusText = R.string.auth_connection_established;
|
||||
mAuthStatusText = getResources().getString(R.string.auth_connection_established);
|
||||
mAuthStatusIcon = R.drawable.ic_ok;
|
||||
} else {
|
||||
mAuthStatusText = R.string.auth_nossl_plain_ok_title;
|
||||
mAuthStatusText = getResources().getString(R.string.auth_nossl_plain_ok_title);
|
||||
mAuthStatusIcon = R.drawable.ic_lock_open_white;
|
||||
}
|
||||
break;
|
||||
|
||||
case NO_NETWORK_CONNECTION:
|
||||
mAuthStatusIcon = R.drawable.no_network;
|
||||
mAuthStatusText = R.string.auth_no_net_conn_title;
|
||||
mAuthStatusText = getResources().getString(R.string.auth_no_net_conn_title);
|
||||
break;
|
||||
|
||||
case SSL_RECOVERABLE_PEER_UNVERIFIED:
|
||||
mAuthStatusText = R.string.auth_ssl_unverified_server_title;
|
||||
break;
|
||||
case BAD_OC_VERSION:
|
||||
mAuthStatusText = R.string.auth_bad_oc_version_title;
|
||||
break;
|
||||
case WRONG_CONNECTION:
|
||||
mAuthStatusText = R.string.auth_wrong_connection_title;
|
||||
mAuthStatusText = getResources().getString(R.string.auth_ssl_unverified_server_title);
|
||||
break;
|
||||
case TIMEOUT:
|
||||
mAuthStatusText = R.string.auth_timeout_title;
|
||||
break;
|
||||
case INCORRECT_ADDRESS:
|
||||
mAuthStatusText = R.string.auth_incorrect_address_title;
|
||||
break;
|
||||
case SSL_ERROR:
|
||||
mAuthStatusText = R.string.auth_ssl_general_error_title;
|
||||
break;
|
||||
case UNAUTHORIZED:
|
||||
mAuthStatusText = R.string.auth_unauthorized;
|
||||
mAuthStatusText = getResources().getString(R.string.auth_timeout_title);
|
||||
break;
|
||||
case HOST_NOT_AVAILABLE:
|
||||
mAuthStatusText = R.string.auth_unknown_host_title;
|
||||
break;
|
||||
case INSTANCE_NOT_CONFIGURED:
|
||||
mAuthStatusText = R.string.auth_not_configured_title;
|
||||
break;
|
||||
case FILE_NOT_FOUND:
|
||||
mAuthStatusText = R.string.auth_incorrect_path_title;
|
||||
break;
|
||||
case OAUTH2_ERROR:
|
||||
mAuthStatusText = R.string.auth_oauth_error;
|
||||
break;
|
||||
case OAUTH2_ERROR_ACCESS_DENIED:
|
||||
mAuthStatusText = R.string.auth_oauth_error_access_denied;
|
||||
break;
|
||||
case ACCOUNT_NOT_NEW:
|
||||
mAuthStatusText = R.string.auth_account_not_new;
|
||||
break;
|
||||
case ACCOUNT_NOT_THE_SAME:
|
||||
mAuthStatusText = R.string.auth_account_not_the_same;
|
||||
mAuthStatusText = getResources().getString(R.string.auth_unknown_host_title);
|
||||
break;
|
||||
case UNHANDLED_HTTP_CODE:
|
||||
case UNKNOWN_ERROR:
|
||||
mAuthStatusText = R.string.auth_unknown_error_title;
|
||||
break;
|
||||
default:
|
||||
mAuthStatusText = 0;
|
||||
mAuthStatusIcon = 0;
|
||||
mAuthStatusText = ErrorMessageAdapter.getErrorCauseMessage(result, null, getResources());
|
||||
}
|
||||
}
|
||||
|
||||
private void updateStatusIconFailUserName(int failedStatusText){
|
||||
mAuthStatusIcon = R.drawable.ic_alert;
|
||||
mAuthStatusText = failedStatusText;
|
||||
mAuthStatusText = getResources().getString(failedStatusText);
|
||||
}
|
||||
|
||||
private void updateServerStatusIconNoRegularAuth() {
|
||||
mServerStatusIcon = R.drawable.ic_alert;
|
||||
mServerStatusText = R.string.auth_can_not_auth_against_server;
|
||||
mServerStatusText = getResources().getString(R.string.auth_can_not_auth_against_server);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1772,7 +1740,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
||||
updateServerStatusIconAndText(result);
|
||||
showServerStatus();
|
||||
mAuthStatusIcon = 0;
|
||||
mAuthStatusText = 0;
|
||||
mAuthStatusText = "";
|
||||
if (!webViewLoginMethod) {
|
||||
showAuthStatus();
|
||||
|
||||
@@ -1990,7 +1958,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
||||
* to the last check on the ownCloud server.
|
||||
*/
|
||||
private void showServerStatus() {
|
||||
if (mServerStatusIcon == 0 && mServerStatusText == 0) {
|
||||
if (mServerStatusIcon == 0 && "".equals(mServerStatusText)) {
|
||||
mServerStatusView.setVisibility(View.INVISIBLE);
|
||||
} else {
|
||||
mServerStatusView.setText(mServerStatusText);
|
||||
@@ -2005,7 +1973,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
||||
* to the interactions with the OAuth authorization server.
|
||||
*/
|
||||
private void showAuthStatus() {
|
||||
if (mAuthStatusIcon == 0 && mAuthStatusText == 0) {
|
||||
if (mAuthStatusIcon == 0 && "".equals(mAuthStatusText)) {
|
||||
mAuthStatusView.setVisibility(View.INVISIBLE);
|
||||
} else {
|
||||
mAuthStatusView.setText(mAuthStatusText);
|
||||
@@ -2218,7 +2186,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
||||
@Override
|
||||
public void onFailedSavingCertificate() {
|
||||
dismissDialog(SAML_DIALOG_TAG);
|
||||
Toast.makeText(this, R.string.ssl_validator_not_saved, Toast.LENGTH_LONG).show();
|
||||
showSnackMessage(R.string.ssl_validator_not_saved);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -2296,11 +2264,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
||||
dialog.show(ft, CREDENTIALS_DIALOG_TAG);
|
||||
|
||||
if (!mIsFirstAuthAttempt) {
|
||||
Toast.makeText(
|
||||
getApplicationContext(),
|
||||
getText(R.string.saml_authentication_wrong_pass),
|
||||
Toast.LENGTH_LONG
|
||||
).show();
|
||||
showSnackMessage(R.string.saml_authentication_wrong_pass);
|
||||
} else {
|
||||
mIsFirstAuthAttempt = false;
|
||||
}
|
||||
@@ -2312,4 +2276,8 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
||||
public void doNegativeAuthenticatioDialogClick() {
|
||||
mIsFirstAuthAttempt = true;
|
||||
}
|
||||
|
||||
private void showSnackMessage(int messageResource) {
|
||||
Snackbar.make(findViewById(android.R.id.content), messageResource, Snackbar.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,7 @@ import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Build;
|
||||
import android.os.PowerManager;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.view.WindowManager;
|
||||
@@ -71,26 +72,22 @@ public class PassCodeManager {
|
||||
}
|
||||
|
||||
public void onActivityStarted(Activity activity) {
|
||||
if (!sExemptOfPasscodeActivites.contains(activity.getClass()) &&
|
||||
passCodeShouldBeRequested()
|
||||
){
|
||||
if (!sExemptOfPasscodeActivites.contains(activity.getClass()) && passCodeShouldBeRequested()) {
|
||||
|
||||
Intent i = new Intent(MainApp.getAppContext(), PassCodeActivity.class);
|
||||
i.setAction(PassCodeActivity.ACTION_CHECK);
|
||||
i.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
|
||||
activity.startActivity(i);
|
||||
|
||||
}
|
||||
|
||||
if (!sExemptOfPasscodeActivites.contains(activity.getClass()) &&
|
||||
fingerprintShouldBeRequested() && FingerprintActivity.isFingerprintReady(MainApp.getAppContext())
|
||||
){
|
||||
Build.VERSION.SDK_INT >= Build.VERSION_CODES.M &&
|
||||
fingerprintShouldBeRequested() && FingerprintActivity.isFingerprintReady(MainApp.getAppContext())) {
|
||||
|
||||
Intent i = new Intent(MainApp.getAppContext(), FingerprintActivity.class);
|
||||
i.setAction(PassCodeActivity.ACTION_CHECK);
|
||||
i.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
|
||||
activity.startActivity(i);
|
||||
|
||||
}
|
||||
|
||||
mVisibleActivitiesCounter++; // keep it AFTER passCodeShouldBeRequested was checked
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* ownCloud Android client application
|
||||
*
|
||||
* @author Tobias Kaminsky
|
||||
@@ -22,18 +22,22 @@
|
||||
package com.owncloud.android.datamodel;
|
||||
|
||||
import android.accounts.Account;
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Bitmap.CompressFormat;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Point;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.media.ThumbnailUtils;
|
||||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
import android.view.Display;
|
||||
import android.view.MenuItem;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.owncloud.android.MainApp;
|
||||
@@ -45,6 +49,7 @@ import com.owncloud.android.lib.common.OwnCloudClientManagerFactory;
|
||||
import com.owncloud.android.lib.common.utils.Log_OC;
|
||||
import com.owncloud.android.lib.resources.status.OwnCloudVersion;
|
||||
import com.owncloud.android.ui.adapter.DiskLruImageCache;
|
||||
import com.owncloud.android.ui.preview.PreviewImageFragment;
|
||||
import com.owncloud.android.utils.BitmapUtils;
|
||||
import com.owncloud.android.utils.DisplayUtils.AvatarGenerationListener;
|
||||
import com.owncloud.android.utils.FileStorageUtils;
|
||||
@@ -73,7 +78,7 @@ public class ThumbnailsCacheManager {
|
||||
private static DiskLruImageCache mThumbnailCache = null;
|
||||
private static boolean mThumbnailCacheStarting = true;
|
||||
|
||||
private static final int DISK_CACHE_SIZE = 1024 * 1024 * 10; // 10MB
|
||||
private static final int DISK_CACHE_SIZE = 1024 * 1024 * 200; // 200MB
|
||||
private static final CompressFormat mCompressFormat = CompressFormat.JPEG;
|
||||
private static final int mCompressQuality = 70;
|
||||
private static OwnCloudClient mClient = null;
|
||||
@@ -90,7 +95,7 @@ public class ThumbnailsCacheManager {
|
||||
R.drawable.file_movie
|
||||
);
|
||||
|
||||
|
||||
|
||||
public static class InitDiskCacheTask extends AsyncTask<File, Void, Void> {
|
||||
|
||||
@Override
|
||||
@@ -102,17 +107,17 @@ public class ThumbnailsCacheManager {
|
||||
try {
|
||||
// Check if media is mounted or storage is built-in, if so,
|
||||
// try and use external cache dir; otherwise use internal cache dir
|
||||
final String cachePath =
|
||||
MainApp.getAppContext().getExternalCacheDir().getPath() +
|
||||
File.separator + CACHE_FOLDER;
|
||||
Log_OC.d(TAG, "create dir: " + cachePath);
|
||||
final File diskCacheDir = new File(cachePath);
|
||||
mThumbnailCache = new DiskLruImageCache(
|
||||
diskCacheDir,
|
||||
DISK_CACHE_SIZE,
|
||||
mCompressFormat,
|
||||
mCompressQuality
|
||||
);
|
||||
File cacheDir = MainApp.getAppContext().getExternalCacheDir();
|
||||
|
||||
if (cacheDir != null) {
|
||||
String cachePath = cacheDir.getPath() + File.separator + CACHE_FOLDER;
|
||||
Log_OC.d(TAG, "create dir: " + cachePath);
|
||||
File diskCacheDir = new File(cachePath);
|
||||
mThumbnailCache = new DiskLruImageCache(diskCacheDir, DISK_CACHE_SIZE, mCompressFormat,
|
||||
mCompressQuality);
|
||||
} else {
|
||||
throw new Exception();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log_OC.d(TAG, "Thumbnail cache could not be opened ", e);
|
||||
mThumbnailCache = null;
|
||||
@@ -135,17 +140,32 @@ public class ThumbnailsCacheManager {
|
||||
return Math.round(r.getDimension(R.dimen.file_icon_size_grid));
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts dimension of screen as point
|
||||
*
|
||||
* @return Point
|
||||
*/
|
||||
private static Point getScreenDimension() {
|
||||
WindowManager wm = (WindowManager) MainApp.getAppContext().
|
||||
getSystemService(Context.WINDOW_SERVICE);
|
||||
Display display = wm.getDefaultDisplay();
|
||||
Point point = new Point();
|
||||
display.getSize(point);
|
||||
return point;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add thumbnail to cache
|
||||
* @param imageKey: thumb key
|
||||
* @param bitmap: image for extracting thumbnail
|
||||
* @param path: image path
|
||||
* @param px: thumbnail dp
|
||||
* @param pxW: thumbnail width in pixel
|
||||
* @param pxH: thumbnail height in pixel
|
||||
* @return Bitmap
|
||||
*/
|
||||
private static Bitmap addThumbnailToCache(String imageKey, Bitmap bitmap, String path, int px){
|
||||
private static Bitmap addThumbnailToCache(String imageKey, Bitmap bitmap, String path, int pxW, int pxH) {
|
||||
|
||||
Bitmap thumbnail = ThumbnailUtils.extractThumbnail(bitmap, px, px);
|
||||
Bitmap thumbnail = ThumbnailUtils.extractThumbnail(bitmap, pxW, pxH);
|
||||
|
||||
// Rotate image, obeying exif tag
|
||||
thumbnail = BitmapUtils.rotateImage(thumbnail,path);
|
||||
@@ -155,8 +175,8 @@ public class ThumbnailsCacheManager {
|
||||
|
||||
return thumbnail;
|
||||
}
|
||||
|
||||
public static void addBitmapToCache(String key, Bitmap bitmap) {
|
||||
|
||||
private static void addBitmapToCache(String key, Bitmap bitmap) {
|
||||
synchronized (mThumbnailsDiskCacheLock) {
|
||||
if (mThumbnailCache != null) {
|
||||
mThumbnailCache.put(key, bitmap);
|
||||
@@ -181,7 +201,176 @@ public class ThumbnailsCacheManager {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static class ThumbnailGenerationTask extends AsyncTask<Object, Void, Bitmap> {
|
||||
public static class ResizedImageGenerationTask extends AsyncTask<Object, Void, Bitmap> {
|
||||
private PreviewImageFragment previewImageFragment;
|
||||
private FileDataStorageManager storageManager;
|
||||
private Account account;
|
||||
private WeakReference<ImageView> imageViewReference;
|
||||
private OCFile file;
|
||||
|
||||
|
||||
public ResizedImageGenerationTask(PreviewImageFragment previewImageFragment, ImageView imageView,
|
||||
FileDataStorageManager storageManager, Account account)
|
||||
throws IllegalArgumentException {
|
||||
this.previewImageFragment = previewImageFragment;
|
||||
imageViewReference = new WeakReference<>(imageView);
|
||||
this.storageManager = storageManager;
|
||||
this.account = account;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Bitmap doInBackground(Object... params) {
|
||||
Bitmap thumbnail = null;
|
||||
|
||||
file = (OCFile) params[0];
|
||||
|
||||
try {
|
||||
if (account != null) {
|
||||
OwnCloudAccount ocAccount = new OwnCloudAccount(account, MainApp.getAppContext());
|
||||
mClient = OwnCloudClientManagerFactory.getDefaultSingleton().getClientFor(ocAccount,
|
||||
MainApp.getAppContext());
|
||||
}
|
||||
|
||||
thumbnail = doResizedImageInBackground();
|
||||
|
||||
if (MimeTypeUtil.isVideo(file) && thumbnail != null) {
|
||||
thumbnail = addVideoOverlay(thumbnail);
|
||||
}
|
||||
|
||||
} catch (OutOfMemoryError oome) {
|
||||
System.gc();
|
||||
} catch (Throwable t) {
|
||||
// the app should never break due to a problem with thumbnails
|
||||
Log_OC.e(TAG, "Generation of thumbnail for " + file + " failed", t);
|
||||
}
|
||||
|
||||
return thumbnail;
|
||||
}
|
||||
|
||||
private Bitmap doResizedImageInBackground() {
|
||||
Bitmap thumbnail;
|
||||
|
||||
String imageKey = "r" + String.valueOf(file.getRemoteId());
|
||||
|
||||
// Check disk cache in background thread
|
||||
thumbnail = getBitmapFromDiskCache(imageKey);
|
||||
|
||||
// Not found in disk cache
|
||||
if (thumbnail == null || file.needsUpdateThumbnail()) {
|
||||
Point p = getScreenDimension();
|
||||
int pxW = p.x;
|
||||
int pxH = p.y;
|
||||
|
||||
if (file.isDown()) {
|
||||
Bitmap bitmap = BitmapUtils.decodeSampledBitmapFromFile(
|
||||
file.getStoragePath(), pxW, pxH);
|
||||
|
||||
if (bitmap != null) {
|
||||
// Handle PNG
|
||||
if (file.getMimetype().equalsIgnoreCase("image/png")) {
|
||||
bitmap = handlePNG(bitmap, pxW);
|
||||
}
|
||||
|
||||
thumbnail = addThumbnailToCache(imageKey, bitmap, file.getStoragePath(), pxW, pxH);
|
||||
|
||||
file.setNeedsUpdateThumbnail(false);
|
||||
storageManager.saveFile(file);
|
||||
}
|
||||
|
||||
} else {
|
||||
// Download thumbnail from server
|
||||
OwnCloudVersion serverOCVersion = AccountUtils.getServerVersion(account);
|
||||
if (mClient != null && serverOCVersion != null) {
|
||||
if (serverOCVersion.supportsRemoteThumbnails()) {
|
||||
GetMethod getMethod = null;
|
||||
try {
|
||||
// resized image via gallery app
|
||||
String uri = mClient.getBaseUri() + "" +
|
||||
"/index.php/apps/gallery/api/preview/" +
|
||||
Integer.parseInt(file.getRemoteId().substring(0, 8)) +
|
||||
"/" + pxW + "/" + pxH;
|
||||
Log_OC.d(TAG, "generate resizedImage: " + file.getFileName() +
|
||||
" URI: " + uri);
|
||||
getMethod = new GetMethod(uri);
|
||||
getMethod.setRequestHeader("Cookie",
|
||||
"nc_sameSiteCookielax=true;nc_sameSiteCookiestrict=true");
|
||||
int status = mClient.executeMethod(getMethod);
|
||||
if (status == HttpStatus.SC_OK) {
|
||||
InputStream inputStream = getMethod.getResponseBodyAsStream();
|
||||
thumbnail = BitmapFactory.decodeStream(inputStream);
|
||||
} else {
|
||||
mClient.exhaustResponse(getMethod.getResponseBodyAsStream());
|
||||
}
|
||||
|
||||
// Handle PNG
|
||||
if (file.getMimetype().equalsIgnoreCase("image/png")) {
|
||||
thumbnail = handlePNG(thumbnail, pxW);
|
||||
}
|
||||
|
||||
// Add thumbnail to cache
|
||||
if (thumbnail != null) {
|
||||
Log_OC.d(TAG, "add thumbnail to cache: " + file.getFileName());
|
||||
addBitmapToCache(imageKey, thumbnail);
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
Log_OC.d(TAG, e.getMessage(), e);
|
||||
} finally {
|
||||
if (getMethod != null) {
|
||||
getMethod.releaseConnection();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Log_OC.d(TAG, "Server too old");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return thumbnail;
|
||||
|
||||
}
|
||||
|
||||
protected void onPostExecute(Bitmap bitmap) {
|
||||
if (imageViewReference != null) {
|
||||
final ImageView imageView = imageViewReference.get();
|
||||
|
||||
if (bitmap != null) {
|
||||
final ResizedImageGenerationTask bitmapWorkerTask = getResizedImageGenerationWorkerTask(imageView);
|
||||
|
||||
if (this == bitmapWorkerTask) {
|
||||
String tagId = String.valueOf(file.getFileId());
|
||||
|
||||
if (String.valueOf(imageView.getTag()).equals(tagId)) {
|
||||
imageView.setImageBitmap(bitmap);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
previewImageFragment.setErrorPreviewMessage();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static class ThumbnailGenerationTaskObject {
|
||||
private Object file;
|
||||
private String imageKey;
|
||||
|
||||
public ThumbnailGenerationTaskObject(Object file, String imageKey) {
|
||||
this.file = file;
|
||||
this.imageKey = imageKey;
|
||||
}
|
||||
|
||||
private Object getFile() {
|
||||
return file;
|
||||
}
|
||||
|
||||
private String getImageKey() {
|
||||
return imageKey;
|
||||
}
|
||||
}
|
||||
|
||||
public static class ThumbnailGenerationTask extends AsyncTask<ThumbnailGenerationTaskObject, Void, Bitmap> {
|
||||
private final WeakReference<ImageView> mImageViewReference;
|
||||
private static Account mAccount;
|
||||
private ArrayList<ThumbnailGenerationTask> mAsyncTasks = null;
|
||||
@@ -199,7 +388,7 @@ public class ThumbnailsCacheManager {
|
||||
Account account, ArrayList<ThumbnailGenerationTask> asyncTasks)
|
||||
throws IllegalArgumentException {
|
||||
// Use a WeakReference to ensure the ImageView can be garbage collected
|
||||
mImageViewReference = new WeakReference<ImageView>(imageView);
|
||||
mImageViewReference = new WeakReference<>(imageView);
|
||||
if (storageManager == null) {
|
||||
throw new IllegalArgumentException("storageManager must not be NULL");
|
||||
}
|
||||
@@ -223,12 +412,12 @@ public class ThumbnailsCacheManager {
|
||||
|
||||
public ThumbnailGenerationTask(ImageView imageView) {
|
||||
// Use a WeakReference to ensure the ImageView can be garbage collected
|
||||
mImageViewReference = new WeakReference<ImageView>(imageView);
|
||||
mImageViewReference = new WeakReference<>(imageView);
|
||||
}
|
||||
|
||||
@SuppressFBWarnings("Dm")
|
||||
@Override
|
||||
protected Bitmap doInBackground(Object... params) {
|
||||
protected Bitmap doInBackground(ThumbnailGenerationTaskObject... params) {
|
||||
Bitmap thumbnail = null;
|
||||
|
||||
try {
|
||||
@@ -241,18 +430,17 @@ public class ThumbnailsCacheManager {
|
||||
getClientFor(ocAccount, MainApp.getAppContext());
|
||||
}
|
||||
|
||||
mFile = params[0];
|
||||
if (params.length == 2) {
|
||||
mImageKey = (String) params[1];
|
||||
}
|
||||
ThumbnailGenerationTaskObject object = params[0];
|
||||
mFile = object.getFile();
|
||||
mImageKey = object.getImageKey();
|
||||
|
||||
if (mFile instanceof OCFile) {
|
||||
thumbnail = doOCFileInBackground();
|
||||
thumbnail = doThumbnailFromOCFileInBackground();
|
||||
|
||||
if (MimeTypeUtil.isVideo((OCFile) mFile) && thumbnail != null) {
|
||||
thumbnail = addVideoOverlay(thumbnail);
|
||||
}
|
||||
} else if (mFile instanceof File) {
|
||||
} else if (mFile instanceof File) {
|
||||
thumbnail = doFileInBackground();
|
||||
|
||||
String url = ((File) mFile).getAbsolutePath();
|
||||
@@ -296,42 +484,31 @@ public class ThumbnailsCacheManager {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts size of file icon from dp to pixel
|
||||
* @return int
|
||||
*/
|
||||
private int getThumbnailDimension(){
|
||||
// Converts dp to pixel
|
||||
Resources r = MainApp.getAppContext().getResources();
|
||||
Double d = Math.pow(2,Math.floor(Math.log(r.getDimension(R.dimen.file_icon_size_grid))/Math.log(2)));
|
||||
return d.intValue();
|
||||
}
|
||||
|
||||
private Bitmap doOCFileInBackground() {
|
||||
OCFile file = (OCFile)mFile;
|
||||
|
||||
final String imageKey = String.valueOf(file.getRemoteId());
|
||||
private Bitmap doThumbnailFromOCFileInBackground() {
|
||||
Bitmap thumbnail;
|
||||
OCFile file = (OCFile) mFile;
|
||||
String imageKey = "t" + String.valueOf(file.getRemoteId());
|
||||
|
||||
// Check disk cache in background thread
|
||||
Bitmap thumbnail = getBitmapFromDiskCache(imageKey);
|
||||
thumbnail = getBitmapFromDiskCache(imageKey);
|
||||
|
||||
// Not found in disk cache
|
||||
if (thumbnail == null || file.needsUpdateThumbnail()) {
|
||||
|
||||
int px = getThumbnailDimension();
|
||||
int pxW;
|
||||
int pxH;
|
||||
pxW = pxH = getThumbnailDimension();
|
||||
|
||||
if (file.isDown()) {
|
||||
Bitmap temp = BitmapUtils.decodeSampledBitmapFromFile(
|
||||
file.getStoragePath(), px, px);
|
||||
Bitmap bitmap = ThumbnailUtils.extractThumbnail(temp, px, px);
|
||||
Bitmap bitmap = BitmapUtils.decodeSampledBitmapFromFile(
|
||||
file.getStoragePath(), pxW, pxH);
|
||||
|
||||
if (bitmap != null) {
|
||||
// Handle PNG
|
||||
if (file.getMimetype().equalsIgnoreCase("image/png")) {
|
||||
bitmap = handlePNG(bitmap, px);
|
||||
bitmap = handlePNG(bitmap, pxW);
|
||||
}
|
||||
|
||||
thumbnail = addThumbnailToCache(imageKey, bitmap, file.getStoragePath(), px);
|
||||
thumbnail = addThumbnailToCache(imageKey, bitmap, file.getStoragePath(), pxW, pxH);
|
||||
|
||||
file.setNeedsUpdateThumbnail(false);
|
||||
mStorageManager.saveFile(file);
|
||||
@@ -344,10 +521,12 @@ public class ThumbnailsCacheManager {
|
||||
if (serverOCVersion.supportsRemoteThumbnails()) {
|
||||
getMethod = null;
|
||||
try {
|
||||
// thumbnail
|
||||
String uri = mClient.getBaseUri() + "" +
|
||||
"/index.php/apps/files/api/v1/thumbnail/" +
|
||||
px + "/" + px + Uri.encode(file.getRemotePath(), "/");
|
||||
Log_OC.d("Thumbnail", "URI: " + uri);
|
||||
pxW + "/" + pxH + Uri.encode(file.getRemotePath(), "/");
|
||||
Log_OC.d(TAG, "generate thumbnail: " + file.getFileName() +
|
||||
" URI: " + uri);
|
||||
getMethod = new GetMethod(uri);
|
||||
getMethod.setRequestHeader("Cookie",
|
||||
"nc_sameSiteCookielax=true;nc_sameSiteCookiestrict=true");
|
||||
@@ -355,20 +534,22 @@ public class ThumbnailsCacheManager {
|
||||
if (status == HttpStatus.SC_OK) {
|
||||
InputStream inputStream = getMethod.getResponseBodyAsStream();
|
||||
Bitmap bitmap = BitmapFactory.decodeStream(inputStream);
|
||||
thumbnail = ThumbnailUtils.extractThumbnail(bitmap, px, px);
|
||||
|
||||
// Handle PNG
|
||||
if (file.getMimetype().equalsIgnoreCase("image/png")) {
|
||||
thumbnail = handlePNG(thumbnail, px);
|
||||
}
|
||||
|
||||
// Add thumbnail to cache
|
||||
if (thumbnail != null) {
|
||||
addBitmapToCache(imageKey, thumbnail);
|
||||
}
|
||||
thumbnail = ThumbnailUtils.extractThumbnail(bitmap, pxW, pxH);
|
||||
} else {
|
||||
mClient.exhaustResponse(getMethod.getResponseBodyAsStream());
|
||||
}
|
||||
|
||||
// Handle PNG
|
||||
if (file.getMimetype().equalsIgnoreCase("image/png")) {
|
||||
thumbnail = handlePNG(thumbnail, pxW);
|
||||
}
|
||||
|
||||
// Add thumbnail to cache
|
||||
if (thumbnail != null) {
|
||||
Log_OC.d(TAG, "add thumbnail to cache: " + file.getFileName());
|
||||
addBitmapToCache(imageKey, thumbnail);
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
Log_OC.d(TAG, e.getMessage(), e);
|
||||
} finally {
|
||||
@@ -387,6 +568,18 @@ public class ThumbnailsCacheManager {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts size of file icon from dp to pixel
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
private int getThumbnailDimension() {
|
||||
// Converts dp to pixel
|
||||
Resources r = MainApp.getAppContext().getResources();
|
||||
Double d = Math.pow(2, Math.floor(Math.log(r.getDimension(R.dimen.file_icon_size_grid)) / Math.log(2)));
|
||||
return d.intValue();
|
||||
}
|
||||
|
||||
private Bitmap doFileInBackground() {
|
||||
File file = (File)mFile;
|
||||
|
||||
@@ -397,19 +590,22 @@ public class ThumbnailsCacheManager {
|
||||
imageKey = String.valueOf(file.hashCode());
|
||||
}
|
||||
|
||||
// local file should always generate a thumbnail
|
||||
mImageKey = "t" + mImageKey;
|
||||
|
||||
// Check disk cache in background thread
|
||||
Bitmap thumbnail = getBitmapFromDiskCache(imageKey);
|
||||
|
||||
// Not found in disk cache
|
||||
if (thumbnail == null) {
|
||||
int pxW;
|
||||
int pxH;
|
||||
pxW = pxH = getThumbnailDimension();
|
||||
|
||||
int px = getThumbnailDimension();
|
||||
|
||||
Bitmap bitmap = BitmapUtils.decodeSampledBitmapFromFile(
|
||||
file.getAbsolutePath(), px, px);
|
||||
Bitmap bitmap = BitmapUtils.decodeSampledBitmapFromFile(file.getAbsolutePath(), pxW, pxH);
|
||||
|
||||
if (bitmap != null) {
|
||||
thumbnail = addThumbnailToCache(imageKey, bitmap, file.getPath(), px);
|
||||
thumbnail = addThumbnailToCache(imageKey, bitmap, file.getPath(), pxW, pxH);
|
||||
}
|
||||
}
|
||||
return thumbnail;
|
||||
@@ -502,7 +698,7 @@ public class ThumbnailsCacheManager {
|
||||
Bitmap bitmap = BitmapUtils.decodeSampledBitmapFromFile(file.getAbsolutePath(), px, px);
|
||||
|
||||
if (bitmap != null) {
|
||||
thumbnail = addThumbnailToCache(imageKey, bitmap, file.getPath(), px);
|
||||
thumbnail = addThumbnailToCache(imageKey, bitmap, file.getPath(), px, px);
|
||||
}
|
||||
}
|
||||
return thumbnail;
|
||||
@@ -563,27 +759,6 @@ public class ThumbnailsCacheManager {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add thumbnail to cache
|
||||
* @param imageKey: thumb key
|
||||
* @param bitmap: image for extracting thumbnail
|
||||
* @param path: image path
|
||||
* @param px: thumbnail dp
|
||||
* @return Bitmap
|
||||
*/
|
||||
private Bitmap addThumbnailToCache(String imageKey, Bitmap bitmap, String path, int px){
|
||||
|
||||
Bitmap thumbnail = ThumbnailUtils.extractThumbnail(bitmap, px, px);
|
||||
|
||||
// Rotate image, obeying exif tag
|
||||
thumbnail = BitmapUtils.rotateImage(thumbnail,path);
|
||||
|
||||
// Add thumbnail to cache
|
||||
addBitmapToCache(imageKey, thumbnail);
|
||||
|
||||
return thumbnail;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts size of file icon from dp to pixel
|
||||
* @return int
|
||||
@@ -676,7 +851,7 @@ public class ThumbnailsCacheManager {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean cancelPotentialAvatarWork(Object file, ImageView imageView) {
|
||||
private static boolean cancelPotentialAvatarWork(Object file, ImageView imageView) {
|
||||
final AvatarGenerationTask avatarWorkerTask = getAvatarWorkerTask(imageView);
|
||||
|
||||
if (avatarWorkerTask != null) {
|
||||
@@ -695,7 +870,7 @@ public class ThumbnailsCacheManager {
|
||||
return true;
|
||||
}
|
||||
|
||||
public static boolean cancelPotentialAvatarWork(Object file, MenuItem menuItem) {
|
||||
private static boolean cancelPotentialAvatarWork(Object file, MenuItem menuItem) {
|
||||
final AvatarGenerationTask avatarWorkerTask = getAvatarWorkerTask(menuItem);
|
||||
|
||||
if (avatarWorkerTask != null) {
|
||||
@@ -714,7 +889,7 @@ public class ThumbnailsCacheManager {
|
||||
return true;
|
||||
}
|
||||
|
||||
public static ThumbnailGenerationTask getBitmapWorkerTask(ImageView imageView) {
|
||||
private static ThumbnailGenerationTask getBitmapWorkerTask(ImageView imageView) {
|
||||
if (imageView != null) {
|
||||
final Drawable drawable = imageView.getDrawable();
|
||||
if (drawable instanceof AsyncThumbnailDrawable) {
|
||||
@@ -725,6 +900,17 @@ public class ThumbnailsCacheManager {
|
||||
return null;
|
||||
}
|
||||
|
||||
private static ResizedImageGenerationTask getResizedImageGenerationWorkerTask(ImageView imageView) {
|
||||
if (imageView != null) {
|
||||
final Drawable drawable = imageView.getDrawable();
|
||||
if (drawable instanceof AsyncResizedImageDrawable) {
|
||||
final AsyncResizedImageDrawable asyncDrawable = (AsyncResizedImageDrawable) drawable;
|
||||
return asyncDrawable.getBitmapWorkerTask();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static Bitmap addVideoOverlay(Bitmap thumbnail){
|
||||
Bitmap playButton = BitmapFactory.decodeResource(MainApp.getAppContext().getResources(),
|
||||
R.drawable.view_play);
|
||||
@@ -769,7 +955,7 @@ public class ThumbnailsCacheManager {
|
||||
return resultBitmap;
|
||||
}
|
||||
|
||||
public static AvatarGenerationTask getAvatarWorkerTask(Object callContext) {
|
||||
private static AvatarGenerationTask getAvatarWorkerTask(Object callContext) {
|
||||
if (callContext instanceof ImageView) {
|
||||
return getAvatarWorkerTask(((ImageView)callContext).getDrawable());
|
||||
} else if (callContext instanceof MenuItem) {
|
||||
@@ -798,7 +984,20 @@ public class ThumbnailsCacheManager {
|
||||
bitmapWorkerTaskReference = new WeakReference<>(bitmapWorkerTask);
|
||||
}
|
||||
|
||||
public ThumbnailGenerationTask getBitmapWorkerTask() {
|
||||
private ThumbnailGenerationTask getBitmapWorkerTask() {
|
||||
return bitmapWorkerTaskReference.get();
|
||||
}
|
||||
}
|
||||
|
||||
public static class AsyncResizedImageDrawable extends BitmapDrawable {
|
||||
private final WeakReference<ResizedImageGenerationTask> bitmapWorkerTaskReference;
|
||||
|
||||
public AsyncResizedImageDrawable(Resources res, Bitmap bitmap, ResizedImageGenerationTask bitmapWorkerTask) {
|
||||
super(res, bitmap);
|
||||
bitmapWorkerTaskReference = new WeakReference<>(bitmapWorkerTask);
|
||||
}
|
||||
|
||||
private ResizedImageGenerationTask getBitmapWorkerTask() {
|
||||
return bitmapWorkerTaskReference.get();
|
||||
}
|
||||
}
|
||||
@@ -806,17 +1005,12 @@ public class ThumbnailsCacheManager {
|
||||
public static class AsyncMediaThumbnailDrawable extends BitmapDrawable {
|
||||
private final WeakReference<MediaThumbnailGenerationTask> bitmapWorkerTaskReference;
|
||||
|
||||
public AsyncMediaThumbnailDrawable(
|
||||
Resources res, Bitmap bitmap, MediaThumbnailGenerationTask bitmapWorkerTask
|
||||
) {
|
||||
public AsyncMediaThumbnailDrawable(Resources res, Bitmap bitmap,
|
||||
MediaThumbnailGenerationTask bitmapWorkerTask) {
|
||||
|
||||
super(res, bitmap);
|
||||
bitmapWorkerTaskReference = new WeakReference<>(bitmapWorkerTask);
|
||||
}
|
||||
|
||||
public MediaThumbnailGenerationTask getBitmapWorkerTask() {
|
||||
return bitmapWorkerTaskReference.get();
|
||||
}
|
||||
}
|
||||
|
||||
public static class AsyncAvatarDrawable extends BitmapDrawable {
|
||||
@@ -827,11 +1021,10 @@ public class ThumbnailsCacheManager {
|
||||
) {
|
||||
|
||||
super(res, bitmap);
|
||||
avatarWorkerTaskReference =
|
||||
new WeakReference<AvatarGenerationTask>(avatarWorkerTask);
|
||||
avatarWorkerTaskReference = new WeakReference<>(avatarWorkerTask);
|
||||
}
|
||||
|
||||
public AvatarGenerationTask getAvatarWorkerTask() {
|
||||
private AvatarGenerationTask getAvatarWorkerTask() {
|
||||
return avatarWorkerTaskReference.get();
|
||||
}
|
||||
}
|
||||
@@ -848,4 +1041,8 @@ public class ThumbnailsCacheManager {
|
||||
|
||||
return resultBitmap;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,18 +1,18 @@
|
||||
/**
|
||||
/*
|
||||
* ownCloud Android client application
|
||||
*
|
||||
* @author David A. Velasco
|
||||
* Copyright (C) 2016 ownCloud Inc.
|
||||
* <p/>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2,
|
||||
* as published by the Free Software Foundation.
|
||||
* <p/>
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* <p/>
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@@ -35,7 +35,8 @@ public enum UploadResult {
|
||||
DELAYED_FOR_WIFI(9),
|
||||
SERVICE_INTERRUPTED(10),
|
||||
DELAYED_FOR_CHARGING(11),
|
||||
MAINTENANCE_MODE(12);
|
||||
MAINTENANCE_MODE(12),
|
||||
SSL_RECOVERABLE_PEER_UNVERIFIED(13);
|
||||
|
||||
private final int value;
|
||||
|
||||
@@ -77,6 +78,8 @@ public enum UploadResult {
|
||||
return DELAYED_FOR_CHARGING;
|
||||
case 12:
|
||||
return MAINTENANCE_MODE;
|
||||
case 13:
|
||||
return SSL_RECOVERABLE_PEER_UNVERIFIED;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -92,7 +95,6 @@ public enum UploadResult {
|
||||
case WRONG_CONNECTION:
|
||||
case INCORRECT_ADDRESS:
|
||||
case SSL_ERROR:
|
||||
case SSL_RECOVERABLE_PEER_UNVERIFIED:
|
||||
return NETWORK_CONNECTION;
|
||||
case ACCOUNT_EXCEPTION:
|
||||
case UNAUTHORIZED:
|
||||
@@ -113,13 +115,15 @@ public enum UploadResult {
|
||||
return DELAYED_FOR_WIFI;
|
||||
case DELAYED_FOR_CHARGING:
|
||||
return DELAYED_FOR_CHARGING;
|
||||
case MAINTENANCE_MODE:
|
||||
return MAINTENANCE_MODE;
|
||||
case SSL_RECOVERABLE_PEER_UNVERIFIED:
|
||||
return SSL_RECOVERABLE_PEER_UNVERIFIED;
|
||||
case UNKNOWN_ERROR:
|
||||
if (result.getException() instanceof java.io.FileNotFoundException) {
|
||||
return FILE_ERROR;
|
||||
}
|
||||
return UNKNOWN;
|
||||
case MAINTENANCE_MODE:
|
||||
return MAINTENANCE_MODE;
|
||||
default:
|
||||
return UNKNOWN;
|
||||
}
|
||||
|
||||
@@ -980,11 +980,10 @@ public class FileUploader extends Service
|
||||
final ThumbnailsCacheManager.ThumbnailGenerationTask task =
|
||||
new ThumbnailsCacheManager.ThumbnailGenerationTask(mStorageManager, mCurrentAccount);
|
||||
|
||||
Object[] params = new Object[2];
|
||||
params[0] = new File(mCurrentUpload.getOriginalStoragePath());
|
||||
params[1] = mCurrentUpload.getFile().getRemoteId();
|
||||
File file = new File(mCurrentUpload.getOriginalStoragePath());
|
||||
String remoteId = mCurrentUpload.getFile().getRemoteId();
|
||||
|
||||
task.execute(params);
|
||||
task.execute(new ThumbnailsCacheManager.ThumbnailGenerationTaskObject(file, remoteId));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -224,7 +224,7 @@ public class MediaService extends Service implements OnCompletionListener, OnPre
|
||||
super.onCreate();
|
||||
Log_OC.d(TAG, "Creating ownCloud media service");
|
||||
|
||||
mWifiLock = ((WifiManager) getSystemService(Context.WIFI_SERVICE)).
|
||||
mWifiLock = ((WifiManager) getApplicationContext().getSystemService(Context.WIFI_SERVICE)).
|
||||
createWifiLock(WifiManager.WIFI_MODE_FULL, MEDIA_WIFI_LOCK_TAG);
|
||||
|
||||
mNotificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
|
||||
@@ -499,7 +499,7 @@ public class MediaService extends Service implements OnCompletionListener, OnPre
|
||||
|
||||
/** Called when media player is done playing current song. */
|
||||
public void onCompletion(MediaPlayer player) {
|
||||
Toast.makeText(this, String.format(getString(R.string.media_event_done, mFile.getFileName())), Toast.LENGTH_LONG).show();
|
||||
Toast.makeText(this, String.format(getString(R.string.media_event_done), mFile.getFileName()), Toast.LENGTH_LONG).show();
|
||||
if (mMediaController != null) {
|
||||
// somebody is still bound to the service
|
||||
player.seekTo(0);
|
||||
|
||||
@@ -118,16 +118,15 @@ public class DetectAuthenticationMethodOperation extends RemoteOperation {
|
||||
Log_OC.d(TAG, "Authentication method found: " + authenticationMethodToString(authMethod));
|
||||
|
||||
if (!authMethod.equals(AuthenticationMethod.UNKNOWN)) {
|
||||
result = new RemoteOperationResult(true, result.getHttpCode(), null);
|
||||
result = new RemoteOperationResult(true, result.getHttpCode(), result.getHttpPhrase(), null);
|
||||
}
|
||||
ArrayList<Object> data = new ArrayList<Object>();
|
||||
ArrayList<Object> data = new ArrayList<>();
|
||||
data.add(authMethod);
|
||||
result.setData(data);
|
||||
return result; // same result instance, so that other errors
|
||||
// can be handled by the caller transparently
|
||||
}
|
||||
|
||||
|
||||
private String authenticationMethodToString(AuthenticationMethod value) {
|
||||
switch (value){
|
||||
case NONE:
|
||||
|
||||
@@ -100,15 +100,15 @@ public class OAuth2GetAccessToken extends RemoteOperation {
|
||||
result = new RemoteOperationResult(ResultCode.OAUTH2_ERROR);
|
||||
|
||||
} else {
|
||||
result = new RemoteOperationResult(true, status, postMethod.getResponseHeaders());
|
||||
ArrayList<Object> data = new ArrayList<Object>();
|
||||
result = new RemoteOperationResult(true, postMethod);
|
||||
ArrayList<Object> data = new ArrayList<>();
|
||||
data.add(mResultTokenMap);
|
||||
result.setData(data);
|
||||
}
|
||||
|
||||
} else {
|
||||
result = new RemoteOperationResult(false, postMethod);
|
||||
client.exhaustResponse(postMethod.getResponseBodyAsStream());
|
||||
result = new RemoteOperationResult(false, status, postMethod.getResponseHeaders());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -64,22 +64,22 @@ public class UpdateOCVersionOperation extends RemoteOperation {
|
||||
String statUrl = accountMngr.getUserData(mAccount, Constants.KEY_OC_BASE_URL);
|
||||
statUrl += AccountUtils.STATUS_PATH;
|
||||
RemoteOperationResult result = null;
|
||||
GetMethod get = null;
|
||||
GetMethod getMethod = null;
|
||||
|
||||
String webDav = client.getWebdavUri().toString();
|
||||
|
||||
try {
|
||||
get = new GetMethod(statUrl);
|
||||
int status = client.executeMethod(get);
|
||||
getMethod = new GetMethod(statUrl);
|
||||
int status = client.executeMethod(getMethod);
|
||||
if (status != HttpStatus.SC_OK) {
|
||||
client.exhaustResponse(get.getResponseBodyAsStream());
|
||||
result = new RemoteOperationResult(false, status, get.getResponseHeaders());
|
||||
result = new RemoteOperationResult(false, getMethod);
|
||||
client.exhaustResponse(getMethod.getResponseBodyAsStream());
|
||||
|
||||
} else {
|
||||
String response = get.getResponseBodyAsString();
|
||||
String response = getMethod.getResponseBodyAsString();
|
||||
if (response != null) {
|
||||
JSONObject json = new JSONObject(response);
|
||||
if (json != null && json.getString("version") != null) {
|
||||
if (json.getString("version") != null) {
|
||||
|
||||
String version = json.getString("version");
|
||||
mOwnCloudVersion = new OwnCloudVersion(version);
|
||||
@@ -112,8 +112,8 @@ public class UpdateOCVersionOperation extends RemoteOperation {
|
||||
Log_OC.e(TAG, "Check for update of ownCloud server version at " + webDav + ": " + result.getLogMessage(), e);
|
||||
|
||||
} finally {
|
||||
if (get != null) {
|
||||
get.releaseConnection();
|
||||
if (getMethod != null) {
|
||||
getMethod.releaseConnection();
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
||||
@@ -448,7 +448,13 @@ public class UploadFileOperation extends SyncOperation {
|
||||
|
||||
|
||||
} else if (mLocalBehaviour == FileUploader.LOCAL_BEHAVIOUR_DELETE) {
|
||||
originalFile.delete();
|
||||
try {
|
||||
if (!originalFile.delete()) {
|
||||
Log_OC.e(TAG, "Deletion of " + originalFile.getName() + " failed!");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log_OC.e(TAG, "Deletion of " + originalFile.getName() + " failed with " + e.getMessage());
|
||||
}
|
||||
getStorageManager().deleteFileInMediaScan(originalFile.getAbsolutePath());
|
||||
saveUploadedFile(client);
|
||||
} else {
|
||||
@@ -848,7 +854,7 @@ public class UploadFileOperation extends SyncOperation {
|
||||
// generate new Thumbnail
|
||||
final ThumbnailsCacheManager.ThumbnailGenerationTask task =
|
||||
new ThumbnailsCacheManager.ThumbnailGenerationTask(getStorageManager(), mAccount);
|
||||
task.execute(file);
|
||||
task.execute(new ThumbnailsCacheManager.ThumbnailGenerationTaskObject(file, file.getRemoteId()));
|
||||
}
|
||||
|
||||
private void updateOCFile(OCFile file, RemoteFile remoteFile) {
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
/*
|
||||
* ownCloud Android client application
|
||||
*
|
||||
* Copyright (C) 2016 Tobias Kaminsky
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 3 of the License, or any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public
|
||||
* License along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.owncloud.android.providers;
|
||||
|
||||
import android.accounts.Account;
|
||||
import android.content.ContentProvider;
|
||||
import android.content.ContentValues;
|
||||
import android.database.Cursor;
|
||||
import android.database.MatrixCursor;
|
||||
import android.graphics.Bitmap;
|
||||
import android.net.Uri;
|
||||
import android.os.ParcelFileDescriptor;
|
||||
import android.provider.OpenableColumns;
|
||||
|
||||
import com.owncloud.android.MainApp;
|
||||
import com.owncloud.android.authentication.AccountUtils;
|
||||
import com.owncloud.android.datamodel.FileDataStorageManager;
|
||||
import com.owncloud.android.datamodel.OCFile;
|
||||
import com.owncloud.android.datamodel.ThumbnailsCacheManager;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
public class DiskLruImageCacheFileProvider extends ContentProvider {
|
||||
public static final String AUTHORITY = "org.nextcloud.imageCache.provider";
|
||||
|
||||
@Override
|
||||
public boolean onCreate() {
|
||||
return true;
|
||||
}
|
||||
|
||||
private OCFile getFile(Uri uri) {
|
||||
Account account = AccountUtils.getCurrentOwnCloudAccount(MainApp.getAppContext());
|
||||
FileDataStorageManager fileDataStorageManager = new FileDataStorageManager(account,
|
||||
MainApp.getAppContext().getContentResolver());
|
||||
|
||||
return fileDataStorageManager.getFileByPath(uri.getPath());
|
||||
}
|
||||
|
||||
@Override
|
||||
public ParcelFileDescriptor openFile(Uri uri, String mode) throws FileNotFoundException {
|
||||
OCFile ocFile = getFile(uri);
|
||||
|
||||
Bitmap thumbnail = ThumbnailsCacheManager.getBitmapFromDiskCache(
|
||||
String.valueOf("r" + ocFile.getRemoteId()));
|
||||
|
||||
// create a file to write bitmap data
|
||||
File f = new File(MainApp.getAppContext().getCacheDir(), ocFile.getFileName());
|
||||
try {
|
||||
f.createNewFile();
|
||||
|
||||
//Convert bitmap to byte array
|
||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||
thumbnail.compress(Bitmap.CompressFormat.JPEG, 90, bos);
|
||||
byte[] bitmapdata = bos.toByteArray();
|
||||
|
||||
//write the bytes in file
|
||||
FileOutputStream fos = null;
|
||||
try {
|
||||
fos = new FileOutputStream(f);
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
fos.write(bitmapdata);
|
||||
fos.flush();
|
||||
fos.close();
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return ParcelFileDescriptor.open(f, ParcelFileDescriptor.MODE_READ_ONLY);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getType(Uri uri) {
|
||||
OCFile ocFile = getFile(uri);
|
||||
return ocFile.getMimetype();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Cursor query(Uri uri, String[] arg1, String arg2, String[] arg3, String arg4) {
|
||||
MatrixCursor cursor = null;
|
||||
|
||||
OCFile ocFile = getFile(uri);
|
||||
File file = new File(MainApp.getAppContext().getCacheDir(), ocFile.getFileName());
|
||||
if (file.exists()) {
|
||||
cursor = new MatrixCursor(new String[] {
|
||||
OpenableColumns.DISPLAY_NAME, OpenableColumns.SIZE });
|
||||
cursor.addRow(new Object[] { uri.getLastPathSegment(),
|
||||
file.length() });
|
||||
}
|
||||
|
||||
return cursor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Uri insert(Uri uri, ContentValues values) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int delete(Uri uri, String selection, String[] selectionArgs) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -59,7 +59,7 @@ public class AccountRemovalJob extends Job implements AccountManagerCallback<Boo
|
||||
PersistableBundleCompat bundle = params.getExtras();
|
||||
Account account = AccountUtils.getOwnCloudAccountByName(context, bundle.getString(ACCOUNT, ""));
|
||||
|
||||
if (account != null ) {
|
||||
if (account != null) {
|
||||
AccountManager am = (AccountManager) context.getSystemService(ACCOUNT_SERVICE);
|
||||
am.removeAccount(account, this, null);
|
||||
|
||||
|
||||
@@ -168,8 +168,8 @@ public class FileObserverService extends Service {
|
||||
return Service.START_STICKY;
|
||||
|
||||
} else if (ACTION_ADD_OBSERVED_FILE.equals(intent.getAction())) {
|
||||
OCFile file = (OCFile) intent.getParcelableExtra(ARG_FILE);
|
||||
Account account = (Account) intent.getParcelableExtra(ARG_ACCOUNT);
|
||||
OCFile file = intent.getParcelableExtra(ARG_FILE);
|
||||
Account account = intent.getParcelableExtra(ARG_ACCOUNT);
|
||||
addObservedFile(file, account);
|
||||
|
||||
} else if (ACTION_DEL_OBSERVED_FILE.equals(intent.getAction())) {
|
||||
@@ -359,7 +359,7 @@ public class FileObserverService extends Service {
|
||||
&& downloadedFile.exists()) {
|
||||
// no matter if the download was successful or not; the
|
||||
// file could be down anyway due to a former download or upload
|
||||
observer.startWatching(downloadedFile.getName());
|
||||
// observer.startWatching(downloadedFile.getName());
|
||||
Log_OC.d(TAG, "Resuming observance of " + downloadedFile.getAbsolutePath());
|
||||
|
||||
} else if (intent.getAction().equals(FileDownloader.getDownloadAddedMessage())) {
|
||||
|
||||
@@ -26,8 +26,8 @@ import android.accounts.AuthenticatorException;
|
||||
import android.accounts.OperationCanceledException;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.AsyncTask;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.support.design.widget.BottomNavigationView;
|
||||
import android.support.v4.widget.SwipeRefreshLayout;
|
||||
|
||||
@@ -95,7 +95,7 @@ public class ConflictsResolveActivity extends FileActivity implements OnConflict
|
||||
// current Account
|
||||
if (file != null) {
|
||||
setFile(file);
|
||||
ConflictsResolveDialog d = ConflictsResolveDialog.newInstance(file.getRemotePath(), this);
|
||||
ConflictsResolveDialog d = ConflictsResolveDialog.newInstance(this);
|
||||
d.showDialog(this);
|
||||
|
||||
} else {
|
||||
|
||||
@@ -237,7 +237,7 @@ public abstract class DrawerActivity extends ToolbarActivity implements DisplayU
|
||||
if (mIsAccountChooserActive) {
|
||||
toggleAccountList();
|
||||
}
|
||||
invalidateOptionsMenu();
|
||||
supportInvalidateOptionsMenu();
|
||||
mDrawerToggle.setDrawerIndicatorEnabled(isDrawerIndicatorAvailable());
|
||||
|
||||
if (pendingRunnable != null) {
|
||||
@@ -250,7 +250,7 @@ public abstract class DrawerActivity extends ToolbarActivity implements DisplayU
|
||||
public void onDrawerOpened(View drawerView) {
|
||||
super.onDrawerOpened(drawerView);
|
||||
mDrawerToggle.setDrawerIndicatorEnabled(true);
|
||||
invalidateOptionsMenu();
|
||||
supportInvalidateOptionsMenu();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -624,7 +624,7 @@ public abstract class DrawerActivity extends ToolbarActivity implements DisplayU
|
||||
|
||||
ArrayList<Account> persistingAccounts = new ArrayList<>();
|
||||
|
||||
for (Account acc: accounts) {
|
||||
for (Account acc : accounts) {
|
||||
boolean pendingForRemoval = arbitraryDataProvider.getBooleanValue(acc,
|
||||
ManageAccountsActivity.PENDING_FOR_REMOVAL);
|
||||
|
||||
@@ -675,7 +675,7 @@ public abstract class DrawerActivity extends ToolbarActivity implements DisplayU
|
||||
mNavigationView.getMenu().removeGroup(R.id.drawer_menu_accounts);
|
||||
|
||||
// add all accounts to list
|
||||
for (Account account: accounts) {
|
||||
for (Account account : accounts) {
|
||||
try {
|
||||
// show all accounts except the currently active one and those pending for removal
|
||||
|
||||
@@ -1213,7 +1213,7 @@ public abstract class DrawerActivity extends ToolbarActivity implements DisplayU
|
||||
|
||||
ArrayList<Account> persistingAccounts = new ArrayList<>();
|
||||
|
||||
for (Account acc: accountsAll) {
|
||||
for (Account acc : accountsAll) {
|
||||
boolean pendingForRemoval = arbitraryDataProvider.getBooleanValue(acc,
|
||||
ManageAccountsActivity.PENDING_FOR_REMOVAL);
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ import android.content.Intent;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.text.method.ScrollingMovementMethod;
|
||||
@@ -61,8 +62,7 @@ import java.util.ArrayList;
|
||||
*
|
||||
* Shown when the error notification summarizing the list of errors is clicked by the user.
|
||||
*/
|
||||
public class ErrorsWhileCopyingHandlerActivity extends AppCompatActivity
|
||||
implements OnClickListener {
|
||||
public class ErrorsWhileCopyingHandlerActivity extends AppCompatActivity implements OnClickListener {
|
||||
|
||||
private static final String TAG = ErrorsWhileCopyingHandlerActivity.class.getSimpleName();
|
||||
|
||||
@@ -282,9 +282,12 @@ public class ErrorsWhileCopyingHandlerActivity extends AppCompatActivity
|
||||
finish();
|
||||
|
||||
} else {
|
||||
Toast t = Toast.makeText(ErrorsWhileCopyingHandlerActivity.this,
|
||||
getString(R.string.foreign_files_fail), Toast.LENGTH_LONG);
|
||||
t.show();
|
||||
Snackbar snackbar = Snackbar.make(
|
||||
findViewById(android.R.id.content),
|
||||
R.string.foreign_files_fail,
|
||||
Snackbar.LENGTH_LONG
|
||||
);
|
||||
snackbar.show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,7 +110,8 @@ public class ExternalSiteWebView extends FileActivity {
|
||||
webSettings.setAllowFileAccess(false);
|
||||
|
||||
// enable javascript
|
||||
webview.getSettings().setJavaScriptEnabled(true);
|
||||
webSettings.setJavaScriptEnabled(true);
|
||||
webSettings.setDomStorageEnabled(true);
|
||||
|
||||
final Activity activity = this;
|
||||
final ProgressBar progressBar = (ProgressBar) findViewById(R.id.progressBar);
|
||||
|
||||
@@ -31,6 +31,7 @@ import android.content.ServiceConnection;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.IBinder;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
@@ -40,7 +41,6 @@ import com.owncloud.android.MainApp;
|
||||
import com.owncloud.android.R;
|
||||
import com.owncloud.android.authentication.AccountUtils;
|
||||
import com.owncloud.android.authentication.AuthenticatorActivity;
|
||||
import com.owncloud.android.datamodel.ArbitraryDataProvider;
|
||||
import com.owncloud.android.datamodel.OCFile;
|
||||
import com.owncloud.android.files.services.FileDownloader;
|
||||
import com.owncloud.android.files.services.FileDownloader.FileDownloaderBinder;
|
||||
@@ -56,6 +56,7 @@ import com.owncloud.android.lib.common.operations.RemoteOperation;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperationResult.ResultCode;
|
||||
import com.owncloud.android.lib.common.utils.Log_OC;
|
||||
import com.owncloud.android.operations.CreateShareViaLinkOperation;
|
||||
import com.owncloud.android.operations.CreateShareWithShareeOperation;
|
||||
import com.owncloud.android.operations.GetSharesForFileOperation;
|
||||
import com.owncloud.android.operations.SynchronizeFileOperation;
|
||||
@@ -80,6 +81,8 @@ public abstract class FileActivity extends DrawerActivity
|
||||
|
||||
public static final String EXTRA_FILE = "com.owncloud.android.ui.activity.FILE";
|
||||
public static final String EXTRA_ACCOUNT = "com.owncloud.android.ui.activity.ACCOUNT";
|
||||
public static final String EXTRA_SEARCH = "com.owncloud.android.ui.activity.SEARCH";
|
||||
public static final String EXTRA_SEARCH_QUERY = "com.owncloud.android.ui.activity.SEARCH_QUERY";
|
||||
public static final String EXTRA_FROM_NOTIFICATION =
|
||||
"com.owncloud.android.ui.activity.FROM_NOTIFICATION";
|
||||
|
||||
@@ -302,7 +305,7 @@ public abstract class FileActivity extends DrawerActivity
|
||||
|
||||
dismissLoadingDialog();
|
||||
|
||||
if (!result.isSuccess() && (
|
||||
if (!result.isSuccess() && ! (operation instanceof CreateShareViaLinkOperation) && (
|
||||
result.getCode() == ResultCode.UNAUTHORIZED ||
|
||||
(result.isException() && result.getException() instanceof AuthenticatorException)
|
||||
)) {
|
||||
@@ -310,10 +313,7 @@ public abstract class FileActivity extends DrawerActivity
|
||||
requestCredentialsUpdate(this);
|
||||
|
||||
if (result.getCode() == ResultCode.UNAUTHORIZED) {
|
||||
Toast t = Toast.makeText(this, ErrorMessageAdapter.getErrorCauseMessage(result,
|
||||
operation, getResources()),
|
||||
Toast.LENGTH_LONG);
|
||||
t.show();
|
||||
showSnackMessage(ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()));
|
||||
}
|
||||
|
||||
} else if (!result.isSuccess() && ResultCode.SSL_RECOVERABLE_PEER_UNVERIFIED.equals(result.getCode())) {
|
||||
@@ -331,10 +331,7 @@ public abstract class FileActivity extends DrawerActivity
|
||||
updateFileFromDB();
|
||||
|
||||
} else if (result.getCode() != ResultCode.CANCELLED) {
|
||||
Toast t = Toast.makeText(this,
|
||||
ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()),
|
||||
Toast.LENGTH_LONG);
|
||||
t.show();
|
||||
showSnackMessage(ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()));
|
||||
}
|
||||
|
||||
} else if (operation instanceof SynchronizeFileOperation) {
|
||||
@@ -345,10 +342,7 @@ public abstract class FileActivity extends DrawerActivity
|
||||
updateFileFromDB();
|
||||
|
||||
} else {
|
||||
Toast t = Toast.makeText(this,
|
||||
ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()),
|
||||
Toast.LENGTH_LONG);
|
||||
t.show();
|
||||
showSnackMessage(ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -384,8 +378,7 @@ public abstract class FileActivity extends DrawerActivity
|
||||
}
|
||||
OwnCloudClient client;
|
||||
OwnCloudAccount ocAccount = new OwnCloudAccount(account, context);
|
||||
client = (OwnCloudClientManagerFactory.getDefaultSingleton().
|
||||
removeClientFor(ocAccount));
|
||||
client = (OwnCloudClientManagerFactory.getDefaultSingleton().removeClientFor(ocAccount));
|
||||
if (client != null) {
|
||||
OwnCloudCredentials cred = client.getCredentials();
|
||||
if (cred != null) {
|
||||
@@ -411,7 +404,7 @@ public abstract class FileActivity extends DrawerActivity
|
||||
startActivityForResult(updateAccountCredentials, REQUEST_CODE__UPDATE_CREDENTIALS);
|
||||
|
||||
} catch (com.owncloud.android.lib.common.accounts.AccountUtils.AccountNotFoundException e) {
|
||||
Toast.makeText(context, R.string.auth_account_does_not_exist, Toast.LENGTH_SHORT).show();
|
||||
showSnackMessage(getString(R.string.auth_account_does_not_exist));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -448,7 +441,7 @@ public abstract class FileActivity extends DrawerActivity
|
||||
operation, getResources()), Toast.LENGTH_LONG);
|
||||
msg.show();
|
||||
}
|
||||
invalidateOptionsMenu();
|
||||
supportInvalidateOptionsMenu();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -590,4 +583,12 @@ public abstract class FileActivity extends DrawerActivity
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
/**
|
||||
* Show a temporary message in a Snackbar bound to the content view
|
||||
*
|
||||
* @param message Message to show.
|
||||
*/
|
||||
public void showSnackMessage(String message) {
|
||||
Snackbar.make(findViewById(android.R.id.content), message, Snackbar.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
@@ -58,7 +58,6 @@ import android.view.View;
|
||||
import android.view.ViewTreeObserver;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.owncloud.android.MainApp;
|
||||
import com.owncloud.android.R;
|
||||
@@ -99,7 +98,6 @@ import com.owncloud.android.ui.preview.PreviewMediaFragment;
|
||||
import com.owncloud.android.ui.preview.PreviewTextFragment;
|
||||
import com.owncloud.android.ui.preview.PreviewVideoActivity;
|
||||
import com.owncloud.android.utils.DataHolderUtil;
|
||||
import com.owncloud.android.utils.DisplayUtils;
|
||||
import com.owncloud.android.utils.ErrorMessageAdapter;
|
||||
import com.owncloud.android.utils.MimeTypeUtil;
|
||||
import com.owncloud.android.utils.PermissionUtil;
|
||||
@@ -170,6 +168,9 @@ public class FileDisplayActivity extends HookActivity
|
||||
|
||||
private SearchView searchView;
|
||||
|
||||
private String mSearchQuery = "";
|
||||
private boolean mSearchOpen;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
Log_OC.v(TAG, "onCreate() start");
|
||||
@@ -673,10 +674,10 @@ public class FileDisplayActivity extends HookActivity
|
||||
|
||||
// populate list of menu items to show/hide when drawer is opened/closed
|
||||
mDrawerMenuItemstoShowHideList = new ArrayList<>(4);
|
||||
mDrawerMenuItemstoShowHideList.add(menu.findItem(R.id.action_search));
|
||||
mDrawerMenuItemstoShowHideList.add(menu.findItem(R.id.action_sort));
|
||||
mDrawerMenuItemstoShowHideList.add(menu.findItem(R.id.action_sync_account));
|
||||
mDrawerMenuItemstoShowHideList.add(menu.findItem(R.id.action_switch_view));
|
||||
mDrawerMenuItemstoShowHideList.add(menu.findItem(R.id.action_search));
|
||||
|
||||
//focus the SearchView
|
||||
if (!TextUtils.isEmpty(searchQuery)) {
|
||||
@@ -733,7 +734,7 @@ public class FileDisplayActivity extends HookActivity
|
||||
}
|
||||
});
|
||||
|
||||
return true;
|
||||
return super.onCreateOptionsMenu(menu);
|
||||
}
|
||||
|
||||
|
||||
@@ -921,14 +922,10 @@ public class FileDisplayActivity extends HookActivity
|
||||
|
||||
} else {
|
||||
Log_OC.d(TAG, "User clicked on 'Update' with no selection");
|
||||
Toast t = Toast.makeText(this, getString(R.string.filedisplay_no_file_selected),
|
||||
Toast.LENGTH_LONG);
|
||||
t.show();
|
||||
return;
|
||||
showSnackMessage(getString(R.string.filedisplay_no_file_selected));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void requestUploadOfContentFromApps(Intent contentIntent, int resultCode) {
|
||||
|
||||
ArrayList<Parcelable> streamsToUpload = new ArrayList<>();
|
||||
@@ -1214,15 +1211,14 @@ public class FileDisplayActivity extends HookActivity
|
||||
getStorageManager().getFileByPath(getCurrentDir().getRemotePath());
|
||||
|
||||
if (currentDir == null) {
|
||||
// current folder was removed from the server
|
||||
Toast.makeText(FileDisplayActivity.this,
|
||||
// current folder was removed from the server
|
||||
showSnackMessage(
|
||||
String.format(
|
||||
getString(R.string.
|
||||
sync_current_folder_was_removed),
|
||||
synchFolderRemotePath),
|
||||
|
||||
Toast.LENGTH_LONG)
|
||||
.show();
|
||||
synchFolderRemotePath
|
||||
)
|
||||
);
|
||||
|
||||
browseToRoot();
|
||||
|
||||
@@ -1244,11 +1240,9 @@ public class FileDisplayActivity extends HookActivity
|
||||
}
|
||||
|
||||
mSyncInProgress = (!FileSyncAdapter.EVENT_FULL_SYNC_END.equals(event) &&
|
||||
!RefreshFolderOperation.EVENT_SINGLE_FOLDER_SHARES_SYNCED
|
||||
.equals(event));
|
||||
!RefreshFolderOperation.EVENT_SINGLE_FOLDER_SHARES_SYNCED.equals(event));
|
||||
|
||||
if (RefreshFolderOperation.EVENT_SINGLE_FOLDER_CONTENTS_SYNCED.
|
||||
equals(event) &&
|
||||
if (RefreshFolderOperation.EVENT_SINGLE_FOLDER_CONTENTS_SYNCED.equals(event) &&
|
||||
synchResult != null && !synchResult.isSuccess()) {
|
||||
|
||||
/// TODO refactor and make common
|
||||
@@ -1301,10 +1295,10 @@ public class FileDisplayActivity extends HookActivity
|
||||
private void setBackgroundText() {
|
||||
final OCFileListFragment ocFileListFragment = getListOfFilesFragment();
|
||||
if (ocFileListFragment != null) {
|
||||
if (!mSyncInProgress) {
|
||||
ocFileListFragment.setEmptyListMessage(ExtendedListFragment.SearchType.NO_SEARCH);
|
||||
} else {
|
||||
if (mSyncInProgress) {
|
||||
ocFileListFragment.setEmptyListLoadingMessage();
|
||||
} else {
|
||||
ocFileListFragment.setEmptyListMessage(ExtendedListFragment.SearchType.NO_SEARCH);
|
||||
}
|
||||
} else {
|
||||
Log_OC.e(TAG, "OCFileListFragment is null");
|
||||
@@ -1358,13 +1352,12 @@ public class FileDisplayActivity extends HookActivity
|
||||
}
|
||||
if (renamedInUpload) {
|
||||
String newName = (new File(uploadedRemotePath)).getName();
|
||||
Toast msg = Toast.makeText(
|
||||
context,
|
||||
showSnackMessage(
|
||||
String.format(
|
||||
getString(R.string.filedetails_renamed_in_upload_msg),
|
||||
newName),
|
||||
Toast.LENGTH_LONG);
|
||||
msg.show();
|
||||
newName
|
||||
)
|
||||
);
|
||||
}
|
||||
if (uploadWasFine || getFile().fileExists()) {
|
||||
((FileDetailFragment) details).updateFileDetails(false, true);
|
||||
@@ -1650,7 +1643,7 @@ public class FileDisplayActivity extends HookActivity
|
||||
showDetails(file);
|
||||
}
|
||||
}
|
||||
invalidateOptionsMenu();
|
||||
supportInvalidateOptionsMenu();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1663,10 +1656,7 @@ public class FileDisplayActivity extends HookActivity
|
||||
*/
|
||||
private void onRemoveFileOperationFinish(RemoveFileOperation operation,
|
||||
RemoteOperationResult result) {
|
||||
Toast msg = Toast.makeText(this,
|
||||
ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()),
|
||||
Toast.LENGTH_LONG);
|
||||
msg.show();
|
||||
showSnackMessage(ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()));
|
||||
|
||||
if (result.isSuccess()) {
|
||||
OCFile removedFile = operation.getFile();
|
||||
@@ -1681,7 +1671,7 @@ public class FileDisplayActivity extends HookActivity
|
||||
if (getStorageManager().getFileById(removedFile.getParentId()).equals(getCurrentDir())) {
|
||||
refreshListOfFilesFragment(false);
|
||||
}
|
||||
invalidateOptionsMenu();
|
||||
supportInvalidateOptionsMenu();
|
||||
} else {
|
||||
if (result.isSslRecoverableException()) {
|
||||
mLastSslUntrustedServerResult = result;
|
||||
@@ -1704,10 +1694,7 @@ public class FileDisplayActivity extends HookActivity
|
||||
refreshListOfFilesFragment(false);
|
||||
} else {
|
||||
try {
|
||||
Toast msg = Toast.makeText(FileDisplayActivity.this,
|
||||
ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()),
|
||||
Toast.LENGTH_LONG);
|
||||
msg.show();
|
||||
showSnackMessage(ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()));
|
||||
|
||||
} catch (NotFoundException e) {
|
||||
Log_OC.e(TAG, "Error while trying to show fail message ", e);
|
||||
@@ -1727,10 +1714,7 @@ public class FileDisplayActivity extends HookActivity
|
||||
refreshListOfFilesFragment(false);
|
||||
} else {
|
||||
try {
|
||||
Toast msg = Toast.makeText(FileDisplayActivity.this,
|
||||
ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()),
|
||||
Toast.LENGTH_LONG);
|
||||
msg.show();
|
||||
showSnackMessage(ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()));
|
||||
|
||||
} catch (NotFoundException e) {
|
||||
Log_OC.e(TAG, "Error while trying to show fail message ", e);
|
||||
@@ -1781,10 +1765,7 @@ public class FileDisplayActivity extends HookActivity
|
||||
}
|
||||
|
||||
} else {
|
||||
Toast msg = Toast.makeText(this,
|
||||
ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()),
|
||||
Toast.LENGTH_LONG);
|
||||
msg.show();
|
||||
showSnackMessage(ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()));
|
||||
|
||||
if (result.isSslRecoverableException()) {
|
||||
mLastSslUntrustedServerResult = result;
|
||||
@@ -1799,7 +1780,7 @@ public class FileDisplayActivity extends HookActivity
|
||||
if (result.isSuccess() && operation.transferWasRequested()) {
|
||||
OCFile syncedFile = operation.getLocalFile();
|
||||
onTransferStateChanged(syncedFile, true, true);
|
||||
invalidateOptionsMenu();
|
||||
supportInvalidateOptionsMenu();
|
||||
refreshShowDetails();
|
||||
}
|
||||
}
|
||||
@@ -1817,10 +1798,7 @@ public class FileDisplayActivity extends HookActivity
|
||||
refreshListOfFilesFragment(false);
|
||||
} else {
|
||||
try {
|
||||
Toast msg = Toast.makeText(FileDisplayActivity.this,
|
||||
ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()),
|
||||
Toast.LENGTH_LONG);
|
||||
msg.show();
|
||||
showSnackMessage(ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()));
|
||||
|
||||
} catch (NotFoundException e) {
|
||||
Log_OC.e(TAG, "Error while trying to show fail message ", e);
|
||||
@@ -2014,6 +1992,8 @@ public class FileDisplayActivity extends HookActivity
|
||||
Bundle args = new Bundle();
|
||||
args.putParcelable(EXTRA_FILE, file);
|
||||
args.putParcelable(EXTRA_ACCOUNT, getAccount());
|
||||
args.putBoolean(EXTRA_SEARCH, mSearchOpen);
|
||||
args.putString(EXTRA_SEARCH_QUERY, mSearchQuery);
|
||||
Fragment textPreviewFragment = Fragment.instantiate(getApplicationContext(),
|
||||
PreviewTextFragment.class.getName(), args);
|
||||
setSecondFragment(textPreviewFragment);
|
||||
@@ -2135,4 +2115,8 @@ public class FileDisplayActivity extends HookActivity
|
||||
EventBus.getDefault().post(new TokenPushEvent());
|
||||
}
|
||||
|
||||
public void setSearchQuery(String query) {
|
||||
mSearchQuery = query;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -20,8 +20,6 @@
|
||||
package com.owncloud.android.ui.activity;
|
||||
|
||||
import android.Manifest;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.KeyguardManager;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@@ -71,7 +69,7 @@ import javax.crypto.SecretKey;
|
||||
/**
|
||||
* Activity to handle access to the app based on the fingerprint.
|
||||
*/
|
||||
@TargetApi(Build.VERSION_CODES.M)
|
||||
@RequiresApi(Build.VERSION_CODES.M)
|
||||
public class FingerprintActivity extends AppCompatActivity {
|
||||
|
||||
private static final String TAG = FingerprintActivity.class.getSimpleName();
|
||||
@@ -274,28 +272,21 @@ public class FingerprintActivity extends AppCompatActivity {
|
||||
return false;
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.M)
|
||||
static public boolean isFingerprintReady(Context context) {
|
||||
try {
|
||||
FingerprintManager fingerprintManager =
|
||||
(FingerprintManager) context.getSystemService(Context.FINGERPRINT_SERVICE);
|
||||
|
||||
if (ActivityCompat.checkSelfPermission(context, Manifest.permission.USE_FINGERPRINT)
|
||||
!= PackageManager.PERMISSION_GRANTED) {
|
||||
return false;
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
return fingerprintManager.isHardwareDetected() && fingerprintManager.hasEnrolledFingerprints();
|
||||
}
|
||||
return ActivityCompat.checkSelfPermission(context, Manifest.permission.USE_FINGERPRINT) ==
|
||||
PackageManager.PERMISSION_GRANTED && fingerprintManager.isHardwareDetected() &&
|
||||
fingerprintManager.hasEnrolledFingerprints();
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
@RequiresApi(Build.VERSION_CODES.M)
|
||||
class FingerprintHandler extends FingerprintManager.AuthenticationCallback {
|
||||
|
||||
private TextView text;
|
||||
|
||||
@@ -39,7 +39,6 @@ import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.widget.Button;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.owncloud.android.R;
|
||||
import com.owncloud.android.datamodel.OCFile;
|
||||
@@ -418,10 +417,7 @@ public class FolderPickerActivity extends FileActivity implements FileFragment.C
|
||||
refreshListOfFilesFragment(false);
|
||||
} else {
|
||||
try {
|
||||
Toast msg = Toast.makeText(FolderPickerActivity.this,
|
||||
ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()),
|
||||
Toast.LENGTH_LONG);
|
||||
msg.show();
|
||||
showSnackMessage(ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()));
|
||||
|
||||
} catch (NotFoundException e) {
|
||||
Log_OC.e(TAG, "Error while trying to show fail message " , e);
|
||||
@@ -460,13 +456,13 @@ public class FolderPickerActivity extends FileActivity implements FileFragment.C
|
||||
getStorageManager().getFileByPath(getCurrentFolder().getRemotePath());
|
||||
|
||||
if (currentDir == null) {
|
||||
// current folder was removed from the server
|
||||
Toast.makeText( FolderPickerActivity.this,
|
||||
String.format(
|
||||
getString(R.string.sync_current_folder_was_removed),
|
||||
getCurrentFolder().getFileName()),
|
||||
Toast.LENGTH_LONG)
|
||||
.show();
|
||||
// current folder was removed from the server
|
||||
showSnackMessage(
|
||||
String.format(
|
||||
getString(R.string.sync_current_folder_was_removed),
|
||||
getCurrentFolder().getFileName()
|
||||
)
|
||||
);
|
||||
browseToRoot();
|
||||
|
||||
} else {
|
||||
|
||||
@@ -26,6 +26,7 @@ import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
@@ -35,7 +36,6 @@ import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.owncloud.android.R;
|
||||
import com.owncloud.android.lib.common.utils.Log_OC;
|
||||
@@ -187,16 +187,14 @@ public class LogHistoryActivity extends ToolbarActivity {
|
||||
try {
|
||||
startActivity(intent);
|
||||
} catch (ActivityNotFoundException e) {
|
||||
Toast.makeText(this, getString(R.string.log_send_no_mail_app), Toast.LENGTH_LONG).show();
|
||||
Snackbar.make(findViewById(android.R.id.content), R.string.log_send_no_mail_app, Snackbar.LENGTH_LONG).show();
|
||||
Log_OC.i(TAG, "Could not find app for sending log history.");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Class for loading the log data async
|
||||
*
|
||||
*/
|
||||
private class LoadingLogTask extends AsyncTask<String, Void, String> {
|
||||
private final WeakReference<TextView> textViewReference;
|
||||
|
||||
@@ -29,6 +29,7 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.ServiceConnection;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.IBinder;
|
||||
@@ -60,11 +61,13 @@ import com.owncloud.android.ui.helpers.FileOperationsHelper;
|
||||
import com.owncloud.android.utils.AnalyticsUtils;
|
||||
import com.owncloud.android.utils.DisplayUtils;
|
||||
import com.owncloud.android.utils.ThemeUtils;
|
||||
import com.owncloud.android.utils.FileStorageUtils;
|
||||
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
import org.parceler.Parcels;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Set;
|
||||
@@ -433,7 +436,7 @@ public class ManageAccountsActivity extends FileActivity
|
||||
Account[] accounts = AccountManager.get(this).getAccountsByType(MainApp.getAccountType());
|
||||
|
||||
String newAccountName = "";
|
||||
for (Account acc: accounts) {
|
||||
for (Account acc : accounts) {
|
||||
if (!account.name.equalsIgnoreCase(acc.name)) {
|
||||
newAccountName = acc.name;
|
||||
break;
|
||||
@@ -457,6 +460,30 @@ public class ManageAccountsActivity extends FileActivity
|
||||
|
||||
super.onBackPressed();
|
||||
}
|
||||
|
||||
deleteAccountFiles(account);
|
||||
}
|
||||
|
||||
private void deleteAccountFiles(final Account account) {
|
||||
AsyncTask removalTask = new AsyncTask() {
|
||||
@Override
|
||||
protected Object doInBackground(Object[] params) {
|
||||
FileDataStorageManager storageManager = new FileDataStorageManager(account, getContentResolver());
|
||||
|
||||
File tempDir = new File(FileStorageUtils.getTemporalPath(account.name));
|
||||
File saveDir = new File(FileStorageUtils.getSavePath(account.name));
|
||||
|
||||
FileStorageUtils.deleteRecursively(tempDir, storageManager);
|
||||
FileStorageUtils.deleteRecursively(saveDir, storageManager);
|
||||
|
||||
// delete all database entries
|
||||
storageManager.deleteAllFiles();
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
removalTask.execute();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,13 +24,13 @@ import android.content.SharedPreferences;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.owncloud.android.R;
|
||||
import com.owncloud.android.lib.common.utils.Log_OC;
|
||||
@@ -142,9 +142,11 @@ public class ManageSpaceActivity extends AppCompatActivity {
|
||||
protected void onPostExecute(Boolean result) {
|
||||
super.onPostExecute(result);
|
||||
if (!result) {
|
||||
Toast.makeText(getApplicationContext(),
|
||||
getString(R.string.manage_space_clear_data),
|
||||
Toast.LENGTH_LONG).show();
|
||||
Snackbar.make(
|
||||
findViewById(android.R.id.content),
|
||||
R.string.manage_space_clear_data,
|
||||
Snackbar.LENGTH_LONG
|
||||
).show();
|
||||
} else {
|
||||
finish();
|
||||
System.exit(0);
|
||||
|
||||
@@ -27,6 +27,7 @@ import android.content.SharedPreferences;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
@@ -37,7 +38,6 @@ import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.owncloud.android.R;
|
||||
import com.owncloud.android.lib.common.utils.Log_OC;
|
||||
@@ -377,9 +377,8 @@ public class PassCodeActivity extends AppCompatActivity {
|
||||
private void showErrorAndRestart(int errorMessage, int headerMessage,
|
||||
int explanationVisibility) {
|
||||
Arrays.fill(mPassCodeDigits, null);
|
||||
CharSequence errorSeq = getString(errorMessage);
|
||||
Toast.makeText(this, errorSeq, Toast.LENGTH_LONG).show();
|
||||
mPassCodeHdr.setText(headerMessage); // TODO check if really needed
|
||||
Snackbar.make(findViewById(android.R.id.content), getString(errorMessage), Snackbar.LENGTH_LONG).show();
|
||||
mPassCodeHdr.setText(headerMessage); // TODO check if really needed
|
||||
mPassCodeHdrExplanation.setVisibility(explanationVisibility); // TODO check if really needed
|
||||
clearBoxes();
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* ownCloud Android client application
|
||||
*
|
||||
* @author Bartek Przybylski
|
||||
@@ -33,6 +33,7 @@ import android.content.res.Configuration;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
@@ -47,6 +48,7 @@ import android.preference.PreferenceScreen;
|
||||
import android.preference.SwitchPreference;
|
||||
import android.support.annotation.LayoutRes;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.support.v7.app.AppCompatDelegate;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
@@ -76,7 +78,11 @@ import com.owncloud.android.utils.AnalyticsUtils;
|
||||
import com.owncloud.android.utils.DisplayUtils;
|
||||
import com.owncloud.android.utils.ThemeUtils;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.URL;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
/**
|
||||
* An Activity that allows the user to change the application's settings.
|
||||
@@ -284,11 +290,7 @@ public class Preferences extends PreferenceActivity
|
||||
return true;
|
||||
} else {
|
||||
if (incoming) {
|
||||
Toast.makeText(
|
||||
MainApp.getAppContext(),
|
||||
R.string.prefs_fingerprint_notsetup,
|
||||
Toast.LENGTH_LONG)
|
||||
.show();
|
||||
showSnackMessage(R.string.prefs_fingerprint_notsetup);
|
||||
fPrint.setChecked(false);
|
||||
}
|
||||
SharedPreferences appPrefs =
|
||||
@@ -350,11 +352,7 @@ public class Preferences extends PreferenceActivity
|
||||
launchDavDroidLogin();
|
||||
} catch (Throwable t) {
|
||||
Log_OC.e(TAG, "Base Uri for account could not be resolved to call DAVdroid!", t);
|
||||
Toast.makeText(
|
||||
MainApp.getAppContext(),
|
||||
R.string.prefs_calendar_contacts_address_resolve_error,
|
||||
Toast.LENGTH_SHORT)
|
||||
.show();
|
||||
showSnackMessage(R.string.prefs_calendar_contacts_address_resolve_error);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -665,6 +663,54 @@ public class Preferences extends PreferenceActivity
|
||||
loadExternalSettingLinks(preferenceCategoryMore);
|
||||
|
||||
loadStoragePath();
|
||||
|
||||
/* Link to dev apks */
|
||||
Preference pDevLink = findPreference("dev_link");
|
||||
if (pDevLink != null) {
|
||||
pDevLink.setOnPreferenceClickListener(new OnPreferenceClickListener() {
|
||||
@Override
|
||||
public boolean onPreferenceClick(Preference preference) {
|
||||
Integer latestVersion = -1;
|
||||
Integer currentVersion = -1;
|
||||
try {
|
||||
currentVersion = getPackageManager().getPackageInfo(getPackageName(), 0).versionCode;
|
||||
LoadingVersionNumberTask loadTask = new LoadingVersionNumberTask();
|
||||
loadTask.execute();
|
||||
latestVersion = loadTask.get();
|
||||
} catch (InterruptedException | ExecutionException | NameNotFoundException e) {
|
||||
Log_OC.e(TAG, "Error detecting app version", e);
|
||||
}
|
||||
if (latestVersion == -1 || currentVersion == -1) {
|
||||
Toast.makeText(getApplicationContext(), "No information available!", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
if (latestVersion > currentVersion) {
|
||||
String devApkLink = (String) getText(R.string.dev_link) + latestVersion + ".apk";
|
||||
Uri uriUrl = Uri.parse(devApkLink);
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW, uriUrl);
|
||||
startActivity(intent);
|
||||
return true;
|
||||
} else {
|
||||
Toast.makeText(getApplicationContext(), "No new version available!", Toast.LENGTH_SHORT).show();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/* Link to dev changelog */
|
||||
Preference pChangelogLink = findPreference("changelog_link");
|
||||
if (pChangelogLink != null) {
|
||||
pChangelogLink.setOnPreferenceClickListener(new OnPreferenceClickListener() {
|
||||
@Override
|
||||
public boolean onPreferenceClick(Preference preference) {
|
||||
String devChangelogLink = getString(R.string.dev_changelog);
|
||||
Uri uriUrl = Uri.parse(devChangelogLink);
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW, uriUrl);
|
||||
startActivity(intent);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void launchDavDroidLogin()
|
||||
@@ -697,11 +743,7 @@ public class Preferences extends PreferenceActivity
|
||||
Uri.parse("https://f-droid.org/repository/browse/?fdid=at.bitfire.davdroid"));
|
||||
startActivity(downloadIntent);
|
||||
|
||||
Toast.makeText(
|
||||
MainApp.getAppContext(),
|
||||
R.string.prefs_calendar_contacts_no_store_error,
|
||||
Toast.LENGTH_SHORT)
|
||||
.show();
|
||||
showSnackMessage(R.string.prefs_calendar_contacts_no_store_error);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -834,7 +876,7 @@ public class Preferences extends PreferenceActivity
|
||||
}
|
||||
appPrefs.putBoolean(PassCodeActivity.PREFERENCE_SET_PASSCODE, true);
|
||||
appPrefs.apply();
|
||||
Toast.makeText(this, R.string.pass_code_stored, Toast.LENGTH_LONG).show();
|
||||
showSnackMessage(R.string.pass_code_stored);
|
||||
}
|
||||
} else if (requestCode == ACTION_CONFIRM_PASSCODE && resultCode == RESULT_OK) {
|
||||
if (data.getBooleanExtra(PassCodeActivity.KEY_CHECK_RESULT, false)) {
|
||||
@@ -844,10 +886,10 @@ public class Preferences extends PreferenceActivity
|
||||
appPrefs.putBoolean(PassCodeActivity.PREFERENCE_SET_PASSCODE, false);
|
||||
appPrefs.apply();
|
||||
|
||||
Toast.makeText(this, R.string.pass_code_removed, Toast.LENGTH_LONG).show();
|
||||
showSnackMessage(R.string.pass_code_removed);
|
||||
}
|
||||
} else if (requestCode == ACTION_REQUEST_CODE_DAVDROID_SETUP && resultCode == RESULT_OK) {
|
||||
Toast.makeText(this, R.string.prefs_calendar_contacts_sync_setup_successful, Toast.LENGTH_LONG).show();
|
||||
showSnackMessage(R.string.prefs_calendar_contacts_sync_setup_successful);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1042,4 +1084,36 @@ public class Preferences extends PreferenceActivity
|
||||
public void onCancelMigration() {
|
||||
// Migration was canceled so we don't do anything
|
||||
}
|
||||
|
||||
/**
|
||||
* Show a temporary message in a Snackbar bound to the content view
|
||||
*
|
||||
* @param messageResource Message to show.
|
||||
*/
|
||||
private void showSnackMessage(int messageResource) {
|
||||
Snackbar.make(findViewById(android.R.id.content), messageResource, Snackbar.LENGTH_LONG).show();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Class for loading the version number
|
||||
*
|
||||
*/
|
||||
private class LoadingVersionNumberTask extends AsyncTask<Void, Void, Integer> {
|
||||
protected Integer doInBackground(Void... args) {
|
||||
try {
|
||||
URL url = new URL(getString(R.string.dev_latest));
|
||||
BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
|
||||
|
||||
Integer latestVersion = Integer.parseInt(in.readLine());
|
||||
in.close();
|
||||
|
||||
return latestVersion;
|
||||
|
||||
} catch (IOException e) {
|
||||
Log_OC.e(TAG, "Error loading version number", e);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -38,9 +38,13 @@ import android.graphics.PorterDuff;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.os.Parcelable;
|
||||
import android.support.annotation.DrawableRes;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.annotation.StringRes;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
@@ -60,10 +64,12 @@ import android.widget.AdapterView.OnItemClickListener;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ListView;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.owncloud.android.MainApp;
|
||||
import com.owncloud.android.R;
|
||||
@@ -143,6 +149,12 @@ public class ReceiveExternalFilesActivity extends FileActivity
|
||||
|
||||
private final static String FILENAME_ENCODING = "UTF-8";
|
||||
|
||||
private LinearLayout mEmptyListContainer;
|
||||
private TextView mEmptyListMessage;
|
||||
private TextView mEmptyListHeadline;
|
||||
private ImageView mEmptyListIcon;
|
||||
private ProgressBar mEmptyListProgress;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
prepareStreamsToUpload();
|
||||
@@ -711,6 +723,7 @@ public class ReceiveExternalFilesActivity extends FileActivity
|
||||
|
||||
private void populateDirectoryList() {
|
||||
setContentView(R.layout.uploader_layout);
|
||||
setupEmptyList();
|
||||
setupToolbar();
|
||||
ActionBar actionBar = getSupportActionBar();
|
||||
|
||||
@@ -735,41 +748,85 @@ public class ReceiveExternalFilesActivity extends FileActivity
|
||||
mFile = getStorageManager().getFileByPath(full_path);
|
||||
if (mFile != null) {
|
||||
Vector<OCFile> files = getStorageManager().getFolderContent(mFile, false);
|
||||
sortFileList(files);
|
||||
|
||||
List<HashMap<String, Object>> data = new LinkedList<>();
|
||||
for (OCFile f : files) {
|
||||
HashMap<String, Object> h = new HashMap<>();
|
||||
h.put("dirname", f);
|
||||
data.add(h);
|
||||
if (files.size() == 0) {
|
||||
setMessageForEmptyList(
|
||||
R.string.file_list_empty_headline,
|
||||
R.string.empty,
|
||||
R.drawable.ic_list_empty_upload,
|
||||
true
|
||||
);
|
||||
} else {
|
||||
mEmptyListContainer.setVisibility(View.GONE);
|
||||
|
||||
sortFileList(files);
|
||||
|
||||
List<HashMap<String, Object>> data = new LinkedList<>();
|
||||
for (OCFile f : files) {
|
||||
HashMap<String, Object> h = new HashMap<>();
|
||||
h.put("dirname", f);
|
||||
data.add(h);
|
||||
}
|
||||
|
||||
UploaderAdapter sa = new UploaderAdapter(this,
|
||||
data,
|
||||
R.layout.uploader_list_item_layout,
|
||||
new String[]{"dirname"},
|
||||
new int[]{R.id.filename},
|
||||
getStorageManager(), getAccount());
|
||||
|
||||
mListView.setAdapter(sa);
|
||||
Button btnChooseFolder = (Button) findViewById(R.id.uploader_choose_folder);
|
||||
btnChooseFolder.setOnClickListener(this);
|
||||
btnChooseFolder.getBackground().setColorFilter(ThemeUtils.primaryColor(getAccount()),
|
||||
PorterDuff.Mode.SRC_ATOP);
|
||||
|
||||
getSupportActionBar().setBackgroundDrawable(new ColorDrawable(ThemeUtils.primaryColor(getAccount())));
|
||||
|
||||
ThemeUtils.colorStatusBar(this, ThemeUtils.primaryDarkColor(getAccount()));
|
||||
|
||||
ThemeUtils.colorToolbarProgressBar(this, ThemeUtils.primaryColor(getAccount()));
|
||||
|
||||
Button btnNewFolder = (Button) findViewById(R.id.uploader_cancel);
|
||||
btnNewFolder.setOnClickListener(this);
|
||||
|
||||
mListView.setOnItemClickListener(this);
|
||||
}
|
||||
|
||||
UploaderAdapter sa = new UploaderAdapter(this,
|
||||
data,
|
||||
R.layout.uploader_list_item_layout,
|
||||
new String[] {"dirname"},
|
||||
new int[] {R.id.filename},
|
||||
getStorageManager(), getAccount());
|
||||
|
||||
mListView.setAdapter(sa);
|
||||
Button btnChooseFolder = (Button) findViewById(R.id.uploader_choose_folder);
|
||||
btnChooseFolder.setOnClickListener(this);
|
||||
btnChooseFolder.getBackground().setColorFilter(ThemeUtils.primaryColor(getAccount()),
|
||||
PorterDuff.Mode.SRC_ATOP);
|
||||
|
||||
getSupportActionBar().setBackgroundDrawable(new ColorDrawable(ThemeUtils.primaryColor(getAccount())));
|
||||
|
||||
ThemeUtils.colorStatusBar(this, ThemeUtils.primaryDarkColor(getAccount()));
|
||||
|
||||
ThemeUtils.colorToolbarProgressBar(this, ThemeUtils.primaryColor(getAccount()));
|
||||
|
||||
Button btnNewFolder = (Button) findViewById(R.id.uploader_cancel);
|
||||
btnNewFolder.setOnClickListener(this);
|
||||
|
||||
mListView.setOnItemClickListener(this);
|
||||
}
|
||||
}
|
||||
|
||||
protected void setupEmptyList() {
|
||||
mEmptyListContainer = (LinearLayout) findViewById(R.id.empty_list_view);
|
||||
mEmptyListMessage = (TextView) findViewById(R.id.empty_list_view_text);
|
||||
mEmptyListHeadline = (TextView) findViewById(R.id.empty_list_view_headline);
|
||||
mEmptyListIcon = (ImageView) findViewById(R.id.empty_list_icon);
|
||||
mEmptyListProgress = (ProgressBar) findViewById(R.id.empty_list_progress);
|
||||
mEmptyListProgress.getIndeterminateDrawable().setColorFilter(ThemeUtils.primaryColor(),
|
||||
PorterDuff.Mode.SRC_IN);
|
||||
}
|
||||
|
||||
public void setMessageForEmptyList(@StringRes final int headline, @StringRes final int message,
|
||||
@DrawableRes final int icon, final boolean tintIcon) {
|
||||
new Handler(Looper.getMainLooper()).post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
if (mEmptyListContainer != null && mEmptyListMessage != null) {
|
||||
mEmptyListHeadline.setText(headline);
|
||||
mEmptyListMessage.setText(message);
|
||||
|
||||
if (tintIcon) {
|
||||
mEmptyListIcon.setImageDrawable(ThemeUtils.tintDrawable(icon, ThemeUtils.primaryColor()));
|
||||
}
|
||||
|
||||
mEmptyListIcon.setVisibility(View.VISIBLE);
|
||||
mEmptyListProgress.setVisibility(View.GONE);
|
||||
mEmptyListMessage.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSavedCertificate() {
|
||||
startSyncFolderOperation(getCurrentDir());
|
||||
@@ -927,10 +984,7 @@ public class ReceiveExternalFilesActivity extends FileActivity
|
||||
populateDirectoryList();
|
||||
} else {
|
||||
try {
|
||||
Toast msg = Toast.makeText(this,
|
||||
ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()),
|
||||
Toast.LENGTH_LONG);
|
||||
msg.show();
|
||||
showSnackMessage(ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()));
|
||||
|
||||
} catch (NotFoundException e) {
|
||||
Log_OC.e(TAG, "Error while trying to show fail message ", e);
|
||||
@@ -1049,12 +1103,12 @@ public class ReceiveExternalFilesActivity extends FileActivity
|
||||
|
||||
if (currentDir == null) {
|
||||
// current folder was removed from the server
|
||||
Toast.makeText(context,
|
||||
showSnackMessage(
|
||||
String.format(
|
||||
getString(R.string.sync_current_folder_was_removed),
|
||||
getCurrentFolder().getFileName()),
|
||||
Toast.LENGTH_LONG)
|
||||
.show();
|
||||
getCurrentFolder().getFileName()
|
||||
)
|
||||
);
|
||||
browseToRoot();
|
||||
|
||||
} else {
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/**
|
||||
/*
|
||||
* ownCloud Android client application
|
||||
*
|
||||
* @author masensio
|
||||
* @author David A. Velasco
|
||||
* @author Juan Carlos González Cabrero
|
||||
* Copyright (C) 2015 ownCloud Inc.
|
||||
* <p/>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2,
|
||||
* as published by the Free Software Foundation.
|
||||
* <p/>
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* <p/>
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -25,6 +25,7 @@ import android.app.SearchManager;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
@@ -347,13 +348,14 @@ public class ShareActivity extends FileActivity
|
||||
chooserDialog.show(getSupportFragmentManager(), FTAG_CHOOSER_DIALOG);
|
||||
|
||||
} else {
|
||||
// Detect Failure (403) --> maybe needs password
|
||||
// Detect Failure (403) or Unauthorized (401) --> maybe needs password
|
||||
String password = operation.getPassword();
|
||||
if (result.getCode() == RemoteOperationResult.ResultCode.SHARE_FORBIDDEN &&
|
||||
(password == null || password.length() == 0) &&
|
||||
getCapabilities().getFilesSharingPublicEnabled().isUnknown()) {
|
||||
if (((result.getCode() == RemoteOperationResult.ResultCode.SHARE_FORBIDDEN &&
|
||||
(password == null || password.length() == 0) &&
|
||||
getCapabilities().getFilesSharingPublicEnabled().isUnknown()) ||
|
||||
result.getCode() == RemoteOperationResult.ResultCode.UNAUTHORIZED) ) {
|
||||
// Was tried without password, but not sure that it's optional.
|
||||
|
||||
Toast.makeText(this, R.string.enter_valid_password, Toast.LENGTH_SHORT).show();
|
||||
// Try with password before giving up; see also ShareFileFragment#OnShareViaLinkListener
|
||||
ShareFileFragment shareFileFragment = getShareFileFragment();
|
||||
if (shareFileFragment != null
|
||||
@@ -363,10 +365,11 @@ public class ShareActivity extends FileActivity
|
||||
}
|
||||
|
||||
} else {
|
||||
Toast t = Toast.makeText(this,
|
||||
ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()),
|
||||
Toast.LENGTH_LONG);
|
||||
t.show();
|
||||
Snackbar.make(
|
||||
findViewById(android.R.id.content),
|
||||
ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()),
|
||||
Snackbar.LENGTH_LONG
|
||||
).show();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@ import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.owncloud.android.R;
|
||||
import com.owncloud.android.authentication.AccountUtils;
|
||||
@@ -54,8 +53,8 @@ import com.owncloud.android.lib.common.operations.RemoteOperationResult;
|
||||
import com.owncloud.android.lib.common.utils.Log_OC;
|
||||
import com.owncloud.android.operations.CheckCurrentCredentialsOperation;
|
||||
import com.owncloud.android.ui.fragment.UploadListFragment;
|
||||
import com.owncloud.android.utils.DisplayUtils;
|
||||
import com.owncloud.android.utils.AnalyticsUtils;
|
||||
import com.owncloud.android.utils.DisplayUtils;
|
||||
import com.owncloud.android.utils.MimeTypeUtil;
|
||||
|
||||
import java.io.File;
|
||||
@@ -162,8 +161,7 @@ public class UploadListActivity extends FileActivity implements UploadListFragme
|
||||
/// TODO is this path still active?
|
||||
File f = new File(file.getLocalPath());
|
||||
if(!f.exists()) {
|
||||
Toast.makeText(this, "Cannot open. Local file does not exist.",
|
||||
Toast.LENGTH_SHORT).show();
|
||||
showSnackMessage(getString(R.string.local_file_not_found_toast));
|
||||
} else {
|
||||
openFileWithDefault(file.getLocalPath());
|
||||
}
|
||||
@@ -184,9 +182,8 @@ public class UploadListActivity extends FileActivity implements UploadListFragme
|
||||
try {
|
||||
startActivity(myIntent);
|
||||
} catch (ActivityNotFoundException e) {
|
||||
Toast.makeText(this, "Found no app to open this file.", Toast.LENGTH_LONG).show();
|
||||
showSnackMessage(getString(R.string.file_list_no_app_for_file_type));
|
||||
Log_OC.i(TAG, "Could not find app for sending log history.");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -271,6 +271,7 @@ public class WhatsNewActivity extends FragmentActivity implements ViewPager.OnPa
|
||||
|
||||
WebView webView = (WebView) v.findViewById(R.id.whatsNewWebView);
|
||||
webView.getSettings().setJavaScriptEnabled(true);
|
||||
webView.getSettings().setDomStorageEnabled(true);
|
||||
webView.getSettings().setAllowFileAccess(false);
|
||||
webView.setWebViewClient(new WebViewClient());
|
||||
webView.loadUrl(mWebUrl);
|
||||
|
||||
@@ -121,10 +121,10 @@ public class DiskLruImageCache {
|
||||
}
|
||||
final InputStream in = snapshot.getInputStream( 0 );
|
||||
if ( in != null ) {
|
||||
final BufferedInputStream buffIn =
|
||||
final BufferedInputStream buffIn =
|
||||
new BufferedInputStream( in, IO_BUFFER_SIZE );
|
||||
bitmap = BitmapFactory.decodeStream( buffIn );
|
||||
}
|
||||
bitmap = BitmapFactory.decodeStream( buffIn );
|
||||
}
|
||||
} catch ( IOException e ) {
|
||||
Log_OC.d(TAG, e.getMessage(), e);
|
||||
} finally {
|
||||
|
||||
@@ -23,6 +23,7 @@ import android.accounts.Account;
|
||||
import android.content.Context;
|
||||
import android.database.DataSetObserver;
|
||||
import android.graphics.Bitmap;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.text.format.DateUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
@@ -34,7 +35,6 @@ import android.widget.ImageButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.owncloud.android.R;
|
||||
import com.owncloud.android.authentication.AccountUtils;
|
||||
@@ -392,10 +392,11 @@ public class ExpandableUploadListAdapter extends BaseExpandableListAdapter imple
|
||||
requester.retry(mParentActivity, upload);
|
||||
refreshView();
|
||||
} else {
|
||||
final String message = String.format(
|
||||
mParentActivity.getString(R.string.local_file_not_found_toast)
|
||||
);
|
||||
Toast.makeText(mParentActivity, message, Toast.LENGTH_SHORT).show();
|
||||
Snackbar.make(
|
||||
v.getRootView().findViewById(android.R.id.content),
|
||||
mParentActivity.getString(R.string.local_file_not_found_toast),
|
||||
Snackbar.LENGTH_LONG
|
||||
).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -408,9 +409,10 @@ public class ExpandableUploadListAdapter extends BaseExpandableListAdapter imple
|
||||
ImageView fileIcon = (ImageView) view.findViewById(R.id.thumbnail);
|
||||
fileIcon.setImageResource(R.drawable.file);
|
||||
|
||||
/** Cancellation needs do be checked and done before changing the drawable in fileIcon, or
|
||||
/*
|
||||
* Cancellation needs do be checked and done before changing the drawable in fileIcon, or
|
||||
* {@link ThumbnailsCacheManager#cancelPotentialWork} will NEVER cancel any task.
|
||||
**/
|
||||
*/
|
||||
OCFile fakeFileToCheatThumbnailsCacheManagerInterface = new OCFile(upload.getRemotePath());
|
||||
fakeFileToCheatThumbnailsCacheManagerInterface.setStoragePath(upload.getLocalPath());
|
||||
fakeFileToCheatThumbnailsCacheManagerInterface.setMimetype(upload.getMimeType());
|
||||
@@ -451,7 +453,8 @@ public class ExpandableUploadListAdapter extends BaseExpandableListAdapter imple
|
||||
task
|
||||
);
|
||||
fileIcon.setImageDrawable(asyncDrawable);
|
||||
task.execute(fakeFileToCheatThumbnailsCacheManagerInterface);
|
||||
task.execute(new ThumbnailsCacheManager.ThumbnailGenerationTaskObject(
|
||||
fakeFileToCheatThumbnailsCacheManagerInterface, null));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -487,7 +490,7 @@ public class ExpandableUploadListAdapter extends BaseExpandableListAdapter imple
|
||||
task
|
||||
);
|
||||
fileIcon.setImageDrawable(asyncDrawable);
|
||||
task.execute(file);
|
||||
task.execute(new ThumbnailsCacheManager.ThumbnailGenerationTaskObject(file, null));
|
||||
Log_OC.v(TAG, "Executing task to generate a new thumbnail");
|
||||
}
|
||||
}
|
||||
@@ -580,11 +583,6 @@ public class ExpandableUploadListAdapter extends BaseExpandableListAdapter imple
|
||||
R.string.uploads_view_upload_status_service_interrupted
|
||||
);
|
||||
break;
|
||||
case UNKNOWN:
|
||||
status = mParentActivity.getString(
|
||||
R.string.uploads_view_upload_status_unknown_fail
|
||||
);
|
||||
break;
|
||||
case CANCELLED:
|
||||
// should not get here ; cancelled uploads should be wiped out
|
||||
status = mParentActivity.getString(
|
||||
@@ -598,8 +596,17 @@ public class ExpandableUploadListAdapter extends BaseExpandableListAdapter imple
|
||||
case MAINTENANCE_MODE:
|
||||
status = mParentActivity.getString(R.string.maintenance_mode);
|
||||
break;
|
||||
case SSL_RECOVERABLE_PEER_UNVERIFIED:
|
||||
status =
|
||||
mParentActivity.getString(
|
||||
R.string.uploads_view_upload_status_failed_ssl_certificate_not_trusted
|
||||
);
|
||||
break;
|
||||
case UNKNOWN:
|
||||
status = mParentActivity.getString(R.string.uploads_view_upload_status_unknown_fail);
|
||||
break;
|
||||
default:
|
||||
status = "Naughty devs added a new fail result but no description for the user";
|
||||
status = "New fail result but no description for the user";
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -271,7 +271,6 @@ public class FileListListAdapter extends BaseAdapter {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
case GRID_ITEM:
|
||||
// filename
|
||||
fileName = (TextView) view.findViewById(R.id.Filename);
|
||||
@@ -369,7 +368,9 @@ public class FileListListAdapter extends BaseAdapter {
|
||||
if (!file.isFolder()) {
|
||||
if ((MimeTypeUtil.isImage(file) || MimeTypeUtil.isVideo(file)) && file.getRemoteId() != null) {
|
||||
// Thumbnail in Cache?
|
||||
Bitmap thumbnail = ThumbnailsCacheManager.getBitmapFromDiskCache(file.getRemoteId());
|
||||
Bitmap thumbnail = ThumbnailsCacheManager.getBitmapFromDiskCache(
|
||||
"t" + String.valueOf(file.getRemoteId())
|
||||
);
|
||||
if (thumbnail != null && !file.needsUpdateThumbnail()) {
|
||||
|
||||
if (MimeTypeUtil.isVideo(file)) {
|
||||
@@ -385,7 +386,6 @@ public class FileListListAdapter extends BaseAdapter {
|
||||
final ThumbnailsCacheManager.ThumbnailGenerationTask task =
|
||||
new ThumbnailsCacheManager.ThumbnailGenerationTask(
|
||||
fileIcon, mStorageManager, mAccount, asyncTasks);
|
||||
|
||||
if (thumbnail == null) {
|
||||
if (MimeTypeUtil.isVideo(file)) {
|
||||
thumbnail = ThumbnailsCacheManager.mDefaultVideo;
|
||||
@@ -401,7 +401,8 @@ public class FileListListAdapter extends BaseAdapter {
|
||||
);
|
||||
fileIcon.setImageDrawable(asyncDrawable);
|
||||
asyncTasks.add(task);
|
||||
task.execute(file);
|
||||
task.execute(new ThumbnailsCacheManager.ThumbnailGenerationTaskObject(file,
|
||||
file.getRemoteId()));
|
||||
} catch (IllegalArgumentException e) {
|
||||
Log_OC.d(TAG, "ThumbnailGenerationTask : " + e.getMessage());
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ public class LocalFileListAdapter extends BaseAdapter implements FilterableListA
|
||||
if (MimeTypeUtil.isImage(file)){
|
||||
// Thumbnail in Cache?
|
||||
Bitmap thumbnail = ThumbnailsCacheManager.getBitmapFromDiskCache(
|
||||
String.valueOf(file.hashCode())
|
||||
"t" + String.valueOf(file.hashCode())
|
||||
);
|
||||
if (thumbnail != null){
|
||||
fileIcon.setImageBitmap(thumbnail);
|
||||
@@ -222,7 +222,7 @@ public class LocalFileListAdapter extends BaseAdapter implements FilterableListA
|
||||
task
|
||||
);
|
||||
fileIcon.setImageDrawable(asyncDrawable);
|
||||
task.execute(file);
|
||||
task.execute(new ThumbnailsCacheManager.ThumbnailGenerationTaskObject(file, null));
|
||||
Log_OC.v(TAG, "Executing task to generate a new thumbnail");
|
||||
|
||||
} // else, already being generated, don't restart it
|
||||
|
||||
@@ -122,7 +122,7 @@ public class UploaderAdapter extends SimpleAdapter {
|
||||
task
|
||||
);
|
||||
fileIcon.setImageDrawable(asyncDrawable);
|
||||
task.execute(file);
|
||||
task.execute(new ThumbnailsCacheManager.ThumbnailGenerationTaskObject(file, file.getRemoteId()));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* ownCloud Android client application
|
||||
*
|
||||
* @author Bartek Przybylski
|
||||
@@ -24,6 +24,7 @@ package com.owncloud.android.ui.dialog;
|
||||
import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
@@ -38,7 +39,7 @@ import com.owncloud.android.R;
|
||||
*/
|
||||
public class ConflictsResolveDialog extends DialogFragment {
|
||||
|
||||
public static enum Decision {
|
||||
public enum Decision {
|
||||
CANCEL,
|
||||
KEEP_BOTH,
|
||||
OVERWRITE,
|
||||
@@ -46,35 +47,32 @@ public class ConflictsResolveDialog extends DialogFragment {
|
||||
}
|
||||
|
||||
OnConflictDecisionMadeListener mListener;
|
||||
|
||||
public static ConflictsResolveDialog newInstance(String path, OnConflictDecisionMadeListener listener) {
|
||||
|
||||
public static ConflictsResolveDialog newInstance(OnConflictDecisionMadeListener listener) {
|
||||
ConflictsResolveDialog f = new ConflictsResolveDialog();
|
||||
Bundle args = new Bundle();
|
||||
args.putString("remotepath", path);
|
||||
f.setArguments(args);
|
||||
f.mListener = listener;
|
||||
return f;
|
||||
}
|
||||
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||
String remotepath = getArguments().getString("remotepath");
|
||||
return new AlertDialog.Builder(getActivity(), R.style.Theme_ownCloud_Dialog)
|
||||
.setIcon(R.drawable.ic_warning)
|
||||
.setTitle(R.string.conflict_title)
|
||||
.setMessage(String.format(getString(R.string.conflict_message), remotepath))
|
||||
.setPositiveButton(R.string.conflict_use_local_version,
|
||||
new DialogInterface.OnClickListener() {
|
||||
.setIcon(R.drawable.ic_warning)
|
||||
.setTitle(R.string.conflict_title)
|
||||
.setMessage(getString(R.string.conflict_message))
|
||||
.setPositiveButton(R.string.conflict_use_local_version,
|
||||
new DialogInterface.OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
if (mListener != null) {
|
||||
mListener.conflictDecisionMade(Decision.OVERWRITE);
|
||||
}
|
||||
}
|
||||
})
|
||||
.setNeutralButton(R.string.conflict_keep_both,
|
||||
new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
if (mListener != null) {
|
||||
mListener.conflictDecisionMade(Decision.OVERWRITE);
|
||||
}
|
||||
}
|
||||
})
|
||||
.setNeutralButton(R.string.conflict_keep_both,
|
||||
new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
if (mListener != null) {
|
||||
@@ -82,16 +80,16 @@ public class ConflictsResolveDialog extends DialogFragment {
|
||||
}
|
||||
}
|
||||
})
|
||||
.setNegativeButton(R.string.conflict_use_server_version,
|
||||
new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
if (mListener != null) {
|
||||
mListener.conflictDecisionMade(Decision.SERVER);
|
||||
.setNegativeButton(R.string.conflict_use_server_version,
|
||||
new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
if (mListener != null) {
|
||||
mListener.conflictDecisionMade(Decision.SERVER);
|
||||
}
|
||||
}
|
||||
})
|
||||
.create();
|
||||
}
|
||||
})
|
||||
.create();
|
||||
}
|
||||
|
||||
public void showDialog(AppCompatActivity activity) {
|
||||
@@ -120,6 +118,6 @@ public class ConflictsResolveDialog extends DialogFragment {
|
||||
}
|
||||
|
||||
public interface OnConflictDecisionMadeListener {
|
||||
public void conflictDecisionMade(Decision decision);
|
||||
void conflictDecisionMade(Decision decision);
|
||||
}
|
||||
}
|
||||
@@ -24,6 +24,7 @@ import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.os.Bundle;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -31,7 +32,6 @@ import android.view.View;
|
||||
import android.view.WindowManager.LayoutParams;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.owncloud.android.R;
|
||||
import com.owncloud.android.datamodel.OCFile;
|
||||
@@ -116,10 +116,7 @@ public class CreateFolderDialogFragment
|
||||
.getText().toString().trim();
|
||||
|
||||
if (newFolderName.length() <= 0) {
|
||||
Toast.makeText(
|
||||
getActivity(),
|
||||
R.string.filename_empty,
|
||||
Toast.LENGTH_LONG).show();
|
||||
showSnackMessage(R.string.filename_empty);
|
||||
return;
|
||||
}
|
||||
boolean serverWithForbiddenChars = ((ComponentsGetter)getActivity()).
|
||||
@@ -132,7 +129,7 @@ public class CreateFolderDialogFragment
|
||||
} else {
|
||||
messageId = R.string.filename_forbidden_characters;
|
||||
}
|
||||
Toast.makeText(getActivity(), messageId, Toast.LENGTH_LONG).show();
|
||||
showSnackMessage(messageId);
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -143,5 +140,17 @@ public class CreateFolderDialogFragment
|
||||
getFileOperationsHelper().createFolder(path, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Show a temporary message in a Snackbar bound to the content view of the parent Activity
|
||||
*
|
||||
* @param messageResource Message to show.
|
||||
*/
|
||||
private void showSnackMessage(int messageResource) {
|
||||
Snackbar.make(
|
||||
getActivity().findViewById(android.R.id.content),
|
||||
messageResource,
|
||||
Snackbar.LENGTH_LONG
|
||||
).show();
|
||||
}
|
||||
}
|
||||
@@ -30,6 +30,7 @@ import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.os.Bundle;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -37,7 +38,6 @@ import android.view.View;
|
||||
import android.view.WindowManager.LayoutParams;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.owncloud.android.R;
|
||||
import com.owncloud.android.datamodel.OCFile;
|
||||
@@ -130,10 +130,7 @@ public class RenameFileDialogFragment
|
||||
.getText().toString().trim();
|
||||
|
||||
if (newFileName.length() <= 0) {
|
||||
Toast.makeText(
|
||||
getActivity(),
|
||||
R.string.filename_empty,
|
||||
Toast.LENGTH_LONG).show();
|
||||
showSnackMessage(R.string.filename_empty);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -147,7 +144,7 @@ public class RenameFileDialogFragment
|
||||
} else {
|
||||
messageId = R.string.filename_forbidden_characters;
|
||||
}
|
||||
Toast.makeText(getActivity(), messageId, Toast.LENGTH_LONG).show();
|
||||
showSnackMessage(messageId);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -156,4 +153,17 @@ public class RenameFileDialogFragment
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Show a temporary message in a Snackbar bound to the content view of the parent Activity
|
||||
*
|
||||
* @param messageResource Message to show.
|
||||
*/
|
||||
private void showSnackMessage(int messageResource) {
|
||||
Snackbar.make(
|
||||
getActivity().findViewById(android.R.id.content),
|
||||
messageResource,
|
||||
Snackbar.LENGTH_LONG
|
||||
).show();
|
||||
}
|
||||
}
|
||||
@@ -138,6 +138,7 @@ public class SamlWebViewDialog extends DialogFragment {
|
||||
|
||||
WebSettings webSettings = mSsoWebView.getSettings();
|
||||
webSettings.setJavaScriptEnabled(true);
|
||||
webSettings.setDomStorageEnabled(true);
|
||||
webSettings.setSavePassword(false);
|
||||
webSettings.setUserAgentString(MainApp.getUserAgent());
|
||||
webSettings.setSaveFormData(false);
|
||||
@@ -184,8 +185,8 @@ public class SamlWebViewDialog extends DialogFragment {
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
Log_OC.v(TAG, "onDestroyView");
|
||||
|
||||
if ((ViewGroup)mSsoWebView.getParent() != null) {
|
||||
|
||||
if (mSsoWebView.getParent() != null) {
|
||||
((ViewGroup)mSsoWebView.getParent()).removeView(mSsoWebView);
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.os.Bundle;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -29,7 +30,6 @@ import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.owncloud.android.R;
|
||||
import com.owncloud.android.datamodel.OCFile;
|
||||
@@ -115,10 +115,11 @@ public class SharePasswordDialogFragment extends DialogFragment
|
||||
.getText().toString();
|
||||
|
||||
if (password.length() <= 0) {
|
||||
Toast.makeText(
|
||||
getActivity(),
|
||||
Snackbar.make(
|
||||
getActivity().findViewById(android.R.id.content),
|
||||
R.string.share_link_empty_password,
|
||||
Toast.LENGTH_LONG).show();
|
||||
Snackbar.LENGTH_LONG
|
||||
).show();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,6 @@ import com.owncloud.android.ui.activity.UploadFilesActivity;
|
||||
import com.owncloud.android.ui.adapter.FileListListAdapter;
|
||||
import com.owncloud.android.ui.adapter.LocalFileListAdapter;
|
||||
import com.owncloud.android.ui.events.SearchEvent;
|
||||
import com.owncloud.android.utils.DisplayUtils;
|
||||
import com.owncloud.android.utils.ThemeUtils;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
@@ -788,7 +787,7 @@ public class ExtendedListFragment extends Fragment
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
if (searchType == SearchType.NO_SEARCH && mEmptyListProgress.getVisibility() == View.GONE) {
|
||||
if (searchType == SearchType.NO_SEARCH) {
|
||||
setMessageForEmptyList(
|
||||
R.string.file_list_empty_headline,
|
||||
R.string.file_list_empty,
|
||||
|
||||
@@ -320,17 +320,16 @@ public class FileDetailFragment extends FileFragment implements OnClickListener,
|
||||
return true;
|
||||
}
|
||||
case R.id.action_send_file: {
|
||||
// Obtain the file
|
||||
if (!getFile().isDown()) { // Download the file
|
||||
Log_OC.d(TAG, getFile().getRemotePath() + " : File must be downloaded");
|
||||
((FileDisplayActivity) mContainerActivity).startDownloadForSending(getFile(),
|
||||
OCFileListFragment.DOWNLOAD_SEND);
|
||||
// Obtain the file
|
||||
if (!getFile().isDown()) { // Download the file
|
||||
Log_OC.d(TAG, getFile().getRemotePath() + " : File must be downloaded");
|
||||
((FileDisplayActivity) mContainerActivity).startDownloadForSending(getFile(),
|
||||
OCFileListFragment.DOWNLOAD_SEND);
|
||||
} else {
|
||||
mContainerActivity.getFileOperationsHelper().sendDownloadedFile(getFile());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
mContainerActivity.getFileOperationsHelper().sendDownloadedFile(getFile());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
default:
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
@@ -497,7 +496,7 @@ public class FileDetailFragment extends FileFragment implements OnClickListener,
|
||||
task
|
||||
);
|
||||
iv.setImageDrawable(asyncDrawable);
|
||||
task.execute(file);
|
||||
task.execute(new ThumbnailsCacheManager.ThumbnailGenerationTaskObject(file, file.getRemoteId()));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -37,6 +37,7 @@ import android.preference.PreferenceManager;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.annotation.StringRes;
|
||||
import android.support.design.widget.BottomNavigationView;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.v4.widget.DrawerLayout;
|
||||
import android.support.v4.widget.SwipeRefreshLayout;
|
||||
import android.util.SparseBooleanArray;
|
||||
@@ -52,7 +53,6 @@ import android.widget.AdapterView;
|
||||
import android.widget.ListView;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.owncloud.android.MainApp;
|
||||
import com.owncloud.android.R;
|
||||
@@ -393,7 +393,7 @@ public class OCFileListFragment extends ExtendedListFragment implements OCFileLi
|
||||
|
||||
/**
|
||||
* registers {@link android.view.View.OnClickListener} and {@link android.view.View.OnLongClickListener}
|
||||
* on the Upload mini FAB for the linked action and {@link Toast} showing the underlying action.
|
||||
* on the Upload mini FAB for the linked action and {@link Snackbar} showing the underlying action.
|
||||
*/
|
||||
private void registerFabUploadListeners() {
|
||||
getFabUpload().setOnClickListener(new View.OnClickListener() {
|
||||
@@ -409,7 +409,7 @@ public class OCFileListFragment extends ExtendedListFragment implements OCFileLi
|
||||
getFabUpload().setOnLongClickListener(new View.OnLongClickListener() {
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
Toast.makeText(getActivity(), R.string.actionbar_upload, Toast.LENGTH_SHORT).show();
|
||||
showSnackMessage(R.string.actionbar_upload);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
@@ -417,7 +417,7 @@ public class OCFileListFragment extends ExtendedListFragment implements OCFileLi
|
||||
|
||||
/**
|
||||
* registers {@link android.view.View.OnClickListener} and {@link android.view.View.OnLongClickListener}
|
||||
* on the 'Create Dir' mini FAB for the linked action and {@link Toast} showing the underlying action.
|
||||
* on the 'Create Dir' mini FAB for the linked action and {@link Snackbar} showing the underlying action.
|
||||
*/
|
||||
private void registerFabMkDirListeners() {
|
||||
getFabMkdir().setOnClickListener(new View.OnClickListener() {
|
||||
@@ -434,7 +434,7 @@ public class OCFileListFragment extends ExtendedListFragment implements OCFileLi
|
||||
getFabMkdir().setOnLongClickListener(new View.OnLongClickListener() {
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
Toast.makeText(getActivity(), R.string.actionbar_mkdir, Toast.LENGTH_SHORT).show();
|
||||
showSnackMessage(R.string.actionbar_mkdir);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
@@ -442,7 +442,7 @@ public class OCFileListFragment extends ExtendedListFragment implements OCFileLi
|
||||
|
||||
/**
|
||||
* registers {@link android.view.View.OnClickListener} and {@link android.view.View.OnLongClickListener}
|
||||
* on the Upload from App mini FAB for the linked action and {@link Toast} showing the underlying action.
|
||||
* on the Upload from App mini FAB for the linked action and {@link Snackbar} showing the underlying action.
|
||||
*/
|
||||
private void registerFabUploadFromAppListeners() {
|
||||
getFabUploadFromApp().setOnClickListener(new View.OnClickListener() {
|
||||
@@ -466,9 +466,7 @@ public class OCFileListFragment extends ExtendedListFragment implements OCFileLi
|
||||
getFabUploadFromApp().setOnLongClickListener(new View.OnLongClickListener() {
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
Toast.makeText(getActivity(),
|
||||
R.string.actionbar_upload_from_apps,
|
||||
Toast.LENGTH_SHORT).show();
|
||||
showSnackMessage(R.string.actionbar_upload_from_apps);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
@@ -932,14 +930,21 @@ public class OCFileListFragment extends ExtendedListFragment implements OCFileLi
|
||||
return true;
|
||||
}
|
||||
case R.id.action_send_file: {
|
||||
// Obtain the file
|
||||
if (!singleFile.isDown()) { // Download the file
|
||||
Log_OC.d(TAG, singleFile.getRemotePath() + " : File must be downloaded");
|
||||
((FileDisplayActivity) mContainerActivity).startDownloadForSending(singleFile, DOWNLOAD_SEND);
|
||||
if (MimeTypeUtil.isImage(singleFile) && !singleFile.isDown()) {
|
||||
mContainerActivity.getFileOperationsHelper().sendCachedImage(singleFile);
|
||||
return true;
|
||||
} else {
|
||||
mContainerActivity.getFileOperationsHelper().sendDownloadedFile(singleFile);
|
||||
// Obtain the file
|
||||
if (!singleFile.isDown()) { // Download the file
|
||||
Log_OC.d(TAG, singleFile.getRemotePath() + " : File must be downloaded");
|
||||
((FileDisplayActivity) mContainerActivity).startDownloadForSending(singleFile,
|
||||
DOWNLOAD_SEND);
|
||||
|
||||
} else {
|
||||
mContainerActivity.getFileOperationsHelper().sendDownloadedFile(singleFile);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
case R.id.action_set_as_wallpaper: {
|
||||
if (singleFile.isDown()) {
|
||||
@@ -1617,4 +1622,17 @@ public class OCFileListFragment extends ExtendedListFragment implements OCFileLi
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Show a temporary message in a Snackbar bound to the content view of the parent Activity
|
||||
*
|
||||
* @param messageResource Message to show.
|
||||
*/
|
||||
private void showSnackMessage(int messageResource) {
|
||||
Snackbar.make(
|
||||
getActivity().findViewById(android.R.id.content),
|
||||
messageResource,
|
||||
Snackbar.LENGTH_LONG
|
||||
).show();
|
||||
}
|
||||
}
|
||||
@@ -43,7 +43,6 @@ import android.widget.ListAdapter;
|
||||
import android.widget.ListView;
|
||||
import android.widget.ScrollView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.owncloud.android.R;
|
||||
import com.owncloud.android.authentication.AccountUtils;
|
||||
@@ -247,8 +246,11 @@ public class ShareFileFragment extends Fragment implements ShareUserListAdapter.
|
||||
// Show Search Fragment
|
||||
mListener.showSearchUsersAndGroups();
|
||||
} else {
|
||||
String message = getString(R.string.share_sharee_unavailable);
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_LONG).show();
|
||||
Snackbar.make(
|
||||
getActivity().findViewById(android.R.id.content),
|
||||
getString(R.string.share_sharee_unavailable),
|
||||
Snackbar.LENGTH_LONG
|
||||
).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -45,6 +45,7 @@ import com.owncloud.android.lib.common.utils.Log_OC;
|
||||
import com.owncloud.android.lib.resources.shares.OCShare;
|
||||
import com.owncloud.android.lib.resources.shares.ShareType;
|
||||
import com.owncloud.android.lib.resources.status.OwnCloudVersion;
|
||||
import com.owncloud.android.providers.DiskLruImageCacheFileProvider;
|
||||
import com.owncloud.android.services.OperationsService;
|
||||
import com.owncloud.android.services.observer.FileObserverService;
|
||||
import com.owncloud.android.ui.activity.FileActivity;
|
||||
@@ -190,10 +191,10 @@ public class FileOperationsHelper {
|
||||
)
|
||||
);
|
||||
} catch (ActivityNotFoundException anfe) {
|
||||
showNoAppForFileTypeToast(mFileActivity.getApplicationContext());
|
||||
mFileActivity.showSnackMessage(mFileActivity.getString(R.string.file_list_no_app_for_file_type));
|
||||
}
|
||||
} else {
|
||||
showNoAppForFileTypeToast(mFileActivity.getApplicationContext());
|
||||
mFileActivity.showSnackMessage(mFileActivity.getString(R.string.file_list_no_app_for_file_type));
|
||||
}
|
||||
|
||||
} else {
|
||||
@@ -201,18 +202,6 @@ public class FileOperationsHelper {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays a toast stating that no application could be found to open the file.
|
||||
*
|
||||
* @param context the context to be able to show a toast.
|
||||
*/
|
||||
private void showNoAppForFileTypeToast(Context context) {
|
||||
Toast.makeText(context,
|
||||
R.string.file_list_no_app_for_file_type, Toast.LENGTH_SHORT)
|
||||
.show();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Helper method to share a file via a public link. Starts a request to do it in {@link OperationsService}
|
||||
*
|
||||
@@ -242,11 +231,7 @@ public class FileOperationsHelper {
|
||||
|
||||
} else {
|
||||
// Show a Message
|
||||
Toast t = Toast.makeText(
|
||||
mFileActivity, mFileActivity.getString(R.string.share_link_no_support_share_api),
|
||||
Toast.LENGTH_LONG
|
||||
);
|
||||
t.show();
|
||||
mFileActivity.showSnackMessage(mFileActivity.getString(R.string.share_link_no_support_share_api));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -267,11 +252,7 @@ public class FileOperationsHelper {
|
||||
}
|
||||
} else {
|
||||
// Show a Message
|
||||
Toast t = Toast.makeText(
|
||||
mFileActivity, mFileActivity.getString(R.string.share_link_no_support_share_api),
|
||||
Toast.LENGTH_LONG
|
||||
);
|
||||
t.show();
|
||||
mFileActivity.showSnackMessage(mFileActivity.getString(R.string.share_link_no_support_share_api));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -360,11 +341,7 @@ public class FileOperationsHelper {
|
||||
|
||||
} else {
|
||||
// Show a Message
|
||||
Toast t = Toast.makeText(mFileActivity,
|
||||
mFileActivity.getString(R.string.share_link_no_support_share_api),
|
||||
Toast.LENGTH_LONG);
|
||||
t.show();
|
||||
|
||||
mFileActivity.showSnackMessage(mFileActivity.getString(R.string.share_link_no_support_share_api));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -378,7 +355,6 @@ public class FileOperationsHelper {
|
||||
intent.putExtra(FileActivity.EXTRA_FILE, file);
|
||||
intent.putExtra(FileActivity.EXTRA_ACCOUNT, mFileActivity.getAccount());
|
||||
mFileActivity.startActivity(intent);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -532,6 +508,22 @@ public class FileOperationsHelper {
|
||||
}
|
||||
}
|
||||
|
||||
public void sendCachedImage(OCFile file) {
|
||||
// // TODO check if already exists in cache, else download resized image first
|
||||
if (file != null) {
|
||||
Intent sendIntent = new Intent(Intent.ACTION_SEND);
|
||||
// set MimeType
|
||||
sendIntent.setType(file.getMimetype());
|
||||
sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("content://" + DiskLruImageCacheFileProvider.AUTHORITY +
|
||||
file.getRemotePath()));
|
||||
sendIntent.putExtra(Intent.ACTION_SEND, true); // Send Action
|
||||
|
||||
mFileActivity.startActivity(Intent.createChooser(sendIntent, "Send"));
|
||||
} else {
|
||||
Log_OC.wtf(TAG, "Trying to send a NULL OCFile");
|
||||
}
|
||||
}
|
||||
|
||||
public void setPictureAs(OCFile file) {
|
||||
if (file != null) {
|
||||
if (file.isDown()) {
|
||||
|
||||
@@ -31,6 +31,7 @@ public class ImageViewCustom extends AppCompatImageView {
|
||||
private long mMovieDuration;
|
||||
private long mMovieRunDuration;
|
||||
private long mLastTick;
|
||||
protected PreviewImageFragment previewImageFragment;
|
||||
|
||||
public ImageViewCustom(Context context) {
|
||||
super(context);
|
||||
@@ -143,4 +144,7 @@ public class ImageViewCustom extends AppCompatImageView {
|
||||
}
|
||||
}
|
||||
|
||||
public void setPreviewImageFragment(PreviewImageFragment previewImageFragment) {
|
||||
this.previewImageFragment = previewImageFragment;
|
||||
}
|
||||
}
|
||||
@@ -26,6 +26,7 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.content.ServiceConnection;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.os.IBinder;
|
||||
import android.support.v4.view.ViewPager;
|
||||
@@ -41,6 +42,7 @@ import com.owncloud.android.authentication.AccountUtils;
|
||||
import com.owncloud.android.datamodel.FileDataStorageManager;
|
||||
import com.owncloud.android.datamodel.OCFile;
|
||||
import com.owncloud.android.datamodel.VirtualFolderType;
|
||||
import com.owncloud.android.db.PreferenceManager;
|
||||
import com.owncloud.android.files.services.FileDownloader;
|
||||
import com.owncloud.android.files.services.FileDownloader.FileDownloaderBinder;
|
||||
import com.owncloud.android.files.services.FileUploader;
|
||||
@@ -121,13 +123,13 @@ public class PreviewImageActivity extends FileActivity implements
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
if (savedInstanceState != null) {
|
||||
mRequestWaitingForBinder = savedInstanceState.getBoolean(KEY_WAITING_FOR_BINDER);
|
||||
} else {
|
||||
mRequestWaitingForBinder = false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void initViewPager() {
|
||||
@@ -149,7 +151,7 @@ public class PreviewImageActivity extends FileActivity implements
|
||||
}
|
||||
|
||||
mPreviewImagePagerAdapter = new PreviewImagePagerAdapter(getSupportFragmentManager(),
|
||||
parentFolder, getAccount(), getStorageManager(), MainApp.isOnlyOnDevice());
|
||||
parentFolder, getAccount(), getStorageManager(), MainApp.isOnlyOnDevice(), getBaseContext());
|
||||
}
|
||||
|
||||
mViewPager = (ExtendedViewPager) findViewById(R.id.fragmentPager);
|
||||
@@ -195,7 +197,7 @@ public class PreviewImageActivity extends FileActivity implements
|
||||
private void onSynchronizeFileOperationFinish(SynchronizeFileOperation operation,
|
||||
RemoteOperationResult result) {
|
||||
if (result.isSuccess()) {
|
||||
invalidateOptionsMenu();
|
||||
supportInvalidateOptionsMenu();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -325,7 +327,7 @@ public class PreviewImageActivity extends FileActivity implements
|
||||
finish();
|
||||
}
|
||||
|
||||
private void requestForDownload(OCFile file) {
|
||||
public void requestForDownload(OCFile file) {
|
||||
if (mDownloaderBinder == null) {
|
||||
Log_OC.d(TAG, "requestForDownload called without binder to download service");
|
||||
|
||||
@@ -349,13 +351,16 @@ public class PreviewImageActivity extends FileActivity implements
|
||||
mHasSavedPosition = true;
|
||||
if (mDownloaderBinder == null) {
|
||||
mRequestWaitingForBinder = true;
|
||||
|
||||
} else {
|
||||
OCFile currentFile = mPreviewImagePagerAdapter.getFileAt(position);
|
||||
getSupportActionBar().setTitle(currentFile.getFileName());
|
||||
setDrawerIndicatorEnabled(false);
|
||||
if (!currentFile.isDown()
|
||||
&& !mPreviewImagePagerAdapter.pendingErrorAt(position)) {
|
||||
|
||||
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getBaseContext());
|
||||
String behaviour = sharedPreferences.getString("preview_behaviour", "PREVIEW_BEHAVIOUR_PREVIEW");
|
||||
boolean resizedBehaviour = behaviour.equalsIgnoreCase("PREVIEW_BEHAVIOUR_PREVIEW");
|
||||
|
||||
if (!currentFile.isDown() && !mPreviewImagePagerAdapter.pendingErrorAt(position) && !resizedBehaviour) {
|
||||
requestForDownload(currentFile);
|
||||
}
|
||||
|
||||
@@ -456,6 +461,10 @@ public class PreviewImageActivity extends FileActivity implements
|
||||
}
|
||||
}
|
||||
|
||||
public void switchToFullScreen() {
|
||||
hideSystemUI(mFullScreenAnchorView);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onAccountSet(boolean stateWasRecovered) {
|
||||
super.onAccountSet(stateWasRecovered);
|
||||
@@ -473,7 +482,7 @@ public class PreviewImageActivity extends FileActivity implements
|
||||
if (file.getFileId() > FileDataStorageManager.ROOT_PARENT_ID) {
|
||||
file = getStorageManager().getFileById(file.getFileId());
|
||||
}
|
||||
|
||||
|
||||
if (file != null) {
|
||||
/// Refresh the activity according to the Account and OCFile set
|
||||
setFile(file); // reset after getting it fresh from storageManager
|
||||
|
||||
@@ -35,6 +35,7 @@ import android.os.Bundle;
|
||||
import android.os.Process;
|
||||
import android.support.annotation.DrawableRes;
|
||||
import android.support.annotation.StringRes;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.v4.app.FragmentStatePagerAdapter;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -52,8 +53,10 @@ import android.widget.TextView;
|
||||
|
||||
import com.caverock.androidsvg.SVG;
|
||||
import com.caverock.androidsvg.SVGParseException;
|
||||
import com.owncloud.android.MainApp;
|
||||
import com.owncloud.android.R;
|
||||
import com.owncloud.android.datamodel.OCFile;
|
||||
import com.owncloud.android.datamodel.ThumbnailsCacheManager;
|
||||
import com.owncloud.android.files.FileMenuFilter;
|
||||
import com.owncloud.android.lib.common.utils.Log_OC;
|
||||
import com.owncloud.android.ui.dialog.ConfirmationDialogFragment;
|
||||
@@ -87,7 +90,7 @@ public class PreviewImageFragment extends FileFragment {
|
||||
|
||||
private static final String ARG_FILE = "FILE";
|
||||
private static final String ARG_IGNORE_FIRST = "IGNORE_FIRST";
|
||||
|
||||
private static final String ARG_SHOW_RESIZED_IMAGE = "SHOW_RESIZED_IMAGE";
|
||||
private static final String SCREEN_NAME = "Image Preview";
|
||||
|
||||
private TouchImageViewCustom mImageView;
|
||||
@@ -99,6 +102,8 @@ public class PreviewImageFragment extends FileFragment {
|
||||
protected ImageView mMultiListIcon;
|
||||
protected ProgressBar mMultiListProgress;
|
||||
|
||||
private Boolean mShowResizedImage = false;
|
||||
|
||||
public Bitmap mBitmap = null;
|
||||
|
||||
private static final String TAG = PreviewImageFragment.class.getSimpleName();
|
||||
@@ -121,11 +126,14 @@ public class PreviewImageFragment extends FileFragment {
|
||||
* {@link FragmentStatePagerAdapter}
|
||||
* ; TODO better solution
|
||||
*/
|
||||
public static PreviewImageFragment newInstance(OCFile imageFile, boolean ignoreFirstSavedState) {
|
||||
public static PreviewImageFragment newInstance(OCFile imageFile, boolean ignoreFirstSavedState,
|
||||
boolean showResizedImage) {
|
||||
PreviewImageFragment frag = new PreviewImageFragment();
|
||||
frag.mShowResizedImage = showResizedImage;
|
||||
Bundle args = new Bundle();
|
||||
args.putParcelable(ARG_FILE, imageFile);
|
||||
args.putBoolean(ARG_IGNORE_FIRST, ignoreFirstSavedState);
|
||||
args.putBoolean(ARG_SHOW_RESIZED_IMAGE, showResizedImage);
|
||||
frag.setArguments(args);
|
||||
return frag;
|
||||
}
|
||||
@@ -157,6 +165,7 @@ public class PreviewImageFragment extends FileFragment {
|
||||
// not right now
|
||||
|
||||
mIgnoreFirstSavedState = args.getBoolean(ARG_IGNORE_FIRST);
|
||||
mShowResizedImage = args.getBoolean(ARG_SHOW_RESIZED_IMAGE);
|
||||
setHasOptionsMenu(true);
|
||||
}
|
||||
|
||||
@@ -170,6 +179,7 @@ public class PreviewImageFragment extends FileFragment {
|
||||
super.onCreateView(inflater, container, savedInstanceState);
|
||||
View view = inflater.inflate(R.layout.preview_image_fragment, container, false);
|
||||
mImageView = (TouchImageViewCustom) view.findViewById(R.id.image);
|
||||
mImageView.setPreviewImageFragment(this);
|
||||
mImageView.setVisibility(View.GONE);
|
||||
|
||||
view.setOnClickListener(new OnClickListener() {
|
||||
@@ -196,6 +206,14 @@ public class PreviewImageFragment extends FileFragment {
|
||||
return view;
|
||||
}
|
||||
|
||||
public void switchToFullScreen() {
|
||||
((PreviewImageActivity) getActivity()).switchToFullScreen();
|
||||
}
|
||||
|
||||
public void downloadFile() {
|
||||
((PreviewImageActivity) getActivity()).requestForDownload(getFile());
|
||||
}
|
||||
|
||||
protected void setupMultiView(View view) {
|
||||
mMultiListContainer = (LinearLayout) view.findViewById(R.id.empty_list_view);
|
||||
mMultiListMessage = (TextView) view.findViewById(R.id.empty_list_view_text);
|
||||
@@ -221,9 +239,6 @@ public class PreviewImageFragment extends FileFragment {
|
||||
if (getFile() == null) {
|
||||
throw new IllegalStateException("Instanced with a NULL OCFile");
|
||||
}
|
||||
if (!getFile().isDown()) {
|
||||
throw new IllegalStateException("There is no local file to preview");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -241,10 +256,60 @@ public class PreviewImageFragment extends FileFragment {
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
if (getFile() != null) {
|
||||
mLoadBitmapTask = new LoadBitmapTask(mImageView);
|
||||
//mLoadBitmapTask.execute(new String[]{getFile().getStoragePath()});
|
||||
// mLoadBitmapTask.execute(getFile().getStoragePath());
|
||||
mLoadBitmapTask.execute(getFile());
|
||||
mImageView.setTag(getFile().getFileId());
|
||||
|
||||
if (mShowResizedImage) {
|
||||
Bitmap resizedImage = ThumbnailsCacheManager.getBitmapFromDiskCache(
|
||||
String.valueOf("r" + getFile().getRemoteId()));
|
||||
|
||||
if (resizedImage != null && !getFile().needsUpdateThumbnail()) {
|
||||
mImageView.setImageBitmap(resizedImage);
|
||||
mImageView.setVisibility(View.VISIBLE);
|
||||
mBitmap = resizedImage;
|
||||
} else {
|
||||
// show thumbnail while loading resized image
|
||||
Bitmap thumbnail = ThumbnailsCacheManager.getBitmapFromDiskCache(
|
||||
String.valueOf("t" + getFile().getRemoteId()));
|
||||
|
||||
if (thumbnail != null) {
|
||||
mImageView.setImageBitmap(thumbnail);
|
||||
mImageView.setVisibility(View.VISIBLE);
|
||||
mBitmap = thumbnail;
|
||||
} else {
|
||||
thumbnail = ThumbnailsCacheManager.mDefaultImg;
|
||||
}
|
||||
|
||||
// generate new resized image
|
||||
if (ThumbnailsCacheManager.cancelPotentialThumbnailWork(getFile(), mImageView) &&
|
||||
mContainerActivity.getStorageManager() != null) {
|
||||
final ThumbnailsCacheManager.ResizedImageGenerationTask task =
|
||||
new ThumbnailsCacheManager.ResizedImageGenerationTask(PreviewImageFragment.this,
|
||||
mImageView,
|
||||
mContainerActivity.getStorageManager(),
|
||||
mContainerActivity.getStorageManager().getAccount());
|
||||
if (resizedImage == null) {
|
||||
resizedImage = thumbnail;
|
||||
}
|
||||
final ThumbnailsCacheManager.AsyncResizedImageDrawable asyncDrawable =
|
||||
new ThumbnailsCacheManager.AsyncResizedImageDrawable(
|
||||
MainApp.getAppContext().getResources(),
|
||||
resizedImage,
|
||||
task
|
||||
);
|
||||
mImageView.setImageDrawable(asyncDrawable);
|
||||
task.execute(getFile());
|
||||
}
|
||||
}
|
||||
mMultiView.setVisibility(View.GONE);
|
||||
if (getResources() != null) {
|
||||
mImageView.setBackgroundColor(getResources().getColor(R.color.black));
|
||||
}
|
||||
mImageView.setVisibility(View.VISIBLE);
|
||||
|
||||
} else {
|
||||
mLoadBitmapTask = new LoadBitmapTask(mImageView);
|
||||
mLoadBitmapTask.execute(getFile());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -359,9 +424,15 @@ public class PreviewImageFragment extends FileFragment {
|
||||
return true;
|
||||
|
||||
case R.id.action_send_file:
|
||||
mContainerActivity.getFileOperationsHelper().sendDownloadedFile(getFile());
|
||||
return true;
|
||||
if (MimeTypeUtil.isImage(getFile()) && !getFile().isDown()) {
|
||||
mContainerActivity.getFileOperationsHelper().sendCachedImage(getFile());
|
||||
return true;
|
||||
} else {
|
||||
mContainerActivity.getFileOperationsHelper().sendDownloadedFile(getFile());
|
||||
return true;
|
||||
}
|
||||
|
||||
case R.id.action_download_file:
|
||||
case R.id.action_sync_file:
|
||||
mContainerActivity.getFileOperationsHelper().syncFile(getFile());
|
||||
return true;
|
||||
@@ -652,6 +723,16 @@ public class PreviewImageFragment extends FileFragment {
|
||||
}
|
||||
}
|
||||
|
||||
public void setErrorPreviewMessage() {
|
||||
Snackbar.make(mMultiView, "No resized image possible. Download full image?", Snackbar.LENGTH_INDEFINITE)
|
||||
.setAction("Yes", new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
downloadFile();
|
||||
}
|
||||
}).show();
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to test if an {@link OCFile} can be passed to a {@link PreviewImageFragment}
|
||||
* to be previewed.
|
||||
@@ -678,19 +759,22 @@ public class PreviewImageFragment extends FileFragment {
|
||||
getFile().getMimetype().equalsIgnoreCase("image/svg+xml")) && getActivity() != null
|
||||
&& getActivity() instanceof PreviewImageActivity && getResources() != null) {
|
||||
PreviewImageActivity previewImageActivity = (PreviewImageActivity) getActivity();
|
||||
LayerDrawable layerDrawable = (LayerDrawable) mImageView.getDrawable();
|
||||
Drawable layerOne;
|
||||
|
||||
if (previewImageActivity.getSystemUIVisible()) {
|
||||
layerOne = getResources().getDrawable(R.color.white);
|
||||
} else {
|
||||
layerOne = getResources().getDrawable(R.drawable.backrepeat);
|
||||
if (mImageView.getDrawable() instanceof LayerDrawable) {
|
||||
LayerDrawable layerDrawable = (LayerDrawable) mImageView.getDrawable();
|
||||
Drawable layerOne;
|
||||
|
||||
if (previewImageActivity.getSystemUIVisible()) {
|
||||
layerOne = getResources().getDrawable(R.color.white);
|
||||
} else {
|
||||
layerOne = getResources().getDrawable(R.drawable.backrepeat);
|
||||
}
|
||||
|
||||
layerDrawable.setDrawableByLayerId(layerDrawable.getId(0), layerOne);
|
||||
|
||||
mImageView.setImageDrawable(layerDrawable);
|
||||
mImageView.invalidate();
|
||||
}
|
||||
|
||||
layerDrawable.setDrawableByLayerId(layerDrawable.getId(0), layerOne);
|
||||
|
||||
mImageView.setImageDrawable(layerDrawable);
|
||||
mImageView.invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
package com.owncloud.android.ui.preview;
|
||||
|
||||
import android.accounts.Account;
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.support.v4.app.FragmentStatePagerAdapter;
|
||||
@@ -28,6 +30,7 @@ import android.view.ViewGroup;
|
||||
import com.owncloud.android.datamodel.FileDataStorageManager;
|
||||
import com.owncloud.android.datamodel.OCFile;
|
||||
import com.owncloud.android.datamodel.VirtualFolderType;
|
||||
import com.owncloud.android.db.PreferenceManager;
|
||||
import com.owncloud.android.ui.fragment.FileFragment;
|
||||
import com.owncloud.android.utils.FileStorageUtils;
|
||||
|
||||
@@ -50,7 +53,8 @@ public class PreviewImagePagerAdapter extends FragmentStatePagerAdapter {
|
||||
private Set<Integer> mObsoletePositions;
|
||||
private Set<Integer> mDownloadErrors;
|
||||
private FileDataStorageManager mStorageManager;
|
||||
|
||||
private Context mContext;
|
||||
|
||||
private Map<Integer, FileFragment> mCachedFragments;
|
||||
|
||||
/**
|
||||
@@ -63,7 +67,7 @@ public class PreviewImagePagerAdapter extends FragmentStatePagerAdapter {
|
||||
*/
|
||||
public PreviewImagePagerAdapter(FragmentManager fragmentManager, OCFile parentFolder,
|
||||
Account account, FileDataStorageManager storageManager,
|
||||
boolean onlyOnDevice) {
|
||||
boolean onlyOnDevice, Context context) {
|
||||
super(fragmentManager);
|
||||
|
||||
if (fragmentManager == null) {
|
||||
@@ -76,6 +80,7 @@ public class PreviewImagePagerAdapter extends FragmentStatePagerAdapter {
|
||||
throw new IllegalArgumentException("NULL storage manager");
|
||||
}
|
||||
|
||||
mContext = context;
|
||||
mAccount = account;
|
||||
mStorageManager = storageManager;
|
||||
mImageFiles = mStorageManager.getFolderImages(parentFolder, onlyOnDevice);
|
||||
@@ -140,20 +145,27 @@ public class PreviewImagePagerAdapter extends FragmentStatePagerAdapter {
|
||||
OCFile file = mImageFiles.get(i);
|
||||
Fragment fragment = null;
|
||||
if (file.isDown()) {
|
||||
fragment = PreviewImageFragment.newInstance(file,
|
||||
mObsoletePositions.contains(Integer.valueOf(i)));
|
||||
|
||||
} else if (mDownloadErrors.contains(Integer.valueOf(i))) {
|
||||
fragment = FileDownloadFragment.newInstance(file, mAccount, true);
|
||||
((FileDownloadFragment)fragment).setError(true);
|
||||
mDownloadErrors.remove(Integer.valueOf(i));
|
||||
fragment = PreviewImageFragment.newInstance(file, mObsoletePositions.contains(i), false);
|
||||
|
||||
} else {
|
||||
fragment = FileDownloadFragment.newInstance(
|
||||
file, mAccount, mObsoletePositions.contains(Integer.valueOf(i))
|
||||
);
|
||||
if (mDownloadErrors.contains(i)) {
|
||||
fragment = FileDownloadFragment.newInstance(file, mAccount, true);
|
||||
((FileDownloadFragment)fragment).setError(true);
|
||||
mDownloadErrors.remove(i);
|
||||
} else {
|
||||
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(mContext);
|
||||
boolean behaviour = sharedPreferences.getString("preview_behaviour", "PREVIEW_BEHAVIOUR_PREVIEW")
|
||||
.equalsIgnoreCase("PREVIEW_BEHAVIOUR_PREVIEW");
|
||||
|
||||
if (behaviour) {
|
||||
fragment = PreviewImageFragment.newInstance(file, mObsoletePositions.contains(i), true);
|
||||
} else {
|
||||
fragment = FileDownloadFragment.newInstance(file, mAccount, mObsoletePositions.contains(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
mObsoletePositions.remove(Integer.valueOf(i));
|
||||
|
||||
mObsoletePositions.remove(i);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,10 @@ package com.owncloud.android.ui.preview;
|
||||
import android.accounts.Account;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.support.v4.view.MenuItemCompat;
|
||||
import android.support.v7.widget.SearchView;
|
||||
import android.text.Html;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
@@ -44,6 +48,7 @@ import com.owncloud.android.ui.dialog.RemoveFilesDialogFragment;
|
||||
import com.owncloud.android.ui.fragment.FileFragment;
|
||||
import com.owncloud.android.utils.AnalyticsUtils;
|
||||
import com.owncloud.android.utils.MimeTypeUtil;
|
||||
import com.owncloud.android.utils.StringUtils;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.FileInputStream;
|
||||
@@ -55,7 +60,7 @@ import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Scanner;
|
||||
|
||||
public class PreviewTextFragment extends FileFragment {
|
||||
public class PreviewTextFragment extends FileFragment implements SearchView.OnQueryTextListener {
|
||||
private static final String EXTRA_FILE = "FILE";
|
||||
private static final String EXTRA_ACCOUNT = "ACCOUNT";
|
||||
private static final String TAG = PreviewTextFragment.class.getSimpleName();
|
||||
@@ -66,6 +71,14 @@ public class PreviewTextFragment extends FileFragment {
|
||||
private TextView mTextPreview;
|
||||
private TextLoadAsyncTask mTextLoadTask;
|
||||
|
||||
private String mOriginalText;
|
||||
|
||||
private Handler mHandler;
|
||||
private SearchView mSearchView;
|
||||
|
||||
private String mSearchQuery = "";
|
||||
private boolean mSearchOpen;
|
||||
|
||||
private RelativeLayout mMultiView;
|
||||
|
||||
protected LinearLayout mMultiListContainer;
|
||||
@@ -100,7 +113,6 @@ public class PreviewTextFragment extends FileFragment {
|
||||
|
||||
|
||||
View ret = inflater.inflate(R.layout.text_file_preview, container, false);
|
||||
|
||||
mTextPreview = (TextView) ret.findViewById(R.id.text_preview);
|
||||
|
||||
mMultiView = (RelativeLayout) ret.findViewById(R.id.multi_view);
|
||||
@@ -136,6 +148,7 @@ public class PreviewTextFragment extends FileFragment {
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setHasOptionsMenu(true);
|
||||
|
||||
OCFile file = getFile();
|
||||
|
||||
@@ -149,6 +162,11 @@ public class PreviewTextFragment extends FileFragment {
|
||||
mAccount = args.getParcelable(FileDisplayActivity.EXTRA_ACCOUNT);
|
||||
}
|
||||
|
||||
if (args.containsKey(FileDisplayActivity.EXTRA_SEARCH_QUERY)) {
|
||||
mSearchQuery = args.getString(FileDisplayActivity.EXTRA_SEARCH_QUERY);
|
||||
}
|
||||
mSearchOpen = args.getBoolean(FileDisplayActivity.EXTRA_SEARCH, false);
|
||||
|
||||
if (savedInstanceState == null) {
|
||||
if (file == null) {
|
||||
throw new IllegalStateException("Instanced with a NULL OCFile");
|
||||
@@ -156,12 +174,14 @@ public class PreviewTextFragment extends FileFragment {
|
||||
if (mAccount == null) {
|
||||
throw new IllegalStateException("Instanced with a NULL ownCloud Account");
|
||||
}
|
||||
|
||||
} else {
|
||||
file = savedInstanceState.getParcelable(EXTRA_FILE);
|
||||
mAccount = savedInstanceState.getParcelable(EXTRA_ACCOUNT);
|
||||
}
|
||||
|
||||
mHandler = new Handler();
|
||||
setFile(file);
|
||||
setHasOptionsMenu(true);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -182,12 +202,55 @@ public class PreviewTextFragment extends FileFragment {
|
||||
loadAndShowTextPreview();
|
||||
}
|
||||
|
||||
|
||||
private void loadAndShowTextPreview() {
|
||||
mTextLoadTask = new TextLoadAsyncTask(new WeakReference<TextView>(mTextPreview));
|
||||
mTextLoadTask.execute(getFile().getStoragePath());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onQueryTextSubmit(String query) {
|
||||
performSearch(query, 0);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onQueryTextChange(final String newText) {
|
||||
performSearch(newText, 500);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
private void performSearch(final String query, int delay) {
|
||||
mHandler.removeCallbacksAndMessages(null);
|
||||
|
||||
if (mOriginalText != null) {
|
||||
if (getActivity() != null && getActivity() instanceof FileDisplayActivity) {
|
||||
FileDisplayActivity fileDisplayActivity = (FileDisplayActivity) getActivity();
|
||||
fileDisplayActivity.setSearchQuery(query);
|
||||
}
|
||||
mHandler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (query != null && !query.isEmpty()) {
|
||||
if (getContext() != null && getContext().getResources() != null) {
|
||||
String coloredText = StringUtils.searchAndColor(mOriginalText, query,
|
||||
getContext().getResources().getColor(R.color.primary));
|
||||
mTextPreview.setText(Html.fromHtml(coloredText.replace("\n", "<br \\>")));
|
||||
}
|
||||
} else {
|
||||
mTextPreview.setText(mOriginalText);
|
||||
}
|
||||
}
|
||||
}, delay);
|
||||
}
|
||||
|
||||
if (delay == 0 && mSearchView != null) {
|
||||
mSearchView.clearFocus();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads the file to preview and shows its contents. Too critical to be anonymous.
|
||||
*/
|
||||
@@ -254,7 +317,12 @@ public class PreviewTextFragment extends FileFragment {
|
||||
final TextView textView = mTextViewReference.get();
|
||||
|
||||
if (textView != null) {
|
||||
textView.setText(new String(stringWriter.getBuffer()));
|
||||
mOriginalText = stringWriter.toString();
|
||||
mSearchView.setOnQueryTextListener(PreviewTextFragment.this);
|
||||
textView.setText(mOriginalText);
|
||||
if (mSearchOpen) {
|
||||
mSearchView.setQuery(mSearchQuery, true);
|
||||
}
|
||||
textView.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
@@ -273,6 +341,18 @@ public class PreviewTextFragment extends FileFragment {
|
||||
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
||||
super.onCreateOptionsMenu(menu, inflater);
|
||||
inflater.inflate(R.menu.file_actions_menu, menu);
|
||||
|
||||
MenuItem menuItem = menu.findItem(R.id.action_search);
|
||||
menuItem.setVisible(true);
|
||||
mSearchView = (SearchView) MenuItemCompat.getActionView(menuItem);
|
||||
mSearchView.setMaxWidth(Integer.MAX_VALUE);
|
||||
|
||||
if (mSearchOpen) {
|
||||
mSearchView.setIconified(false);
|
||||
mSearchView.setQuery(mSearchQuery, false);
|
||||
mSearchView.clearFocus();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -81,6 +81,7 @@ public class PreviewVideoActivity extends FileActivity implements OnCompletionLi
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
Log_OC.v(TAG, "onCreate");
|
||||
|
||||
setContentView(R.layout.video_layout);
|
||||
|
||||
@@ -1,25 +1,29 @@
|
||||
/**
|
||||
* ownCloud Android client application
|
||||
* ownCloud Android client application
|
||||
*
|
||||
* @author masensio
|
||||
* Copyright (C) 2014 ownCloud Inc.
|
||||
* @author masensio
|
||||
* Copyright (C) 2016 ownCloud GmbH.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2,
|
||||
* as published by the Free Software Foundation.
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
package com.owncloud.android.utils;
|
||||
|
||||
import android.content.res.Resources;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
|
||||
import com.owncloud.android.R;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperation;
|
||||
@@ -47,101 +51,76 @@ import java.net.SocketTimeoutException;
|
||||
|
||||
/**
|
||||
* Class to choose proper error messages to show to the user depending on the results of operations,
|
||||
* always following the same policy.
|
||||
* always following the same policy
|
||||
*/
|
||||
public class ErrorMessageAdapter {
|
||||
/**
|
||||
* Return an internationalized user message corresponding to an operation result
|
||||
* and the operation performed.
|
||||
*
|
||||
* @param result Result of a {@link RemoteOperation} performed.
|
||||
* @param operation Operation performed.
|
||||
* @param res Reference to app resources, for i18n.
|
||||
* @return User message corresponding to 'result' and 'operation'.
|
||||
*/
|
||||
@NonNull
|
||||
public static String getErrorCauseMessage(
|
||||
RemoteOperationResult result,
|
||||
RemoteOperation operation,
|
||||
Resources res
|
||||
) {
|
||||
String message = getSpecificMessageForResultAndOperation(result, operation, res);
|
||||
|
||||
public static String getErrorCauseMessage(RemoteOperationResult result,
|
||||
RemoteOperation operation, Resources res) {
|
||||
if (message == null || message.length() <= 0) {
|
||||
message = getCommonMessageForResult(result, res);
|
||||
}
|
||||
|
||||
if (message == null || message.length() <= 0) {
|
||||
message = getGenericErrorMessageForOperation(operation, res);
|
||||
}
|
||||
|
||||
if (message == null) {
|
||||
if (result.isSuccess()) {
|
||||
message = res.getString(R.string.common_ok);
|
||||
|
||||
} else {
|
||||
message = res.getString(R.string.common_error_unknown);
|
||||
}
|
||||
}
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a user message corresponding to an operation result and specific for the operation
|
||||
* performed.
|
||||
*
|
||||
* @param result Result of a {@link RemoteOperation} performed.
|
||||
* @param operation Operation performed.
|
||||
* @param res Reference to app resources, for i18n.
|
||||
* @return User message corresponding to 'result' and 'operation', or NULL if there is no
|
||||
* specific message for both.
|
||||
*/
|
||||
@Nullable
|
||||
private static String getSpecificMessageForResultAndOperation(
|
||||
RemoteOperationResult result,
|
||||
RemoteOperation operation,
|
||||
Resources res
|
||||
) {
|
||||
|
||||
String message = null;
|
||||
|
||||
if (!result.isSuccess() && isCommonError(result.getCode())) {
|
||||
message = getCommonErrorMessage(result, res);
|
||||
|
||||
} else if (operation instanceof UploadFileOperation) {
|
||||
|
||||
if (result.isSuccess()) {
|
||||
message = String.format(
|
||||
res.getString(R.string.uploader_upload_succeeded_content_single),
|
||||
((UploadFileOperation) operation).getFileName());
|
||||
} else {
|
||||
if (result.getCode() == ResultCode.LOCAL_STORAGE_FULL
|
||||
|| result.getCode() == ResultCode.LOCAL_STORAGE_NOT_COPIED) {
|
||||
message = String.format(
|
||||
res.getString(R.string.error__upload__local_file_not_copied),
|
||||
((UploadFileOperation) operation).getFileName(),
|
||||
res.getString(R.string.app_name));
|
||||
/*
|
||||
} else if (result.getCode() == ResultCode.QUOTA_EXCEEDED) {
|
||||
message = res.getString(R.string.failed_upload_quota_exceeded_text);
|
||||
*/
|
||||
|
||||
} else if (result.getCode() == ResultCode.FORBIDDEN) {
|
||||
message = String.format(res.getString(R.string.forbidden_permissions),
|
||||
res.getString(R.string.uploader_upload_forbidden_permissions));
|
||||
|
||||
} else if (result.getCode() == ResultCode.INVALID_CHARACTER_DETECT_IN_SERVER) {
|
||||
message = res.getString(R.string.filename_forbidden_charaters_from_server);
|
||||
|
||||
} else {
|
||||
message = String.format(
|
||||
res.getString(R.string.uploader_upload_failed_content_single),
|
||||
((UploadFileOperation) operation).getFileName());
|
||||
}
|
||||
}
|
||||
if (operation instanceof UploadFileOperation) {
|
||||
message = getMessageForUploadFileOperation(result, (UploadFileOperation) operation, res);
|
||||
|
||||
} else if (operation instanceof DownloadFileOperation) {
|
||||
|
||||
if (result.isSuccess()) {
|
||||
message = String.format(
|
||||
res.getString(R.string.downloader_download_succeeded_content),
|
||||
new File(((DownloadFileOperation) operation).getSavePath()).getName());
|
||||
|
||||
} else {
|
||||
if (result.getCode() == ResultCode.FILE_NOT_FOUND) {
|
||||
message = res.getString(R.string.downloader_download_file_not_found);
|
||||
|
||||
} else {
|
||||
message = String.format(
|
||||
res.getString(R.string.downloader_download_failed_content), new File(
|
||||
((DownloadFileOperation) operation).getSavePath()).getName());
|
||||
}
|
||||
}
|
||||
message = getMessageForDownloadFileOperation(result, (DownloadFileOperation) operation, res);
|
||||
|
||||
} else if (operation instanceof RemoveFileOperation) {
|
||||
if (result.isSuccess()) {
|
||||
message = res.getString(R.string.remove_success_msg);
|
||||
|
||||
} else {
|
||||
if (result.getCode().equals(ResultCode.FORBIDDEN)) {
|
||||
// Error --> No permissions
|
||||
message = String.format(res.getString(R.string.forbidden_permissions),
|
||||
res.getString(R.string.forbidden_permissions_delete));
|
||||
|
||||
} else {
|
||||
message = res.getString(R.string.remove_fail_msg);
|
||||
}
|
||||
}
|
||||
message = getMessageForRemoveFileOperation(result, res);
|
||||
|
||||
} else if (operation instanceof RenameFileOperation) {
|
||||
if (result.getCode().equals(ResultCode.INVALID_LOCAL_FILE_NAME)) {
|
||||
message = res.getString(R.string.rename_local_fail_msg);
|
||||
|
||||
} else if (result.getCode().equals(ResultCode.FORBIDDEN)) {
|
||||
// Error --> No permissions
|
||||
message = String.format(res.getString(R.string.forbidden_permissions),
|
||||
res.getString(R.string.forbidden_permissions_rename));
|
||||
|
||||
} else if (result.getCode().equals(ResultCode.INVALID_CHARACTER_IN_NAME)) {
|
||||
message = res.getString(R.string.filename_forbidden_characters);
|
||||
|
||||
} else if (result.getCode() == ResultCode.INVALID_CHARACTER_DETECT_IN_SERVER) {
|
||||
message = res.getString(R.string.filename_forbidden_charaters_from_server);
|
||||
|
||||
} else {
|
||||
message = res.getString(R.string.rename_server_fail_msg);
|
||||
}
|
||||
message = getMessageForRenameFileOperation(result, res);
|
||||
|
||||
} else if (operation instanceof SynchronizeFileOperation) {
|
||||
if (!((SynchronizeFileOperation) operation).transferWasRequested()) {
|
||||
@@ -149,143 +128,252 @@ public class ErrorMessageAdapter {
|
||||
}
|
||||
|
||||
} else if (operation instanceof CreateFolderOperation) {
|
||||
if (result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME) {
|
||||
message = res.getString(R.string.filename_forbidden_characters);
|
||||
|
||||
} else if (result.getCode().equals(ResultCode.FORBIDDEN)) {
|
||||
message = String.format(res.getString(R.string.forbidden_permissions),
|
||||
res.getString(R.string.forbidden_permissions_create));
|
||||
|
||||
} else if (result.getCode() == ResultCode.INVALID_CHARACTER_DETECT_IN_SERVER) {
|
||||
message = res.getString(R.string.filename_forbidden_charaters_from_server);
|
||||
|
||||
} else {
|
||||
message = res.getString(R.string.create_dir_fail_msg);
|
||||
}
|
||||
message = getMessageForCreateFolderOperation(result, res);
|
||||
|
||||
} else if (operation instanceof CreateShareViaLinkOperation ||
|
||||
operation instanceof CreateShareWithShareeOperation) {
|
||||
|
||||
if (result.getData() != null && result.getData().size() > 0) {
|
||||
message = (String) result.getData().get(0); // share API sends its own error messages
|
||||
|
||||
} else if (result.getCode() == ResultCode.SHARE_NOT_FOUND) {
|
||||
message = res.getString(R.string.share_link_file_no_exist);
|
||||
|
||||
} else if (result.getCode() == ResultCode.SHARE_FORBIDDEN) {
|
||||
// Error --> No permissions
|
||||
message = String.format(res.getString(R.string.forbidden_permissions),
|
||||
res.getString(R.string.share_link_forbidden_permissions));
|
||||
|
||||
} else { // Generic error
|
||||
// Show a Message, operation finished without success
|
||||
message = res.getString(R.string.share_link_file_error);
|
||||
}
|
||||
message = getMessageForCreateShareOperations(result, res);
|
||||
|
||||
} else if (operation instanceof UnshareOperation) {
|
||||
|
||||
if (result.getData() != null && result.getData().size() > 0) {
|
||||
message = (String) result.getData().get(0); // share API sends its own error messages
|
||||
|
||||
} else if (result.getCode() == ResultCode.SHARE_NOT_FOUND) {
|
||||
message = res.getString(R.string.unshare_link_file_no_exist);
|
||||
|
||||
} else if (result.getCode() == ResultCode.SHARE_FORBIDDEN) {
|
||||
// Error --> No permissions
|
||||
message = String.format(res.getString(R.string.forbidden_permissions),
|
||||
res.getString(R.string.unshare_link_forbidden_permissions));
|
||||
|
||||
} else { // Generic error
|
||||
// Show a Message, operation finished without success
|
||||
message = res.getString(R.string.unshare_link_file_error);
|
||||
}
|
||||
message = getMessageForUnshareOperation(result, res);
|
||||
|
||||
} else if (operation instanceof UpdateShareViaLinkOperation ||
|
||||
operation instanceof UpdateSharePermissionsOperation) {
|
||||
|
||||
if (result.getData() != null && result.getData().size() > 0) {
|
||||
message = (String) result.getData().get(0); // share API sends its own error messages
|
||||
|
||||
} else if (result.getCode() == ResultCode.SHARE_NOT_FOUND) {
|
||||
message = res.getString(R.string.update_link_file_no_exist);
|
||||
|
||||
} else if (result.getCode() == ResultCode.SHARE_FORBIDDEN) {
|
||||
// Error --> No permissions
|
||||
message = String.format(res.getString(R.string.forbidden_permissions),
|
||||
res.getString(R.string.update_link_forbidden_permissions));
|
||||
|
||||
} else { // Generic error
|
||||
// Show a Message, operation finished without success
|
||||
message = res.getString(R.string.update_link_file_error);
|
||||
}
|
||||
message = getMessageForUpdateShareOperations(result, res);
|
||||
|
||||
} else if (operation instanceof MoveFileOperation) {
|
||||
|
||||
if (result.getCode() == ResultCode.FILE_NOT_FOUND) {
|
||||
message = res.getString(R.string.move_file_not_found);
|
||||
} else if (result.getCode() == ResultCode.INVALID_MOVE_INTO_DESCENDANT) {
|
||||
message = res.getString(R.string.move_file_invalid_into_descendent);
|
||||
|
||||
} else if (result.getCode() == ResultCode.INVALID_OVERWRITE) {
|
||||
message = res.getString(R.string.move_file_invalid_overwrite);
|
||||
|
||||
} else if (result.getCode() == ResultCode.FORBIDDEN) {
|
||||
message = String.format(res.getString(R.string.forbidden_permissions),
|
||||
res.getString(R.string.forbidden_permissions_move));
|
||||
|
||||
} else if (result.getCode() == ResultCode.INVALID_CHARACTER_DETECT_IN_SERVER) {
|
||||
message = res.getString(R.string.filename_forbidden_charaters_from_server);
|
||||
|
||||
} else { // Generic error
|
||||
// Show a Message, operation finished without success
|
||||
message = res.getString(R.string.move_file_error);
|
||||
}
|
||||
message = getMessageForMoveFileOperation(result, res);
|
||||
|
||||
} else if (operation instanceof SynchronizeFolderOperation) {
|
||||
|
||||
if (!result.isSuccess()) {
|
||||
String folderPathName = new File(
|
||||
((SynchronizeFolderOperation) operation).getFolderPath()).getName();
|
||||
if (result.getCode() == ResultCode.FILE_NOT_FOUND) {
|
||||
message = String.format(res.getString(R.string.sync_current_folder_was_removed),
|
||||
folderPathName);
|
||||
|
||||
} else { // Generic error
|
||||
// Show a Message, operation finished without success
|
||||
message = String.format(res.getString(R.string.sync_folder_failed_content),
|
||||
folderPathName);
|
||||
}
|
||||
}
|
||||
message = getMessageForSynchronizeFolderOperation(result, (SynchronizeFolderOperation) operation, res);
|
||||
|
||||
} else if (operation instanceof CopyFileOperation) {
|
||||
if (result.getCode() == ResultCode.FILE_NOT_FOUND) {
|
||||
message = res.getString(R.string.copy_file_not_found);
|
||||
|
||||
} else if (result.getCode() == ResultCode.INVALID_COPY_INTO_DESCENDANT) {
|
||||
message = res.getString(R.string.copy_file_invalid_into_descendent);
|
||||
|
||||
} else if (result.getCode() == ResultCode.INVALID_OVERWRITE) {
|
||||
message = res.getString(R.string.copy_file_invalid_overwrite);
|
||||
|
||||
} else if (result.getCode() == ResultCode.FORBIDDEN) {
|
||||
message = String.format(res.getString(R.string.forbidden_permissions),
|
||||
res.getString(R.string.forbidden_permissions_copy));
|
||||
|
||||
} else { // Generic error
|
||||
// Show a Message, operation finished without success
|
||||
message = res.getString(R.string.copy_file_error);
|
||||
}
|
||||
message = getMessageForCopyFileOperation(result, res);
|
||||
}
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
private static String getCommonErrorMessage(RemoteOperationResult result, Resources res) {
|
||||
private static String getMessageForSynchronizeFolderOperation(
|
||||
RemoteOperationResult result,
|
||||
SynchronizeFolderOperation operation,
|
||||
Resources res
|
||||
) {
|
||||
if (!result.isSuccess() && result.getCode() == ResultCode.FILE_NOT_FOUND) {
|
||||
return String.format(
|
||||
res.getString(R.string.sync_current_folder_was_removed),
|
||||
new File(operation.getFolderPath()).getName()
|
||||
);
|
||||
}
|
||||
return
|
||||
null;
|
||||
}
|
||||
|
||||
private static String getMessageForMoveFileOperation(RemoteOperationResult result, Resources res) {
|
||||
if (result.getCode() == ResultCode.FILE_NOT_FOUND) {
|
||||
return res.getString(R.string.move_file_not_found);
|
||||
} else if (result.getCode() == ResultCode.INVALID_MOVE_INTO_DESCENDANT) {
|
||||
return res.getString(R.string.move_file_invalid_into_descendent);
|
||||
|
||||
} else if (result.getCode() == ResultCode.INVALID_OVERWRITE) {
|
||||
return res.getString(R.string.move_file_invalid_overwrite);
|
||||
|
||||
} else if (result.getCode() == ResultCode.FORBIDDEN) {
|
||||
return String.format(res.getString(R.string.forbidden_permissions),
|
||||
res.getString(R.string.forbidden_permissions_move));
|
||||
|
||||
} else if (result.getCode() == ResultCode.INVALID_CHARACTER_DETECT_IN_SERVER) {
|
||||
return res.getString(R.string.filename_forbidden_charaters_from_server);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static String getMessageForUpdateShareOperations(RemoteOperationResult result, Resources res) {
|
||||
if (result.getData() != null && result.getData().size() > 0) {
|
||||
return (String) result.getData().get(0); // share API sends its own error messages
|
||||
|
||||
} else if (result.getCode() == ResultCode.SHARE_NOT_FOUND) {
|
||||
return res.getString(R.string.update_link_file_no_exist);
|
||||
|
||||
} else if (result.getCode() == ResultCode.SHARE_FORBIDDEN) {
|
||||
// Error --> No permissions
|
||||
return String.format(res.getString(R.string.forbidden_permissions),
|
||||
res.getString(R.string.update_link_forbidden_permissions));
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static String getMessageForUnshareOperation(RemoteOperationResult result, Resources res) {
|
||||
if (result.getData() != null && result.getData().size() > 0) {
|
||||
return (String) result.getData().get(0); // share API sends its own error messages
|
||||
|
||||
} else if (result.getCode() == ResultCode.SHARE_NOT_FOUND) {
|
||||
return res.getString(R.string.unshare_link_file_no_exist);
|
||||
|
||||
} else if (result.getCode() == ResultCode.SHARE_FORBIDDEN) {
|
||||
// Error --> No permissions
|
||||
return String.format(res.getString(R.string.forbidden_permissions),
|
||||
res.getString(R.string.unshare_link_forbidden_permissions));
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static String getMessageForCopyFileOperation(RemoteOperationResult result, Resources res) {
|
||||
if (result.getCode() == ResultCode.FILE_NOT_FOUND) {
|
||||
return res.getString(R.string.copy_file_not_found);
|
||||
|
||||
} else if (result.getCode() == ResultCode.INVALID_COPY_INTO_DESCENDANT) {
|
||||
return res.getString(R.string.copy_file_invalid_into_descendent);
|
||||
|
||||
} else if (result.getCode() == ResultCode.INVALID_OVERWRITE) {
|
||||
return res.getString(R.string.copy_file_invalid_overwrite);
|
||||
|
||||
} else if (result.getCode() == ResultCode.FORBIDDEN) {
|
||||
return String.format(res.getString(R.string.forbidden_permissions),
|
||||
res.getString(R.string.forbidden_permissions_copy));
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static String getMessageForCreateShareOperations(RemoteOperationResult result, Resources res) {
|
||||
if (result.getData() != null && result.getData().size() > 0) {
|
||||
return (String) result.getData().get(0); // share API sends its own error messages
|
||||
|
||||
} else if (result.getCode() == ResultCode.SHARE_NOT_FOUND) {
|
||||
return res.getString(R.string.share_link_file_no_exist);
|
||||
|
||||
} else if (result.getCode() == ResultCode.SHARE_FORBIDDEN) {
|
||||
// Error --> No permissions
|
||||
return String.format(res.getString(R.string.forbidden_permissions),
|
||||
res.getString(R.string.share_link_forbidden_permissions));
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static String getMessageForCreateFolderOperation(RemoteOperationResult result, Resources res) {
|
||||
if (result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME) {
|
||||
return res.getString(R.string.filename_forbidden_characters);
|
||||
|
||||
} else if (result.getCode().equals(ResultCode.FORBIDDEN)) {
|
||||
return String.format(res.getString(R.string.forbidden_permissions),
|
||||
res.getString(R.string.forbidden_permissions_create));
|
||||
|
||||
} else if (result.getCode() == ResultCode.INVALID_CHARACTER_DETECT_IN_SERVER) {
|
||||
return res.getString(R.string.filename_forbidden_charaters_from_server);
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static String getMessageForRenameFileOperation(RemoteOperationResult result, Resources res) {
|
||||
if (result.getCode().equals(ResultCode.INVALID_LOCAL_FILE_NAME)) {
|
||||
return res.getString(R.string.rename_local_fail_msg);
|
||||
|
||||
} else if (result.getCode().equals(ResultCode.FORBIDDEN)) {
|
||||
// Error --> No permissions
|
||||
return String.format(res.getString(R.string.forbidden_permissions),
|
||||
res.getString(R.string.forbidden_permissions_rename));
|
||||
|
||||
} else if (result.getCode().equals(ResultCode.INVALID_CHARACTER_IN_NAME)) {
|
||||
return res.getString(R.string.filename_forbidden_characters);
|
||||
|
||||
} else if (result.getCode() == ResultCode.INVALID_CHARACTER_DETECT_IN_SERVER) {
|
||||
return res.getString(R.string.filename_forbidden_charaters_from_server);
|
||||
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private static String getMessageForRemoveFileOperation(RemoteOperationResult result, Resources res) {
|
||||
if (result.isSuccess()) {
|
||||
return res.getString(R.string.remove_success_msg);
|
||||
|
||||
} else {
|
||||
if (result.getCode().equals(ResultCode.FORBIDDEN)) {
|
||||
// Error --> No permissions
|
||||
return String.format(res.getString(R.string.forbidden_permissions),
|
||||
res.getString(R.string.forbidden_permissions_delete));
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private static String getMessageForDownloadFileOperation(
|
||||
RemoteOperationResult result,
|
||||
DownloadFileOperation operation,
|
||||
Resources res
|
||||
) {
|
||||
if (result.isSuccess()) {
|
||||
return String.format(
|
||||
res.getString(R.string.downloader_download_succeeded_content),
|
||||
new File(operation.getSavePath()).getName());
|
||||
|
||||
} else {
|
||||
if (result.getCode() == ResultCode.FILE_NOT_FOUND) {
|
||||
return res.getString(R.string.downloader_download_file_not_found);
|
||||
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static String getMessageForUploadFileOperation(
|
||||
RemoteOperationResult result,
|
||||
UploadFileOperation operation,
|
||||
Resources res
|
||||
) {
|
||||
if (result.isSuccess()) {
|
||||
return String.format(
|
||||
res.getString(R.string.uploader_upload_succeeded_content_single),
|
||||
operation.getFileName());
|
||||
} else {
|
||||
|
||||
if (result.getCode() == ResultCode.LOCAL_STORAGE_FULL
|
||||
|| result.getCode() == ResultCode.LOCAL_STORAGE_NOT_COPIED) {
|
||||
return String.format(
|
||||
res.getString(R.string.error__upload__local_file_not_copied),
|
||||
operation.getFileName(),
|
||||
res.getString(R.string.app_name));
|
||||
|
||||
} else if (result.getCode() == ResultCode.FORBIDDEN) {
|
||||
return String.format(res.getString(R.string.forbidden_permissions),
|
||||
res.getString(R.string.uploader_upload_forbidden_permissions));
|
||||
|
||||
} else if (result.getCode() == ResultCode.INVALID_CHARACTER_DETECT_IN_SERVER) {
|
||||
return res.getString(R.string.filename_forbidden_charaters_from_server);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return a user message corresponding to an operation result with no knowledge about the operation
|
||||
* performed.
|
||||
*
|
||||
* @param result Result of a {@link RemoteOperation} performed.
|
||||
* @param res Reference to app resources, for i18n.
|
||||
* @return User message corresponding to 'result'.
|
||||
*/
|
||||
@Nullable
|
||||
private static String getCommonMessageForResult(RemoteOperationResult result, Resources res) {
|
||||
|
||||
String message = null;
|
||||
|
||||
if (!result.isSuccess()) {
|
||||
|
||||
if (result.getCode() == ResultCode.WRONG_CONNECTION) {
|
||||
message = res.getString(R.string.network_error_socket_exception);
|
||||
|
||||
@@ -294,24 +382,130 @@ public class ErrorMessageAdapter {
|
||||
|
||||
if (result.getException() instanceof SocketTimeoutException) {
|
||||
message = res.getString(R.string.network_error_socket_timeout_exception);
|
||||
|
||||
} else if (result.getException() instanceof ConnectTimeoutException) {
|
||||
message = res.getString(R.string.network_error_connect_timeout_exception);
|
||||
}
|
||||
|
||||
} else if (result.getCode() == ResultCode.HOST_NOT_AVAILABLE) {
|
||||
message = res.getString(R.string.network_host_not_available);
|
||||
|
||||
} else if (result.getCode() == ResultCode.MAINTENANCE_MODE) {
|
||||
message = res.getString(R.string.maintenance_mode);
|
||||
|
||||
} else if (result.getCode() == ResultCode.SSL_RECOVERABLE_PEER_UNVERIFIED) {
|
||||
message = res.getString(
|
||||
R.string.uploads_view_upload_status_failed_ssl_certificate_not_trusted
|
||||
);
|
||||
|
||||
} else if (result.getCode() == ResultCode.BAD_OC_VERSION) {
|
||||
message = res.getString(
|
||||
R.string.auth_bad_oc_version_title
|
||||
);
|
||||
} else if (result.getCode() == ResultCode.INCORRECT_ADDRESS) {
|
||||
message = res.getString(
|
||||
R.string.auth_incorrect_address_title
|
||||
);
|
||||
|
||||
} else if (result.getCode() == ResultCode.SSL_ERROR) {
|
||||
message = res.getString(
|
||||
R.string.auth_ssl_general_error_title
|
||||
);
|
||||
} else if (result.getCode() == ResultCode.UNAUTHORIZED) {
|
||||
message = res.getString(
|
||||
R.string.auth_unauthorized
|
||||
);
|
||||
} else if (result.getCode() == ResultCode.INSTANCE_NOT_CONFIGURED) {
|
||||
message = res.getString(
|
||||
R.string.auth_not_configured_title
|
||||
);
|
||||
} else if (result.getCode() == ResultCode.FILE_NOT_FOUND) {
|
||||
message = res.getString(
|
||||
R.string.auth_incorrect_path_title
|
||||
);
|
||||
} else if (result.getCode() == ResultCode.OAUTH2_ERROR) {
|
||||
message = res.getString(
|
||||
R.string.auth_oauth_error
|
||||
);
|
||||
} else if (result.getCode() == ResultCode.OAUTH2_ERROR_ACCESS_DENIED) {
|
||||
message = res.getString(
|
||||
R.string.auth_oauth_error_access_denied
|
||||
);
|
||||
} else if (result.getCode() == ResultCode.ACCOUNT_NOT_NEW) {
|
||||
message = res.getString(
|
||||
R.string.auth_account_not_new
|
||||
);
|
||||
} else if (result.getCode() == ResultCode.ACCOUNT_NOT_THE_SAME) {
|
||||
message = res.getString(
|
||||
R.string.auth_account_not_the_same
|
||||
);
|
||||
} else if (result.getHttpPhrase() != null && result.getHttpPhrase().length() > 0) {
|
||||
// last chance: error message from server
|
||||
message = result.getHttpPhrase();
|
||||
}
|
||||
}
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
private static boolean isCommonError(RemoteOperationResult.ResultCode code) {
|
||||
return code == ResultCode.WRONG_CONNECTION ||
|
||||
code == ResultCode.TIMEOUT ||
|
||||
code == ResultCode.HOST_NOT_AVAILABLE ||
|
||||
code == ResultCode.MAINTENANCE_MODE;
|
||||
|
||||
/**
|
||||
* Return a user message corresponding to a generic error for a given operation.
|
||||
*
|
||||
* @param operation Operation performed.
|
||||
* @param res Reference to app resources, for i18n.
|
||||
* @return User message corresponding to a generic error of 'operation'.
|
||||
*/
|
||||
@Nullable
|
||||
private static String getGenericErrorMessageForOperation(RemoteOperation operation, Resources res) {
|
||||
String message = null;
|
||||
|
||||
if (operation instanceof UploadFileOperation) {
|
||||
message = String.format(
|
||||
res.getString(R.string.uploader_upload_failed_content_single),
|
||||
((UploadFileOperation) operation).getFileName());
|
||||
|
||||
} else if (operation instanceof DownloadFileOperation) {
|
||||
message = String.format(
|
||||
res.getString(R.string.downloader_download_failed_content),
|
||||
new File(((DownloadFileOperation) operation).getSavePath()).getName()
|
||||
);
|
||||
|
||||
} else if (operation instanceof RemoveFileOperation) {
|
||||
message = res.getString(R.string.remove_fail_msg);
|
||||
|
||||
} else if (operation instanceof RenameFileOperation) {
|
||||
message = res.getString(R.string.rename_server_fail_msg);
|
||||
|
||||
} else if (operation instanceof CreateFolderOperation) {
|
||||
message = res.getString(R.string.create_dir_fail_msg);
|
||||
|
||||
} else if (operation instanceof CreateShareViaLinkOperation ||
|
||||
operation instanceof CreateShareWithShareeOperation
|
||||
) {
|
||||
message = res.getString(R.string.share_link_file_error);
|
||||
|
||||
} else if (operation instanceof UnshareOperation) {
|
||||
message = res.getString(R.string.unshare_link_file_error);
|
||||
|
||||
} else if (operation instanceof UpdateShareViaLinkOperation ||
|
||||
operation instanceof UpdateSharePermissionsOperation
|
||||
) {
|
||||
message = res.getString(R.string.update_link_file_error);
|
||||
|
||||
} else if (operation instanceof MoveFileOperation) {
|
||||
message = res.getString(R.string.move_file_error);
|
||||
|
||||
} else if (operation instanceof SynchronizeFolderOperation) {
|
||||
String folderPathName = new File(
|
||||
((SynchronizeFolderOperation) operation).getFolderPath()
|
||||
).getName();
|
||||
message = String.format(res.getString(R.string.sync_folder_failed_content), folderPathName);
|
||||
|
||||
} else if (operation instanceof CopyFileOperation) {
|
||||
message = res.getString(R.string.copy_file_error);
|
||||
}
|
||||
|
||||
return message;
|
||||
}
|
||||
}
|
||||
@@ -135,8 +135,8 @@ public class MimeTypeUtil {
|
||||
* Returns the resource identifier of an image to use as icon associated to a type of folder.
|
||||
*
|
||||
* @param isSharedViaUsers flag if the folder is shared via the users system
|
||||
* @param isSharedViaLink flag if the folder is publicly shared via link
|
||||
* @param account account which color should be used
|
||||
* @param isSharedViaLink flag if the folder is publicly shared via link
|
||||
* @param account account which color should be used
|
||||
* @return Identifier of an image resource.
|
||||
*/
|
||||
public static Drawable getFolderTypeIcon(boolean isSharedViaUsers, boolean isSharedViaLink, Account account) {
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
/**
|
||||
* Nextcloud Android client application
|
||||
*
|
||||
* @author Mario Danic
|
||||
* Copyright (C) 2017 Nextcloud GmbH.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.owncloud.android.utils;
|
||||
|
||||
import android.support.annotation.ColorInt;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* Helper class for handling and manipulation of Strings.
|
||||
*/
|
||||
public class StringUtils {
|
||||
|
||||
public static String searchAndColor(String text, String searchText, @ColorInt int color) {
|
||||
|
||||
if (TextUtils.isEmpty(text) || TextUtils.isEmpty(searchText)) {
|
||||
return text;
|
||||
}
|
||||
|
||||
Matcher m = Pattern.compile(searchText, Pattern.CASE_INSENSITIVE | Pattern.LITERAL)
|
||||
.matcher(text);
|
||||
|
||||
StringBuffer sb = new StringBuffer();
|
||||
|
||||
while (m.find()) {
|
||||
String replacement = m.group().replace(
|
||||
m.group(),
|
||||
"<font color='" + color + "'><b>" + m.group() + "</b></font>"
|
||||
);
|
||||
m.appendReplacement(sb, Matcher.quoteReplacement(replacement));
|
||||
}
|
||||
m.appendTail(sb);
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
@@ -63,7 +63,7 @@ public class ThemeUtils {
|
||||
|
||||
try {
|
||||
float adjust;
|
||||
if (darkTheme()){
|
||||
if (darkTheme()) {
|
||||
adjust = +0.1f;
|
||||
} else {
|
||||
adjust = -0.1f;
|
||||
@@ -120,6 +120,7 @@ public class ThemeUtils {
|
||||
|
||||
/**
|
||||
* Tests if dark color is set
|
||||
*
|
||||
* @return true if dark theme -> e.g.use light font color, darker accent color
|
||||
*/
|
||||
public static boolean darkTheme() {
|
||||
|
||||
@@ -74,7 +74,7 @@ public class ActionEditText extends AppCompatEditText {
|
||||
getDrawingRect(mButtonRect);
|
||||
mButtonRect.top += 10;
|
||||
mButtonRect.bottom -= 10;
|
||||
mButtonRect.left = (int) (getWidth() - mTextBounds.width() - 18);
|
||||
mButtonRect.left = getWidth() - mTextBounds.width() - 18;
|
||||
mButtonRect.right = getWidth() - 10;
|
||||
btn_rect = mButtonRect;
|
||||
|
||||
|
||||
@@ -109,22 +109,22 @@
|
||||
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/testServerButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical|right"
|
||||
android:layout_marginRight="@dimen/alternate_half_padding"
|
||||
android:padding="@dimen/zero"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/arrow_right"
|
||||
android:tint="@color/white"
|
||||
android:background="@android:color/transparent"
|
||||
android:onClick="onTestServerConnectionClick"
|
||||
android:contentDescription="@string/test_server_button"
|
||||
/>
|
||||
<ImageButton
|
||||
android:id="@+id/testServerButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical|right"
|
||||
android:layout_marginRight="@dimen/alternate_half_padding"
|
||||
android:padding="@dimen/zero"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/arrow_right"
|
||||
android:tint="@color/white"
|
||||
android:background="@android:color/transparent"
|
||||
android:onClick="onTestServerConnectionClick"
|
||||
android:contentDescription="@string/test_server_button"
|
||||
/>
|
||||
|
||||
<ImageButton
|
||||
<ImageButton
|
||||
android:id="@+id/embeddedRefreshButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -207,10 +207,10 @@
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
|
||||
<android.support.design.widget.TextInputLayout
|
||||
android:id="@+id/input_layout_account_username"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone">
|
||||
android:id="@+id/input_layout_account_username"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/account_username"
|
||||
@@ -226,10 +226,10 @@
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
|
||||
<android.support.design.widget.TextInputLayout
|
||||
android:id="@+id/input_layout_account_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:id="@+id/input_layout_account_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
app:passwordToggleDrawable="@drawable/password_visibility_selector"
|
||||
app:passwordToggleTint="@color/white">
|
||||
|
||||
@@ -272,17 +272,17 @@
|
||||
android:paddingTop="@dimen/standard_half_padding">
|
||||
|
||||
<android.support.v7.widget.AppCompatButton
|
||||
android:id="@+id/buttonOK"
|
||||
android:theme="@style/Button.Login"
|
||||
style="@style/Button.Login"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/standard_padding"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:enabled="false"
|
||||
android:text="@string/setup_btn_connect"
|
||||
android:contentDescription="@string/setup_btn_connect"
|
||||
android:visibility="gone"/>
|
||||
android:id="@+id/buttonOK"
|
||||
android:theme="@style/Button.Login"
|
||||
style="@style/Button.Login"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/standard_padding"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:enabled="false"
|
||||
android:text="@string/setup_btn_connect"
|
||||
android:contentDescription="@string/setup_btn_connect"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ListView
|
||||
android:id="@+id/list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
</LinearLayout>
|
||||
@@ -60,7 +60,6 @@
|
||||
android:layout_gravity="start"
|
||||
android:layout_marginTop="@dimen/standard_half_margin"
|
||||
android:textColor="@color/color_accent"
|
||||
android:paddingLeft="@dimen/zero"
|
||||
style="@style/TextAppearance.AppCompat.Body2"
|
||||
/>
|
||||
|
||||
@@ -96,7 +95,6 @@
|
||||
android:layout_gravity="start"
|
||||
android:layout_marginTop="@dimen/standard_half_margin"
|
||||
android:textColor="@color/color_accent"
|
||||
android:paddingLeft="@dimen/zero"
|
||||
style="@style/TextAppearance.AppCompat.Body2"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
android:padding="8dp"
|
||||
android:text="@string/fingerprint_scan_finger"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="32dp"/>
|
||||
android:textSize="32sp"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/fingerprinticon"
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
android:id="@+id/file_size"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Size MB"
|
||||
android:text="@string/placeholder_filesize"
|
||||
android:textColor="@color/list_item_lastmod_and_filesize_text"
|
||||
android:textSize="@dimen/two_line_secondary_text_size"/>
|
||||
|
||||
@@ -119,7 +119,8 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="right"
|
||||
android:text=", "
|
||||
android:text="@string/file_item_metadata_separator"
|
||||
android:paddingRight="@dimen/standard_quarter_padding"
|
||||
android:textColor="@color/list_item_lastmod_and_filesize_text"
|
||||
android:textSize="@dimen/two_line_secondary_text_size"/>
|
||||
|
||||
@@ -128,7 +129,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="right"
|
||||
android:text="Mod Date"
|
||||
android:text="@string/placeholder_timestamp"
|
||||
android:textColor="@color/list_item_lastmod_and_filesize_text"
|
||||
android:textSize="@dimen/two_line_secondary_text_size"/>
|
||||
|
||||
@@ -170,6 +171,6 @@
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/list_divider_background"></View>
|
||||
android:background="@color/list_divider_background"/>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -38,6 +38,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="@dimen/standard_margin"
|
||||
android:text="@string/common_loading" />
|
||||
android:text="@string/common_loading"/>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -38,6 +38,8 @@
|
||||
android:dividerHeight="1dip">
|
||||
</ListView>
|
||||
|
||||
<include layout="@layout/empty_list"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
|
||||
|
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 8.0 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 38 KiB |
@@ -304,10 +304,10 @@
|
||||
<string name="filedisplay_no_file_selected">Žádný soubor nebyl vybrán</string>
|
||||
<string name="activity_chooser_title">Odeslat odkaz …</string>
|
||||
<string name="wait_for_tmp_copy_from_private_storage">Kopírování souboru z privátního úložiště</string>
|
||||
|
||||
<string name="oauth_check_onoff">Přihlásit se s OAuth 2.0</string>
|
||||
<string name="oauth_login_connection">Připojuji se k OAuth 2.0 serveru...</string>
|
||||
|
||||
|
||||
<string name="oauth_check_onoff">Přihlásit se s OAuth 2.0</string>
|
||||
<string name="oauth_login_connection">Připojuji se k OAuth 2.0 serveru...</string>
|
||||
|
||||
<string name="ssl_validator_header">Identitu stránky nelze ověřit</string>
|
||||
<string name="ssl_validator_reason_cert_not_trusted">- Certifikát serveru je nedůvěryhodný</string>
|
||||
<string name="ssl_validator_reason_cert_expired">- Certifikátu serveru vypršela platnost</string>
|
||||
|
||||
@@ -305,10 +305,10 @@
|
||||
<string name="filedisplay_no_file_selected">Keine Datei gewählt</string>
|
||||
<string name="activity_chooser_title">Link senden an …</string>
|
||||
<string name="wait_for_tmp_copy_from_private_storage">Kopiere Datei vom privatem Speicher</string>
|
||||
|
||||
<string name="oauth_check_onoff">Anmelden mit OAuth 2.0</string>
|
||||
<string name="oauth_login_connection">Verbinde mit dem OAuth 2.0-Server …</string>
|
||||
|
||||
|
||||
<string name="oauth_check_onoff">Anmelden mit OAuth 2.0</string>
|
||||
<string name="oauth_login_connection">Verbinde mit dem OAuth 2.0-Server …</string>
|
||||
|
||||
<string name="ssl_validator_header">Die Identität der Website konnte nicht überprüft werden</string>
|
||||
<string name="ssl_validator_reason_cert_not_trusted">- Das Zertifikat des Servers ist nicht vertrauenswürdig</string>
|
||||
<string name="ssl_validator_reason_cert_expired">- Das Zertifikat des Servers ist abgelaufen</string>
|
||||
@@ -622,7 +622,6 @@
|
||||
<string name="welcome_feature_3_text">Schützen Sie Ihre Fotos</string>
|
||||
|
||||
<string name="whats_new_skip">Überspringen</string>
|
||||
|
||||
<string name="fingerprint_scan_finger">Bitte scannen Sie Ihren Finger</string>
|
||||
<string name="fingerprint_unknown">Finger nicht erkannt</string>
|
||||
|
||||
@@ -669,5 +668,5 @@
|
||||
|
||||
<string name="folder_sync_folders">Ordner auswählen</string>
|
||||
|
||||
<string name="test_server_button">Prüfe Server-Verbindung</string>
|
||||
<string name="test_server_button">Prüfe Server-Verbindung</string>
|
||||
</resources>
|
||||