Compare commits
1018 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d2ccc5c022 | ||
|
|
3339c8b676 | ||
|
|
2cc331b136 | ||
|
|
df1a65e6a3 | ||
|
|
f416f95b77 | ||
|
|
44fe5af4fb | ||
|
|
f394eddc01 | ||
|
|
07dd9df3ec | ||
|
|
340d4ce714 | ||
|
|
2870b8331e | ||
|
|
bc79f22e22 | ||
|
|
b3e0b148a6 | ||
|
|
6131dfeb2c | ||
|
|
42fc868b68 | ||
|
|
e9ec02929d | ||
|
|
389d7d77c2 | ||
|
|
03a55d38d3 | ||
|
|
5504298251 | ||
|
|
0fff61de34 | ||
|
|
4db7311611 | ||
|
|
650d970b5e | ||
|
|
7f796963f3 | ||
|
|
9231da2f1c | ||
|
|
0d422c53d1 | ||
|
|
7bf9354e32 | ||
|
|
277fd67814 | ||
|
|
68e9cd3779 | ||
|
|
73b2ae71a9 | ||
|
|
f9028245d8 | ||
|
|
3fff0617fe | ||
|
|
d958dc6bce | ||
|
|
045ce42168 | ||
|
|
edef84a4f9 | ||
|
|
ec9b2d7f7d | ||
|
|
640beeed23 | ||
|
|
a998ee84ec | ||
|
|
bd74634201 | ||
|
|
364287028b | ||
|
|
7be8513bb5 | ||
|
|
89c2f62f11 | ||
|
|
fce2a7ba94 | ||
|
|
e613198252 | ||
|
|
3e240c4d2f | ||
|
|
eee96bf8cf | ||
|
|
471871eb2e | ||
|
|
225b8b8cd8 | ||
|
|
cb2d133eb0 | ||
|
|
d957111249 | ||
|
|
f0a701e134 | ||
|
|
0c8c216fba | ||
|
|
f153c7509c | ||
|
|
197683b722 | ||
|
|
fbce0be457 | ||
|
|
24304c2f55 | ||
|
|
b0c6c09cea | ||
|
|
2732fc93f9 | ||
|
|
cc9a4a288a | ||
|
|
f57db917d1 | ||
|
|
d32eb9c9bc | ||
|
|
219af7f288 | ||
|
|
e767b6c5be | ||
|
|
5f1a8017f1 | ||
|
|
df80122ce1 | ||
|
|
6904ea118b | ||
|
|
0baa07daa2 | ||
|
|
2abf407b36 | ||
|
|
55dc9cbfc7 | ||
|
|
fa15a10ae0 | ||
|
|
e821d8a135 | ||
|
|
cefcc14d4d | ||
|
|
a52d1e1506 | ||
|
|
42df1aecd5 | ||
|
|
920f4fc525 | ||
|
|
d57d583076 | ||
|
|
1c8cd2dcbb | ||
|
|
bb66a6c805 | ||
|
|
10ecdfbe31 | ||
|
|
43dad1df63 | ||
|
|
fdcc6b0cb8 | ||
|
|
ac82d6bc6b | ||
|
|
a8e98cfa78 | ||
|
|
fa51314639 | ||
|
|
3e0097c22c | ||
|
|
e62ff2fe36 | ||
|
|
88a13eb54f | ||
|
|
355dc151c4 | ||
|
|
4f0ea44078 | ||
|
|
9cc12fd577 | ||
|
|
960c2567bd | ||
|
|
430e4dd445 | ||
|
|
1ec31c6899 | ||
|
|
42c21ce892 | ||
|
|
d278fde5f2 | ||
|
|
2616a5f500 | ||
|
|
cc58f7730e | ||
|
|
d49e001b21 | ||
|
|
f12ceb69ce | ||
|
|
7862005055 | ||
|
|
e70dbf8d8d | ||
|
|
16ee34d7a7 | ||
|
|
2ad55e8a8c | ||
|
|
a8a1750d5c | ||
|
|
5407e20150 | ||
|
|
58aa37bf8e | ||
|
|
7c781b60c5 | ||
|
|
acdfce7e88 | ||
|
|
4e4b56d7fe | ||
|
|
a3174d7015 | ||
|
|
b595c8aeac | ||
|
|
a9a33ad71e | ||
|
|
4d08ce90cc | ||
|
|
01d9ccc110 | ||
|
|
029f069ad5 | ||
|
|
13b9e01604 | ||
|
|
19c46a472a | ||
|
|
37edfffb97 | ||
|
|
67fa653d06 | ||
|
|
366b9ddc4a | ||
|
|
c9354f79b8 | ||
|
|
d5b3bd5905 | ||
|
|
45dd240415 | ||
|
|
bf99cea004 | ||
|
|
f680b1e856 | ||
|
|
b2f40c7af0 | ||
|
|
82b17677b9 | ||
|
|
b7df2d5441 | ||
|
|
dd511ba365 | ||
|
|
d705e3c1fb | ||
|
|
4bd1322904 | ||
|
|
ac027ee3a0 | ||
|
|
e5e3ebdbba | ||
|
|
993fc2e6f4 | ||
|
|
61c480618c | ||
|
|
db7f2622c8 | ||
|
|
a39e78a989 | ||
|
|
5a461d68a7 | ||
|
|
899816673c | ||
|
|
84a10139c1 | ||
|
|
da3aa56d86 | ||
|
|
a6dcd512ea | ||
|
|
572d32c1de | ||
|
|
e8b67ead1e | ||
|
|
377029226e | ||
|
|
72d1421f1d | ||
|
|
d359547dab | ||
|
|
9523c7ab33 | ||
|
|
7cac07c185 | ||
|
|
a607a7f3ef | ||
|
|
b5277e89d5 | ||
|
|
99713f8ed7 | ||
|
|
145dac500c | ||
|
|
eefd9bf31c | ||
|
|
3f47ca645b | ||
|
|
c906f037b5 | ||
|
|
ffc4e32119 | ||
|
|
51eb46241b | ||
|
|
541416f64b | ||
|
|
14d1d132a3 | ||
|
|
22a0045796 | ||
|
|
2e5ba0335d | ||
|
|
3315704c14 | ||
|
|
f90c407fb6 | ||
|
|
d3646e10a5 | ||
|
|
d3003efe72 | ||
|
|
235ca947be | ||
|
|
e7bc9ed5ba | ||
|
|
740a18dbc0 | ||
|
|
add5189bb1 | ||
|
|
62002b8bb3 | ||
|
|
41b4ee33fe | ||
|
|
85c67ac676 | ||
|
|
4637b7d93f | ||
|
|
8b9a178c87 | ||
|
|
c595c381a9 | ||
|
|
c308d7a610 | ||
|
|
f7570122c6 | ||
|
|
1e5f186b58 | ||
|
|
b732b2ffa7 | ||
|
|
617a7be4f3 | ||
|
|
5c5e368d6b | ||
|
|
ff9f49416a | ||
|
|
93cae0e9cc | ||
|
|
61e75ce747 | ||
|
|
50affe26c5 | ||
|
|
8566362607 | ||
|
|
36925770d0 | ||
|
|
d17ca1686e | ||
|
|
2ad709dae4 | ||
|
|
5a3d86a12a | ||
|
|
1a4ba36820 | ||
|
|
ddeae3b5ba | ||
|
|
10df9e7cd5 | ||
|
|
be11933c60 | ||
|
|
d2db68b781 | ||
|
|
da6e271584 | ||
|
|
5103c80e1e | ||
|
|
b5c80ea267 | ||
|
|
b5747fbb44 | ||
|
|
215ded8a77 | ||
|
|
e7ab6da068 | ||
|
|
ee881f67ee | ||
|
|
f33248aa4f | ||
|
|
c6a40bac03 | ||
|
|
aa38e79d08 | ||
|
|
9cac10e559 | ||
|
|
efbd418f56 | ||
|
|
4ff3464abd | ||
|
|
907ddbf903 | ||
|
|
7041991d5a | ||
|
|
b26067e5da | ||
|
|
e519b13533 | ||
|
|
30bc3867bf | ||
|
|
5326c3aecc | ||
|
|
c95251c903 | ||
|
|
e08a0a0938 | ||
|
|
fcb072c37d | ||
|
|
262c19b194 | ||
|
|
1031ddcd83 | ||
|
|
aaee0212f0 | ||
|
|
8fc95759ba | ||
|
|
b6a3a0a54f | ||
|
|
e3091be314 | ||
|
|
045d0678b3 | ||
|
|
e3eeaddb3e | ||
|
|
f2b202c714 | ||
|
|
e6f3ad60ef | ||
|
|
fb6e0c9eb8 | ||
|
|
fb6e488339 | ||
|
|
0bccc8f0d5 | ||
|
|
560d831e92 | ||
|
|
7c8f6a1cc7 | ||
|
|
deb1ead4ea | ||
|
|
005b2a4fb6 | ||
|
|
4c8204f29a | ||
|
|
83fd19784a | ||
|
|
1f21a2ecc7 | ||
|
|
c3f4d56d1e | ||
|
|
7e4f79bacb | ||
|
|
b8267d4329 | ||
|
|
205ca693b3 | ||
|
|
23159c2201 | ||
|
|
884521ced0 | ||
|
|
aeb01ba292 | ||
|
|
2b1a556e9e | ||
|
|
d5c3ae3d19 | ||
|
|
7654bb7088 | ||
|
|
64c301caeb | ||
|
|
e875b530b1 | ||
|
|
ee8c2b5272 | ||
|
|
9b8bdb0639 | ||
|
|
1a99bbb040 | ||
|
|
0982b45473 | ||
|
|
bcd210d504 | ||
|
|
c71608824b | ||
|
|
170876ac16 | ||
|
|
a6b172c445 | ||
|
|
e625450100 | ||
|
|
fca5447094 | ||
|
|
89f32beec5 | ||
|
|
65eb7662ad | ||
|
|
ea090dbe18 | ||
|
|
5750817620 | ||
|
|
93386d0e8b | ||
|
|
e9dd7b8f98 | ||
|
|
5010e7cb7a | ||
|
|
fb35f4fbca | ||
|
|
00c0a93a6b | ||
|
|
cd9a312e0b | ||
|
|
8cdb27fe43 | ||
|
|
d84d11d064 | ||
|
|
5d646a6112 | ||
|
|
dd334858ff | ||
|
|
dfd39ebc95 | ||
|
|
9dbb1f15a4 | ||
|
|
32fd04a7d9 | ||
|
|
3a33ff375d | ||
|
|
8877e71bd2 | ||
|
|
5b5385c01d | ||
|
|
9c365ecc48 | ||
|
|
99d1a6d043 | ||
|
|
854ef7e645 | ||
|
|
a8eeb12325 | ||
|
|
86a3f516b1 | ||
|
|
d6818939b3 | ||
|
|
c51449e607 | ||
|
|
333894ddeb | ||
|
|
052e227b65 | ||
|
|
4dd6df5bbe | ||
|
|
8847991bba | ||
|
|
0ffc6e4a1a | ||
|
|
9a399e06f3 | ||
|
|
6afccc2aea | ||
|
|
8cd3a21468 | ||
|
|
8b6d2d2b83 | ||
|
|
a39f4d5987 | ||
|
|
e236d045b0 | ||
|
|
592c7951df | ||
|
|
41efa96291 | ||
|
|
53f406a267 | ||
|
|
1390df48b6 | ||
|
|
01878ef00c | ||
|
|
6f119f25f4 | ||
|
|
3f31d78db1 | ||
|
|
014bf7777b | ||
|
|
7191969e9c | ||
|
|
0950510526 | ||
|
|
9eba3064a7 | ||
|
|
a4d785258e | ||
|
|
efef49f976 | ||
|
|
32a7b5bafb | ||
|
|
5fa080063c | ||
|
|
b3573f9482 | ||
|
|
916b7ee46b | ||
|
|
bfe8ad2034 | ||
|
|
bb9db7bf9d | ||
|
|
d7f7c8c568 | ||
|
|
10839588dd | ||
|
|
12cd2b67cd | ||
|
|
9a13036f4e | ||
|
|
2f025d51ff | ||
|
|
6cb6d3a358 | ||
|
|
0bb01d14bd | ||
|
|
2229c4e4d1 | ||
|
|
5c90c62378 | ||
|
|
b7ed0a29fe | ||
|
|
796c2ed58c | ||
|
|
39bd573d9d | ||
|
|
d4aaa547a7 | ||
|
|
f7e2382847 | ||
|
|
4bb16e7d93 | ||
|
|
e7e00e4ebf | ||
|
|
55d050fca7 | ||
|
|
98d4fef0ee | ||
|
|
5521892736 | ||
|
|
8f0fd0dfef | ||
|
|
514eab0b98 | ||
|
|
e35c84245d | ||
|
|
4a2391eb1b | ||
|
|
04eb497e10 | ||
|
|
a9a5da6dc6 | ||
|
|
3f1aab27d6 | ||
|
|
8f77df4ebb | ||
|
|
65a8b3fcd4 | ||
|
|
71dd4e512e | ||
|
|
ca03a5ecf4 | ||
|
|
694efb9508 | ||
|
|
c60a112039 | ||
|
|
c3570dd07a | ||
|
|
b680b190d4 | ||
|
|
310d51d859 | ||
|
|
cf9e820227 | ||
|
|
b91d2f4fb1 | ||
|
|
9456f5dc31 | ||
|
|
fa9e22730a | ||
|
|
7261fd7ed9 | ||
|
|
ad9e5fbf07 | ||
|
|
c242117230 | ||
|
|
d7c1b23fa2 | ||
|
|
25e9919bb3 | ||
|
|
912c01457a | ||
|
|
8083390eab | ||
|
|
44baa4cc1e | ||
|
|
f0662bb878 | ||
|
|
fbe1a6d4c5 | ||
|
|
2235f1f7af | ||
|
|
3f46f83ec8 | ||
|
|
d537d4a27e | ||
|
|
c67250da2d | ||
|
|
6027406eef | ||
|
|
fdc51f33ad | ||
|
|
ea7290afab | ||
|
|
be65597d57 | ||
|
|
253ed75800 | ||
|
|
e4f3671ae0 | ||
|
|
c60cefd188 | ||
|
|
175a41f275 | ||
|
|
bd5fd72459 | ||
|
|
98b70a647b | ||
|
|
3eee5e696d | ||
|
|
d92c6cc6c6 | ||
|
|
488485da54 | ||
|
|
a3f0254fb2 | ||
|
|
ab5f1385c5 | ||
|
|
cde5b09943 | ||
|
|
db42b6a3a5 | ||
|
|
ece35b96db | ||
|
|
c4c24ee240 | ||
|
|
c7ba465970 | ||
|
|
937ad444da | ||
|
|
0c0a928e87 | ||
|
|
2823a86b4e | ||
|
|
1a06683611 | ||
|
|
50fa74adfe | ||
|
|
4ebd249356 | ||
|
|
4dc388015c | ||
|
|
0270cf6e45 | ||
|
|
7a19c50ec0 | ||
|
|
e2fc5fff23 | ||
|
|
839df123ff | ||
|
|
f897193f79 | ||
|
|
9f23f4ead7 | ||
|
|
45ab6d47de | ||
|
|
35bc94f4bd | ||
|
|
94a4a38798 | ||
|
|
7f431dbd01 | ||
|
|
d0257df134 | ||
|
|
be3ed16d3c | ||
|
|
b651becf66 | ||
|
|
bcf49ab396 | ||
|
|
fb76ecf198 | ||
|
|
1bed49b4c6 | ||
|
|
c34376820a | ||
|
|
582e6ee322 | ||
|
|
2b4ffaa357 | ||
|
|
379a82972a | ||
|
|
713796a4f7 | ||
|
|
54161aaf39 | ||
|
|
4054519f38 | ||
|
|
e5d5d8b434 | ||
|
|
519fd212d9 | ||
|
|
4b21660fd6 | ||
|
|
ac5c9e7242 | ||
|
|
4c8431bd5b | ||
|
|
a4a93f0999 | ||
|
|
b6a4efa7ba | ||
|
|
a4fbd521e3 | ||
|
|
6fe5e89ecc | ||
|
|
bc40c95f20 | ||
|
|
acd35ac8a2 | ||
|
|
c9d9ec1c77 | ||
|
|
08c4e2d465 | ||
|
|
f300d1bafd | ||
|
|
d395115cc9 | ||
|
|
8571755daa | ||
|
|
9f3368ba1f | ||
|
|
919df1edd5 | ||
|
|
c180422e8b | ||
|
|
e90501a986 | ||
|
|
545af007b4 | ||
|
|
e189ece487 | ||
|
|
cebc2b5bdb | ||
|
|
444d48a259 | ||
|
|
4fd70ad252 | ||
|
|
293326b647 | ||
|
|
b071238eda | ||
|
|
09ef1b66cc | ||
|
|
c06df3889b | ||
|
|
280fc78f7e | ||
|
|
7b9fc04704 | ||
|
|
00e60f2592 | ||
|
|
45e9c762a7 | ||
|
|
77dcb91741 | ||
|
|
383c683716 | ||
|
|
ca3c380493 | ||
|
|
57ec5cb036 | ||
|
|
177b48ac90 | ||
|
|
b4e7fd6fa8 | ||
|
|
baf785d9f1 | ||
|
|
25b75fd6e4 | ||
|
|
0c4c8534b4 | ||
|
|
a559dbfe06 | ||
|
|
de20bb22d9 | ||
|
|
45c0ec9035 | ||
|
|
b16da90e42 | ||
|
|
ce7bcfa666 | ||
|
|
f6833699a6 | ||
|
|
040dc72877 | ||
|
|
056bce3dd9 | ||
|
|
5d6575e97b | ||
|
|
f092d4ffc3 | ||
|
|
5bae15831b | ||
|
|
cf19bd88f0 | ||
|
|
38ac6a1082 | ||
|
|
b88e2bd3ce | ||
|
|
fad24c4308 | ||
|
|
018fd83dba | ||
|
|
aa95da167f | ||
|
|
24e6a0be68 | ||
|
|
a2c962c2f6 | ||
|
|
aa61331181 | ||
|
|
00f0a7589c | ||
|
|
d39609351a | ||
|
|
6985ccf076 | ||
|
|
b448cad4de | ||
|
|
14540b4cc0 | ||
|
|
898b76a549 | ||
|
|
5cf6e382d8 | ||
|
|
e2ba56a227 | ||
|
|
ec9960e28e | ||
|
|
dc59283160 | ||
|
|
d255d44be5 | ||
|
|
b2f68a5a7e | ||
|
|
ec32679ab1 | ||
|
|
8b2471c128 | ||
|
|
022eba2c05 | ||
|
|
029c6fcfe3 | ||
|
|
faaa0b2488 | ||
|
|
daa2ca876b | ||
|
|
81700cfb44 | ||
|
|
6e58db95ed | ||
|
|
9b54862450 | ||
|
|
f79efadd82 | ||
|
|
615a7670bd | ||
|
|
155b8b472f | ||
|
|
b35e3454f0 | ||
|
|
51b4716d45 | ||
|
|
b62803a03a | ||
|
|
616893955f | ||
|
|
0f387a139b | ||
|
|
219c81aac5 | ||
|
|
083003d34f | ||
|
|
699f76c29e | ||
|
|
b670280688 | ||
|
|
37ea84ffe9 | ||
|
|
40b861acbe | ||
|
|
783c4d104c | ||
|
|
9bbddd6aeb | ||
|
|
e753acbc3f | ||
|
|
92b7b1d603 | ||
|
|
b07dc8443e | ||
|
|
3f99c513f3 | ||
|
|
793241523d | ||
|
|
7cff22fb9e | ||
|
|
214f308027 | ||
|
|
c1ce971adb | ||
|
|
f5896be699 | ||
|
|
186f839569 | ||
|
|
4879d906d9 | ||
|
|
09412f0b78 | ||
|
|
2f2d85576f | ||
|
|
362ddd0339 | ||
|
|
9499b7f562 | ||
|
|
d8bb12b5f1 | ||
|
|
5d464f4477 | ||
|
|
aaea0b2659 | ||
|
|
c9ceb09906 | ||
|
|
3b44ede67e | ||
|
|
b48e8eeb0e | ||
|
|
1fafc29ec3 | ||
|
|
1a9d0576c8 | ||
|
|
bc04211b79 | ||
|
|
cfe34355bd | ||
|
|
e3e833d8c0 | ||
|
|
5606a0a968 | ||
|
|
f0358f1da8 | ||
|
|
a3129e9e17 | ||
|
|
7435ede254 | ||
|
|
84e79e92b4 | ||
|
|
6268130998 | ||
|
|
7ad639599a | ||
|
|
caff67b77d | ||
|
|
c45a77d538 | ||
|
|
4b24fe1bf4 | ||
|
|
73e5fb6314 | ||
|
|
84ea28adfa | ||
|
|
955fc97cb2 | ||
|
|
e4012e4f87 | ||
|
|
2c662c428c | ||
|
|
da199deed1 | ||
|
|
abf75cffd9 | ||
|
|
184f13b148 | ||
|
|
d1c7309b29 | ||
|
|
62db6552d2 | ||
|
|
a019b9e1d3 | ||
|
|
cb22572f2b | ||
|
|
b52134e9ee | ||
|
|
44ef82219b | ||
|
|
8c89b0e587 | ||
|
|
322b251def | ||
|
|
0a6767209d | ||
|
|
1694b5d6fd | ||
|
|
0dd9ad43e8 | ||
|
|
c1ae3f1fb2 | ||
|
|
d84627aa2c | ||
|
|
0e020924ff | ||
|
|
4f5e238685 | ||
|
|
72ff680114 | ||
|
|
849ec6fa8f | ||
|
|
36ee3aaec6 | ||
|
|
497d4f50dd | ||
|
|
74a40b2274 | ||
|
|
75e85541a6 | ||
|
|
1d8fbac796 | ||
|
|
daf6d1936f | ||
|
|
1768e8cb62 | ||
|
|
d2d6bfc065 | ||
|
|
d4f6e9c587 | ||
|
|
6d06f2212e | ||
|
|
73b310d59e | ||
|
|
3dc705a7a9 | ||
|
|
8fc8d03cc4 | ||
|
|
df77f42145 | ||
|
|
0dea5bdbea | ||
|
|
5c7f939440 | ||
|
|
09bef28362 | ||
|
|
1f0f94746b | ||
|
|
c057be17d0 | ||
|
|
301aaf9c68 | ||
|
|
ab7093f962 | ||
|
|
29b2d67fb6 | ||
|
|
d4cd2b8be8 | ||
|
|
fea94f956d | ||
|
|
a656aa21f8 | ||
|
|
3b235f2ca2 | ||
|
|
376841f619 | ||
|
|
746a7c404b | ||
|
|
2d126300d8 | ||
|
|
ed7e43ed6e | ||
|
|
7c56f1a773 | ||
|
|
6ba396440f | ||
|
|
8970525861 | ||
|
|
5a88a66709 | ||
|
|
3ae6e3ee53 | ||
|
|
5c0d4700f9 | ||
|
|
7b354f5b8c | ||
|
|
a197c0219e | ||
|
|
05f4036309 | ||
|
|
37974c7ec8 | ||
|
|
5cb3e15201 | ||
|
|
54b4766680 | ||
|
|
cc0bb65096 | ||
|
|
296c9dc055 | ||
|
|
70aa2309b7 | ||
|
|
d2468d144e | ||
|
|
ebbe704672 | ||
|
|
d146870a74 | ||
|
|
58ebabf74c | ||
|
|
8f8a3b6387 | ||
|
|
df616cfe3e | ||
|
|
dd96608bb1 | ||
|
|
264f2ab316 | ||
|
|
773f156785 | ||
|
|
7cd3e2a5b9 | ||
|
|
0ec22a4639 | ||
|
|
74ac9cbbbe | ||
|
|
0020bd0fb7 | ||
|
|
1d6ec0f953 | ||
|
|
37f05f0a12 | ||
|
|
9a22a1dbf4 | ||
|
|
b768c8b28a | ||
|
|
bcbdbb4932 | ||
|
|
04e42c4a75 | ||
|
|
6040c7768f | ||
|
|
6da0d3e88d | ||
|
|
7c6cc7b246 | ||
|
|
d5da1d6f3f | ||
|
|
de5ee90e21 | ||
|
|
8a0c9ab3db | ||
|
|
e901a1f231 | ||
|
|
e4c47aca9e | ||
|
|
a43a3db098 | ||
|
|
d651606800 | ||
|
|
5501ab9083 | ||
|
|
660a21deb1 | ||
|
|
be7949b909 | ||
|
|
a688656f6d | ||
|
|
62365529cc | ||
|
|
dcea869098 | ||
|
|
634a8702cd | ||
|
|
fee993c309 | ||
|
|
bf76707e92 | ||
|
|
da847f6567 | ||
|
|
7a5d25f2e3 | ||
|
|
bf0dedd447 | ||
|
|
3f7dcc6acf | ||
|
|
2efe8b4186 | ||
|
|
068f5771b2 | ||
|
|
c2b1be288e | ||
|
|
163ad248af | ||
|
|
4598c3d852 | ||
|
|
a1dec131c7 | ||
|
|
133585f46a | ||
|
|
3ea81ce2fb | ||
|
|
590fe211c4 | ||
|
|
78cda03d61 | ||
|
|
e126cbf644 | ||
|
|
cc12ae7712 | ||
|
|
e8486abccf | ||
|
|
15f074a45b | ||
|
|
a426d98e92 | ||
|
|
45d171e0e3 | ||
|
|
5950c33a43 | ||
|
|
ea1b584436 | ||
|
|
a24ede364d | ||
|
|
c6fe456cac | ||
|
|
4008fb3a53 | ||
|
|
96588089ef | ||
|
|
e4c96dc6d8 | ||
|
|
c205e0da1b | ||
|
|
7b61605834 | ||
|
|
e7fb05d7e0 | ||
|
|
8f0680f5fc | ||
|
|
9c03dd001c | ||
|
|
30407f5b4e | ||
|
|
3a5378d201 | ||
|
|
d4f3577f5e | ||
|
|
408e9bf3fc | ||
|
|
f5dd91afe5 | ||
|
|
8922459418 | ||
|
|
caeadbc41e | ||
|
|
99143c0e3b | ||
|
|
1b145e38a3 | ||
|
|
f59cce15c0 | ||
|
|
7655c251a2 | ||
|
|
5608cb542f | ||
|
|
62add53c08 | ||
|
|
43bae6c05b | ||
|
|
55777d33ad | ||
|
|
0f5d14b589 | ||
|
|
00703d1570 | ||
|
|
fd03c33f4d | ||
|
|
c20f91b6d8 | ||
|
|
10b22e9e42 | ||
|
|
329f0871d5 | ||
|
|
66996f491c | ||
|
|
9ae39f3900 | ||
|
|
9d0db3c1e5 | ||
|
|
5932dd99ad | ||
|
|
910f0083cd | ||
|
|
32a8676572 | ||
|
|
801829ccbf | ||
|
|
b5107d21dd | ||
|
|
158bf873bd | ||
|
|
40cfb9876d | ||
|
|
12e3214f70 | ||
|
|
0eb68ec461 | ||
|
|
f231565163 | ||
|
|
7cca53bcc5 | ||
|
|
be94c94309 | ||
|
|
8e2d654b40 | ||
|
|
2ed5c0c5cc | ||
|
|
745ad3b9e9 | ||
|
|
3ce114760f | ||
|
|
bae7d1fc1d | ||
|
|
e4d9dfc128 | ||
|
|
7490ba3179 | ||
|
|
45da12ad55 | ||
|
|
75f99bf899 | ||
|
|
bd2b1cc166 | ||
|
|
5fa8d64994 | ||
|
|
034957b556 | ||
|
|
a9d7c73b04 | ||
|
|
b09fe05fe6 | ||
|
|
ed146549ef | ||
|
|
86c11db1a1 | ||
|
|
580cd57433 | ||
|
|
9854ce82bd | ||
|
|
af11df97f5 | ||
|
|
9b4e664908 | ||
|
|
567e1ee116 | ||
|
|
ef7fa5363a | ||
|
|
f8bd7c2e64 | ||
|
|
de46c9ee36 | ||
|
|
5969e2d7ed | ||
|
|
83047558d5 | ||
|
|
f239868299 | ||
|
|
e4b962a3a6 | ||
|
|
b68a94c0e5 | ||
|
|
ec53ca8423 | ||
|
|
1ba0729e34 | ||
|
|
73425c0052 | ||
|
|
679859fb37 | ||
|
|
dbdc660464 | ||
|
|
aa22e7e952 | ||
|
|
b920e7e95c | ||
|
|
d14b23ca82 | ||
|
|
4e8f69f692 | ||
|
|
c96cf2b0e5 | ||
|
|
4921cfb593 | ||
|
|
395545f7b1 | ||
|
|
f9d336a3a6 | ||
|
|
b32603b472 | ||
|
|
1124c48c8d | ||
|
|
98e429505c | ||
|
|
d0b616ba24 | ||
|
|
dac4ffcb98 | ||
|
|
680310cf70 | ||
|
|
67ff82810f | ||
|
|
87e71ea860 | ||
|
|
26c110291e | ||
|
|
9879f074b4 | ||
|
|
65168c71c0 | ||
|
|
4c4996ee2a | ||
|
|
e0c67f87b0 | ||
|
|
352c8ee867 | ||
|
|
fe5cc1f8f3 | ||
|
|
eec4be1845 | ||
|
|
2f86b5c7b0 | ||
|
|
0d672c4f99 | ||
|
|
ac3fdbc2cd | ||
|
|
0a7ad44d23 | ||
|
|
18a86d3f12 | ||
|
|
665e66a9a6 | ||
|
|
06dc4117c7 | ||
|
|
2651afcef0 | ||
|
|
ce4d828380 | ||
|
|
74fba486bd | ||
|
|
56075cb7d9 | ||
|
|
d71bc775d5 | ||
|
|
45c5801538 | ||
|
|
cf41b524b0 | ||
|
|
e2a3e55a17 | ||
|
|
ae35bd2047 | ||
|
|
2f0ca6f7c0 | ||
|
|
37428c01dd | ||
|
|
4116d95a3e | ||
|
|
35ae2b783f | ||
|
|
8a24a6d192 | ||
|
|
19374a5df4 | ||
|
|
12da6fbd18 | ||
|
|
573ff15925 | ||
|
|
1b2abbe321 | ||
|
|
4a03da6b96 | ||
|
|
cf3998942f | ||
|
|
0c71f783fc | ||
|
|
d30b30b24f | ||
|
|
7823ec3fc8 | ||
|
|
1e5883f028 | ||
|
|
33c3cf4c4f | ||
|
|
f41ace4d7c | ||
|
|
65d2d45a82 | ||
|
|
47ca483459 | ||
|
|
ee759af078 | ||
|
|
872037cf4d | ||
|
|
6aaa083157 | ||
|
|
6a88524f8e | ||
|
|
82d93d2602 | ||
|
|
d62037ef6a | ||
|
|
7314b5a339 | ||
|
|
62bc230521 | ||
|
|
3e0d34d148 | ||
|
|
aff1cc1cc3 | ||
|
|
6ddc7fa4cc | ||
|
|
957db1ec11 | ||
|
|
ae806da3f1 | ||
|
|
6a03c3e77d | ||
|
|
72b18eadf3 | ||
|
|
67aa583709 | ||
|
|
21f3755e44 | ||
|
|
c9b6df846e | ||
|
|
7e23a8169f | ||
|
|
b139eadf0b | ||
|
|
71ad648331 | ||
|
|
b8c7752356 | ||
|
|
b157f2085f | ||
|
|
2fda7b8011 | ||
|
|
5b24d19630 | ||
|
|
76652f6c6b | ||
|
|
724ae51110 | ||
|
|
1503124108 | ||
|
|
007125a071 | ||
|
|
b5f5b0b4aa | ||
|
|
cbda59e547 | ||
|
|
a885e16049 | ||
|
|
07eabad18d | ||
|
|
cf079a159f | ||
|
|
93176989fd | ||
|
|
7a56141894 | ||
|
|
31cc0ff6e9 | ||
|
|
8719b3eb64 | ||
|
|
5347624455 | ||
|
|
25210339d9 | ||
|
|
72c7cd2536 | ||
|
|
d018eeb376 | ||
|
|
d1424276bc | ||
|
|
cf9696a8cf | ||
|
|
a7cbe526e3 | ||
|
|
fe1c58ad27 | ||
|
|
753d01d413 | ||
|
|
feacb3ed14 | ||
|
|
f5b1e6d03a | ||
|
|
46fc2dd8d0 | ||
|
|
b063aae130 | ||
|
|
655a729143 | ||
|
|
5d2138b95e | ||
|
|
0b24cc29c1 | ||
|
|
2fa7b532b1 | ||
|
|
aa1ed52f64 | ||
|
|
29dddd7d62 | ||
|
|
6ddbea316a | ||
|
|
8da80f0710 | ||
|
|
24382b8607 | ||
|
|
65438e837d | ||
|
|
1a3cb8b623 | ||
|
|
6bf4a0d09d | ||
|
|
9ae734672b | ||
|
|
cfa84476c8 | ||
|
|
5b0d160df4 | ||
|
|
41f858eb04 | ||
|
|
c5753b898a | ||
|
|
c6810409c7 | ||
|
|
f6c16ec53d | ||
|
|
84a6ee8cbf | ||
|
|
e651a13980 | ||
|
|
f494570725 | ||
|
|
5955ca74d2 | ||
|
|
eb4fa8620d | ||
|
|
34fe7dd6d1 | ||
|
|
4cbb3cb43c | ||
|
|
050acdf580 | ||
|
|
358da4051e | ||
|
|
ffb51c1515 | ||
|
|
72d4952812 | ||
|
|
04bf86c21d | ||
|
|
d392dc82a1 | ||
|
|
f7f4289614 | ||
|
|
72f9951cb1 | ||
|
|
8450f56093 | ||
|
|
cb2a25ad46 | ||
|
|
a028172cf6 | ||
|
|
91aa48ac9a | ||
|
|
218320749f | ||
|
|
6a1ff56e7b | ||
|
|
8f7c4951b8 | ||
|
|
6215a7d65e | ||
|
|
0e28b1ffe1 | ||
|
|
7dd435d677 | ||
|
|
7fd5209cdb | ||
|
|
ed5b6962d7 | ||
|
|
98718c0693 | ||
|
|
f02588855a | ||
|
|
c63841fdee | ||
|
|
b49b4601cd | ||
|
|
ed352d2d21 | ||
|
|
dab56121a2 | ||
|
|
df02afaed9 | ||
|
|
e6fe121c1e | ||
|
|
b37fbc1284 | ||
|
|
f5ac554022 | ||
|
|
df76c82449 | ||
|
|
8f1f978800 | ||
|
|
bf3cc6690c | ||
|
|
20ba7eaaf3 | ||
|
|
95708cd5ab | ||
|
|
fba58bba71 | ||
|
|
bc6ff3e3bc | ||
|
|
3415be4c56 | ||
|
|
05d6f5d806 | ||
|
|
ed8266bb43 | ||
|
|
759f35ff9c | ||
|
|
bcac8f1599 | ||
|
|
0abf054825 | ||
|
|
825b76e28e | ||
|
|
0a13ac142e | ||
|
|
566e6634a6 | ||
|
|
4b888e6911 | ||
|
|
0cfc89f574 | ||
|
|
337382b7e6 | ||
|
|
4ed657c930 | ||
|
|
5895b37965 | ||
|
|
6979b8e11e | ||
|
|
20713cf158 | ||
|
|
13ff0846b1 | ||
|
|
e92d091cb3 | ||
|
|
6b1a435cdc | ||
|
|
3f04b465f3 | ||
|
|
3f5c8fe2cb | ||
|
|
d1cf6c68f3 | ||
|
|
7117f00480 | ||
|
|
d4f37343a2 | ||
|
|
71e15e9cab | ||
|
|
eadf00feba | ||
|
|
95f28fad2b | ||
|
|
9753137a72 | ||
|
|
e4f7436dfb | ||
|
|
d39211310d | ||
|
|
0a6fb3ec0a | ||
|
|
5232cf7cec | ||
|
|
6e16ffe05f | ||
|
|
2d6895aeea | ||
|
|
b5311e1448 | ||
|
|
cc63eb383d | ||
|
|
01736ca685 | ||
|
|
be47bb7263 | ||
|
|
bcb7d88ed7 | ||
|
|
cf58c1b4b5 | ||
|
|
70c57928e7 | ||
|
|
c8219b29c0 | ||
|
|
15a9f80430 | ||
|
|
0684dfe869 | ||
|
|
83a89566ac | ||
|
|
04f486b003 | ||
|
|
f135c92434 | ||
|
|
78b095d01a | ||
|
|
1b8bd494e2 | ||
|
|
481925ac78 | ||
|
|
4854b2b1c0 | ||
|
|
2d7b33459e | ||
|
|
27e0c7421b | ||
|
|
b26c3d050c | ||
|
|
439370e25a | ||
|
|
1be4f6e20c | ||
|
|
2714c7cce9 | ||
|
|
952935de23 | ||
|
|
bdb8b5ea39 | ||
|
|
3ad4e28a2c | ||
|
|
48d0d068d1 | ||
|
|
56e166d61a | ||
|
|
672d753adf | ||
|
|
0d9ba92db4 | ||
|
|
8cf25d3602 | ||
|
|
a6bc44dc10 | ||
|
|
408d66ee74 | ||
|
|
b136bb74b8 | ||
|
|
18b2b6f447 | ||
|
|
490d1775a2 | ||
|
|
458de2d2e0 | ||
|
|
51ae3fc62f | ||
|
|
58c5c55d09 | ||
|
|
4c2bcb9e6b | ||
|
|
498379bb7e | ||
|
|
e7f3b115a4 | ||
|
|
0ebfe85d8e | ||
|
|
8e29a990cb | ||
|
|
a960ccd786 | ||
|
|
6b86e836d7 | ||
|
|
fb35b9b10a | ||
|
|
a45773e1ca |
@@ -1,33 +1,13 @@
|
||||
Code contributions are welcome! Please commit any pull requests against the `master` branch.
|
||||
|
||||
# Internationalization (i18n)
|
||||
# Localization (l10n)
|
||||
|
||||
If you are interested in helping translate the bitwarden mobile app into another language, please follow these steps
|
||||
when creating your pull request:
|
||||
[](https://crowdin.com/project/bitwarden-mobile)
|
||||
|
||||
1. Create a new resource file under `/src/App/Resources` by copy/pasting the master English file, `AppResources.resx`.
|
||||
2. Rename your `AppResources.resx` copy to include the proper .NET culture code for your language (typically the two
|
||||
letter code, ex. `sv`). You can find a list of culture codes here: <http://timtrott.co.uk/culture-codes/>. For
|
||||
example, if I want to create a new translation for Swedish, I will rename my `AppResources.resx` copy to
|
||||
`AppResources.sv.resx`.
|
||||
3. Open the `AppResources.XX.resx` file for your newly created language and start translating the `<value>` tags for
|
||||
each `<data>` element. The `<data>` and `<comment>` properties should not be translated and remain in English.
|
||||
4. Repeat the same process for the store `COPY.md` and `CAPTIONS.md` files in `/store/apple` and `/store/google` by
|
||||
creating a new folder for your language in each. Do not copy over the `assets` and `screenshots` folders to your new
|
||||
language. We will update these based on your translations provided in `CAPTIONS.md`. Finally, do not translate the
|
||||
titles in the markdown files (ex. `# Name` and `# Screenshot 1`). These are only for reference.
|
||||
5. If you have a Xamarin development environment setup, test your translations to make sure they look correct in the
|
||||
app on iOS and Android. Sometimes the UI can break due to translations taking up more space than the original UI was
|
||||
built for. If possible, use a shorter or abbreviated version of the word/sentence to accomedate the available space.
|
||||
If you are unable to accomedate the avaialable space for a particular translation, just let us know in your pull
|
||||
request comments. If you are unable to test your translations, just let us know in your pull request comments so
|
||||
that we can check it for you.
|
||||
6. Be sure to watch for [future changes](https://github.com/bitwarden/mobile/commits/master/src/App/Resources/AppResources.resx)
|
||||
to the `/src/App/Resources/AppResources.resx` file so that your translation will stay up to date.
|
||||
We use a translation tool called [Crowdin](https://crowdin.com) to help manage our localization efforts across many different languages.
|
||||
|
||||
You can find an example of a proper translation pull request here: <https://github.com/bitwarden/mobile/pull/22/files>
|
||||
If you are interested in helping translate the Bitwarden mobile app into another language (or make a translation correction), please register an account at Crowdin and join our project here: https://crowdin.com/project/bitwarden-mobile
|
||||
|
||||
You can read more about localizing a Xamarin.Forms app here:
|
||||
<https://developer.xamarin.com/guides/xamarin-forms/advanced/localization/>
|
||||
If the language that you are interested in translating is not already listed, create a new account on Crowdin, join the project, and contact the project owner (https://crowdin.com/profile/kspearrin).
|
||||
|
||||
TIP: If you have Visual Studio installed, it provides a nice tabular UI for editing `resx` XML files.
|
||||
You can read Crowdin's getting started guide for translators here: https://support.crowdin.com/crowdin-intro/
|
||||
|
||||
5
ISSUE_TEMPLATE.md
Normal file
@@ -0,0 +1,5 @@
|
||||
<!--
|
||||
Please do not submit feature requests. The [Community Forums][1] has a
|
||||
section for submitting, voting for, and discussing product feature requests.
|
||||
[1]: https://community.bitwarden.com
|
||||
-->
|
||||
23
README.md
@@ -1,21 +1,28 @@
|
||||
[] (https://ci.appveyor.com/project/bitwarden/mobile)
|
||||
[](https://ci.appveyor.com/project/bitwarden/mobile)
|
||||
[](https://crowdin.com/project/bitwarden-mobile)
|
||||
[](https://gitter.im/bitwarden/Lobby)
|
||||
|
||||
# bitwarden mobile
|
||||
# Bitwarden Mobile Application
|
||||
|
||||
<a href="https://play.google.com/store/apps/details?id=com.x8bit.bitwarden" target="_blank"><img alt="Get it on Google Play" src="https://imgur.com/YQzmZi9.png" width="153" height="46"></a> <a href="https://itunes.apple.com/us/app/bitwarden-free-password-manager/id1137397744?mt=8" target="_blank"><img src="https://imgur.com/GdGqPMY.png" width="135" height="40"></a> <a href="https://www.amazon.com/dp/B06XMYGPMV" target="_blank"><img src="https://imgur.com/f75uYeM.png" width="132" height="45"></a>
|
||||
<a href="https://play.google.com/store/apps/details?id=com.x8bit.bitwarden" target="_blank"><img alt="Get it on Google Play" src="https://imgur.com/YQzmZi9.png" width="153" height="46"></a> <a href="https://itunes.apple.com/us/app/bitwarden-free-password-manager/id1137397744?mt=8" target="_blank"><img src="https://imgur.com/GdGqPMY.png" width="135" height="40"></a>
|
||||
|
||||
The bitwarden mobile application is written in C# with Xamarin Android, Xamarin iOS, and Xamarin Forms.
|
||||
The Bitwarden mobile application is written in C# with Xamarin Android, Xamarin iOS, UWP, and Xamarin Forms.
|
||||
|
||||
<img src="https://raw.githubusercontent.com/bitwarden/brand/master/screenshots/mobile-android.png" alt="" width="300" height="533" /> <img src="https://raw.githubusercontent.com/bitwarden/brand/master/screenshots/mobile-ios.png" alt="" width="300" height="533" />
|
||||
|
||||
# Build/Run
|
||||
|
||||
**Requirements**
|
||||
|
||||
- [Visual Studio w/ Xamarin -or- Xamarin Studio](https://store.xamarin.com/)
|
||||
- [Visual Studio](https://store.xamarin.com/)
|
||||
|
||||
**API endpoint**
|
||||
|
||||
By default the app is targeting the production API. If you are running the [Core](https://github.com/bitwarden/core) API locally,
|
||||
you'll need to switch the app to target your local API. Open `src/App/Utilities/ApiHttpClient.cs` and set `BaseAddress` to your local
|
||||
API instance (ex. `new Uri("http://localhost:4000")`).
|
||||
you'll need to switch the app to target your local instance. Open `src/App/Utilities/ApiHttpClient.cs` and `src/App/Utilities/IdentityHttpClient.cs` and set the `BaseAddress` to your local
|
||||
API endpoints (ex. `new Uri("http://localhost:5000")`). Alternatively, you can also adjust the environment endpoints from the environment settings page on the home screen of the app (log out).
|
||||
|
||||
**Run the app**
|
||||
|
||||
After restoring the nuget packages, you can now build and run the app.
|
||||
|
||||
@@ -24,4 +31,4 @@ After restoring the nuget packages, you can now build and run the app.
|
||||
Code contributions are welcome! Visual Studio or Xamarin Studio is required to work on this project. Please commit any pull requests against the `master` branch.
|
||||
Learn more about how to contribute by reading the [`CONTRIBUTING.md`](CONTRIBUTING.md) file.
|
||||
|
||||
Security audits and feedback are welcome. Please open an issue or email us privately if the report is sensitive in nature.
|
||||
Security audits and feedback are welcome. Please open an issue or email us privately if the report is sensitive in nature. You can read our security policy in the [`SECURITY.md`](SECURITY.md) file.
|
||||
|
||||
45
SECURITY.md
Normal file
@@ -0,0 +1,45 @@
|
||||
Bitwarden believes that working with security researchers across the globe is crucial to keeping our
|
||||
users safe. If you believe you've found a security issue in our product or service, we encourage you to
|
||||
notify us. We welcome working with you to resolve the issue promptly. Thanks in advance!
|
||||
|
||||
# Disclosure Policy
|
||||
|
||||
- Let us know as soon as possible upon discovery of a potential security issue, and we'll make every
|
||||
effort to quickly resolve the issue.
|
||||
- Provide us a reasonable amount of time to resolve the issue before any disclosure to the public or a
|
||||
third-party. We may publicly disclose the issue before resolving it, if appropriate.
|
||||
- Make a good faith effort to avoid privacy violations, destruction of data, and interruption or
|
||||
degradation of our service. Only interact with accounts you own or with explicit permission of the
|
||||
account holder.
|
||||
- If you would like to encrypt your report, please use the PGP key with long ID
|
||||
`0xDE6887086F892325FEC04CC0D847525B6931381F` (available in the public keyserver pool).
|
||||
|
||||
# In-scope
|
||||
|
||||
- Security issues in any current release of Bitwarden. This includes the web vault, browser extension,
|
||||
and mobile apps (iOS and Android). Product downloads are available at https://bitwarden.com. Source
|
||||
code is available at https://github.com/bitwarden.
|
||||
|
||||
# Exclusions
|
||||
|
||||
The following bug classes are out-of scope:
|
||||
|
||||
- Bugs that are already reported on any of Bitwarden's issue trackers (https://github.com/bitwarden),
|
||||
or that we already know of. Note that some of our issue tracking is private.
|
||||
- Issues in an upstream software dependency (ex: Xamarin, ASP.NET) which are already reported to the
|
||||
upstream maintainer.
|
||||
- Attacks requiring physical access to a user's device.
|
||||
- Self-XSS
|
||||
- Issues related to software or protocols not under Bitwarden's control
|
||||
- Vulnerabilities in outdated versions of Bitwarden
|
||||
- Missing security best practices that do not directly lead to a vulnerability
|
||||
- Issues that do not have any impact on the general public
|
||||
|
||||
While researching, we'd like to ask you to refrain from:
|
||||
|
||||
- Denial of service
|
||||
- Spamming
|
||||
- Social engineering (including phishing) of Bitwarden staff or contractors
|
||||
- Any physical attempts against Bitwarden property or data centers
|
||||
|
||||
Thank you for helping keep Bitwarden and our users safe!
|
||||
29
appveyor.yml
@@ -1,14 +1,29 @@
|
||||
skip_tags: true
|
||||
#init:
|
||||
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
||||
#on_finish:
|
||||
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
||||
install:
|
||||
- choco install cloc --no-progress
|
||||
- "cloc --vcs git --exclude-dir Resources,store,test,UWP,Properties --include-lang C#,JavaScript,TypeScript,PowerShell"
|
||||
# - appveyor DownloadFile https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
|
||||
# - appveyor DownloadFile https://aka.ms/vs/15/release/vs_community.exe
|
||||
# - vs_community.exe update --wait --quiet --norestart --installPath "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community"
|
||||
# - ps: .\src\Android\update-android.ps1
|
||||
before_build:
|
||||
- nuget restore
|
||||
- IF DEFINED keystore_dec_secret nuget install secure-file -ExcludeVersion
|
||||
- IF DEFINED google_services_dec_secret secure-file\tools\secure-file -decrypt src\Android\google-services.json.enc -secret %google_services_dec_secret%
|
||||
after_build:
|
||||
- ps: IF($env:keystore_dec_secret) { .\src\Android\increment-version.ps1 $($env:APPVEYOR_BUILD_FOLDER) $($env:APPVEYOR_BUILD_NUMBER) }
|
||||
- IF DEFINED keystore_dec_secret secure-file\tools\secure-file -decrypt src\Android\8bit.keystore.enc -secret %keystore_dec_secret%
|
||||
- IF DEFINED keystore_password msbuild "/t:SignAndroidPackage" "/p:Configuration=Release" "/p:AndroidKeyStore=true" "/p:AndroidSigningKeyAlias=bitwarden" "/p:AndroidSigningKeyPass=%keystore_password%" "/p:AndroidSigningKeyStore=8bit.keystore" "/p:AndroidSigningStorePass=%keystore_password%" "src\Android\Android.csproj"
|
||||
- ps: IF($env:keystore_dec_secret) { copy-item src\Android\bin\Release\com.x8bit.bitwarden-Signed.apk .\com.x8bit.bitwarden-$($env:APPVEYOR_BUILD_NUMBER).apk }
|
||||
- ps: IF($env:keystore_dec_secret) { .\src\Android\ci-build-apks.ps1 }
|
||||
on_success:
|
||||
- IF DEFINED play_dec_secret secure-file\tools\secure-file -decrypt store\google\Publisher\play_creds.json.enc -secret %play_dec_secret%
|
||||
- IF DEFINED play_dec_secret store\google\Publisher\bin\Debug\Publisher.exe %APPVEYOR_BUILD_FOLDER%\store\google\Publisher\play_creds.json %APPVEYOR_BUILD_FOLDER%\src\Android\bin\Release\com.x8bit.bitwarden-Signed.apk alpha
|
||||
- IF DEFINED play_dec_secret dotnet store\google\Publisher\bin\Release\netcoreapp2.0\Publisher.dll %APPVEYOR_BUILD_FOLDER%\store\google\Publisher\play_creds.json %APPVEYOR_BUILD_FOLDER%\com.x8bit.bitwarden-%APPVEYOR_BUILD_NUMBER%.apk alpha
|
||||
artifacts:
|
||||
- path: com.x8bit.bitwarden-%APPVEYOR_BUILD_NUMBER%.apk
|
||||
- path: com.x8bit.bitwarden-%APPVEYOR_BUILD_NUMBER%.apk
|
||||
- path: com.x8bit.bitwarden-fdroid-%APPVEYOR_BUILD_NUMBER%.apk
|
||||
branches:
|
||||
except:
|
||||
- l10n_master
|
||||
skip_tags: true
|
||||
configuration: Release
|
||||
image: Visual Studio 2017
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25420.1
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.27130.2010
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Android", "src\Android\Android.csproj", "{04B18ED2-B76D-4947-8474-191F8FD2B5E0}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iOS", "src\iOS\iOS.csproj", "{1F78403F-9A28-405B-9289-B9DBEB55F074}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "App", "src\App\App.csproj", "{B490C5DA-639E-4994-ABD2-54222B8A348E}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{0D790714-ECF8-4A83-BE4A-E9C84DD1BB5D}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{EC730FD9-F623-4B6C-B503-95CDCFBCF277}"
|
||||
@@ -19,15 +17,24 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iOS.Extension", "src\iOS.Ex
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iOS.Core", "src\iOS.Core\iOS.Core.csproj", "{B2538ADA-B605-4D6F-ACD2-62A409680F84}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iOS.Test", "test\iOS.Test\iOS.Test.csproj", "{6702027A-F726-4149-863E-7CB924674B9A}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Android.Test", "test\Android.Test\Android.Test.csproj", "{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "store", "store", "{92470CBD-9047-4C3C-8EA3-D972D6622D84}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "google", "google", "{2E399654-26A2-46F6-B9CA-1B496A3F370A}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Publisher", "store\google\Publisher\Publisher.csproj", "{428CACAB-CC26-4F41-9062-1E4A9BC82640}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "App", "src\App\App.csproj", "{8A279EE4-4537-4656-9C93-44945E594556}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Publisher", "store\google\Publisher\Publisher.csproj", "{D5D91152-CB01-4F24-A503-304D3A94408B}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{F0E2E596-C3DB-474A-9C88-7824662894FA}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
.gitignore = .gitignore
|
||||
appveyor.yml = appveyor.yml
|
||||
crowdin.yml = crowdin.yml
|
||||
README.md = README.md
|
||||
SECURITY.md = SECURITY.md
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iOS.Autofill", "src\iOS.Autofill\iOS.Autofill.csproj", "{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@@ -49,6 +56,12 @@ Global
|
||||
Debug|iPhoneSimulator = Debug|iPhoneSimulator
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
FDroid|Any CPU = FDroid|Any CPU
|
||||
FDroid|ARM = FDroid|ARM
|
||||
FDroid|iPhone = FDroid|iPhone
|
||||
FDroid|iPhoneSimulator = FDroid|iPhoneSimulator
|
||||
FDroid|x64 = FDroid|x64
|
||||
FDroid|x86 = FDroid|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|ARM = Release|ARM
|
||||
Release|iPhone = Release|iPhone
|
||||
@@ -94,11 +107,27 @@ Global
|
||||
{04B18ED2-B76D-4947-8474-191F8FD2B5E0}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{04B18ED2-B76D-4947-8474-191F8FD2B5E0}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{04B18ED2-B76D-4947-8474-191F8FD2B5E0}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{04B18ED2-B76D-4947-8474-191F8FD2B5E0}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{04B18ED2-B76D-4947-8474-191F8FD2B5E0}.Debug|x64.Deploy.0 = Debug|Any CPU
|
||||
{04B18ED2-B76D-4947-8474-191F8FD2B5E0}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{04B18ED2-B76D-4947-8474-191F8FD2B5E0}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{04B18ED2-B76D-4947-8474-191F8FD2B5E0}.Debug|x86.Deploy.0 = Debug|Any CPU
|
||||
{04B18ED2-B76D-4947-8474-191F8FD2B5E0}.FDroid|Any CPU.ActiveCfg = FDroid|Any CPU
|
||||
{04B18ED2-B76D-4947-8474-191F8FD2B5E0}.FDroid|Any CPU.Build.0 = FDroid|Any CPU
|
||||
{04B18ED2-B76D-4947-8474-191F8FD2B5E0}.FDroid|Any CPU.Deploy.0 = FDroid|Any CPU
|
||||
{04B18ED2-B76D-4947-8474-191F8FD2B5E0}.FDroid|ARM.ActiveCfg = FDroid|Any CPU
|
||||
{04B18ED2-B76D-4947-8474-191F8FD2B5E0}.FDroid|ARM.Build.0 = FDroid|Any CPU
|
||||
{04B18ED2-B76D-4947-8474-191F8FD2B5E0}.FDroid|ARM.Deploy.0 = FDroid|Any CPU
|
||||
{04B18ED2-B76D-4947-8474-191F8FD2B5E0}.FDroid|iPhone.ActiveCfg = FDroid|Any CPU
|
||||
{04B18ED2-B76D-4947-8474-191F8FD2B5E0}.FDroid|iPhone.Build.0 = FDroid|Any CPU
|
||||
{04B18ED2-B76D-4947-8474-191F8FD2B5E0}.FDroid|iPhone.Deploy.0 = FDroid|Any CPU
|
||||
{04B18ED2-B76D-4947-8474-191F8FD2B5E0}.FDroid|iPhoneSimulator.ActiveCfg = FDroid|Any CPU
|
||||
{04B18ED2-B76D-4947-8474-191F8FD2B5E0}.FDroid|iPhoneSimulator.Build.0 = FDroid|Any CPU
|
||||
{04B18ED2-B76D-4947-8474-191F8FD2B5E0}.FDroid|iPhoneSimulator.Deploy.0 = FDroid|Any CPU
|
||||
{04B18ED2-B76D-4947-8474-191F8FD2B5E0}.FDroid|x64.ActiveCfg = FDroid|Any CPU
|
||||
{04B18ED2-B76D-4947-8474-191F8FD2B5E0}.FDroid|x64.Build.0 = FDroid|Any CPU
|
||||
{04B18ED2-B76D-4947-8474-191F8FD2B5E0}.FDroid|x64.Deploy.0 = FDroid|Any CPU
|
||||
{04B18ED2-B76D-4947-8474-191F8FD2B5E0}.FDroid|x86.ActiveCfg = FDroid|Any CPU
|
||||
{04B18ED2-B76D-4947-8474-191F8FD2B5E0}.FDroid|x86.Build.0 = FDroid|Any CPU
|
||||
{04B18ED2-B76D-4947-8474-191F8FD2B5E0}.FDroid|x86.Deploy.0 = FDroid|Any CPU
|
||||
{04B18ED2-B76D-4947-8474-191F8FD2B5E0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{04B18ED2-B76D-4947-8474-191F8FD2B5E0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{04B18ED2-B76D-4947-8474-191F8FD2B5E0}.Release|Any CPU.Deploy.0 = Release|Any CPU
|
||||
@@ -136,9 +165,20 @@ Global
|
||||
{1F78403F-9A28-405B-9289-B9DBEB55F074}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
|
||||
{1F78403F-9A28-405B-9289-B9DBEB55F074}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
|
||||
{1F78403F-9A28-405B-9289-B9DBEB55F074}.Debug|x64.ActiveCfg = Debug|iPhone
|
||||
{1F78403F-9A28-405B-9289-B9DBEB55F074}.Debug|x64.Build.0 = Debug|iPhone
|
||||
{1F78403F-9A28-405B-9289-B9DBEB55F074}.Debug|x86.ActiveCfg = Debug|iPhone
|
||||
{1F78403F-9A28-405B-9289-B9DBEB55F074}.Debug|x86.Build.0 = Debug|iPhone
|
||||
{1F78403F-9A28-405B-9289-B9DBEB55F074}.FDroid|Any CPU.ActiveCfg = Release|iPhoneSimulator
|
||||
{1F78403F-9A28-405B-9289-B9DBEB55F074}.FDroid|Any CPU.Build.0 = Release|iPhoneSimulator
|
||||
{1F78403F-9A28-405B-9289-B9DBEB55F074}.FDroid|ARM.ActiveCfg = Release|iPhoneSimulator
|
||||
{1F78403F-9A28-405B-9289-B9DBEB55F074}.FDroid|ARM.Build.0 = Release|iPhoneSimulator
|
||||
{1F78403F-9A28-405B-9289-B9DBEB55F074}.FDroid|iPhone.ActiveCfg = Release|iPhone
|
||||
{1F78403F-9A28-405B-9289-B9DBEB55F074}.FDroid|iPhone.Build.0 = Release|iPhone
|
||||
{1F78403F-9A28-405B-9289-B9DBEB55F074}.FDroid|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
|
||||
{1F78403F-9A28-405B-9289-B9DBEB55F074}.FDroid|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
|
||||
{1F78403F-9A28-405B-9289-B9DBEB55F074}.FDroid|x64.ActiveCfg = Release|iPhoneSimulator
|
||||
{1F78403F-9A28-405B-9289-B9DBEB55F074}.FDroid|x64.Build.0 = Release|iPhoneSimulator
|
||||
{1F78403F-9A28-405B-9289-B9DBEB55F074}.FDroid|x86.ActiveCfg = Release|iPhoneSimulator
|
||||
{1F78403F-9A28-405B-9289-B9DBEB55F074}.FDroid|x86.Build.0 = Release|iPhoneSimulator
|
||||
{1F78403F-9A28-405B-9289-B9DBEB55F074}.Release|Any CPU.ActiveCfg = Release|iPhone
|
||||
{1F78403F-9A28-405B-9289-B9DBEB55F074}.Release|ARM.ActiveCfg = Release|iPhone
|
||||
{1F78403F-9A28-405B-9289-B9DBEB55F074}.Release|iPhone.ActiveCfg = Release|iPhone
|
||||
@@ -147,54 +187,6 @@ Global
|
||||
{1F78403F-9A28-405B-9289-B9DBEB55F074}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
|
||||
{1F78403F-9A28-405B-9289-B9DBEB55F074}.Release|x64.ActiveCfg = Release|iPhone
|
||||
{1F78403F-9A28-405B-9289-B9DBEB55F074}.Release|x86.ActiveCfg = Release|iPhone
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.Ad-Hoc|ARM.Build.0 = Release|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.Ad-Hoc|x64.Build.0 = Release|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.Ad-Hoc|x86.Build.0 = Release|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.AppStore|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.AppStore|Any CPU.Build.0 = Release|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.AppStore|ARM.ActiveCfg = Release|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.AppStore|ARM.Build.0 = Release|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.AppStore|iPhone.ActiveCfg = Release|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.AppStore|iPhone.Build.0 = Release|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.AppStore|x64.ActiveCfg = Release|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.AppStore|x64.Build.0 = Release|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.AppStore|x86.ActiveCfg = Release|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.AppStore|x86.Build.0 = Release|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.Release|x64.Build.0 = Release|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E}.Release|x86.Build.0 = Release|Any CPU
|
||||
{A300DCE1-8D10-4267-B96A-CB01AEB7C220}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A300DCE1-8D10-4267-B96A-CB01AEB7C220}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU
|
||||
{A300DCE1-8D10-4267-B96A-CB01AEB7C220}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU
|
||||
@@ -222,9 +214,20 @@ Global
|
||||
{A300DCE1-8D10-4267-B96A-CB01AEB7C220}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{A300DCE1-8D10-4267-B96A-CB01AEB7C220}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{A300DCE1-8D10-4267-B96A-CB01AEB7C220}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{A300DCE1-8D10-4267-B96A-CB01AEB7C220}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{A300DCE1-8D10-4267-B96A-CB01AEB7C220}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{A300DCE1-8D10-4267-B96A-CB01AEB7C220}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{A300DCE1-8D10-4267-B96A-CB01AEB7C220}.FDroid|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A300DCE1-8D10-4267-B96A-CB01AEB7C220}.FDroid|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A300DCE1-8D10-4267-B96A-CB01AEB7C220}.FDroid|ARM.ActiveCfg = Debug|Any CPU
|
||||
{A300DCE1-8D10-4267-B96A-CB01AEB7C220}.FDroid|ARM.Build.0 = Debug|Any CPU
|
||||
{A300DCE1-8D10-4267-B96A-CB01AEB7C220}.FDroid|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{A300DCE1-8D10-4267-B96A-CB01AEB7C220}.FDroid|iPhone.Build.0 = Debug|Any CPU
|
||||
{A300DCE1-8D10-4267-B96A-CB01AEB7C220}.FDroid|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{A300DCE1-8D10-4267-B96A-CB01AEB7C220}.FDroid|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{A300DCE1-8D10-4267-B96A-CB01AEB7C220}.FDroid|x64.ActiveCfg = Debug|Any CPU
|
||||
{A300DCE1-8D10-4267-B96A-CB01AEB7C220}.FDroid|x64.Build.0 = Debug|Any CPU
|
||||
{A300DCE1-8D10-4267-B96A-CB01AEB7C220}.FDroid|x86.ActiveCfg = Debug|Any CPU
|
||||
{A300DCE1-8D10-4267-B96A-CB01AEB7C220}.FDroid|x86.Build.0 = Debug|Any CPU
|
||||
{A300DCE1-8D10-4267-B96A-CB01AEB7C220}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A300DCE1-8D10-4267-B96A-CB01AEB7C220}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A300DCE1-8D10-4267-B96A-CB01AEB7C220}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
@@ -258,9 +261,20 @@ Global
|
||||
{32F5A2D6-F54D-4DA1-AE26-0A980D48F422}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
|
||||
{32F5A2D6-F54D-4DA1-AE26-0A980D48F422}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
|
||||
{32F5A2D6-F54D-4DA1-AE26-0A980D48F422}.Debug|x64.ActiveCfg = Debug|iPhone
|
||||
{32F5A2D6-F54D-4DA1-AE26-0A980D48F422}.Debug|x64.Build.0 = Debug|iPhone
|
||||
{32F5A2D6-F54D-4DA1-AE26-0A980D48F422}.Debug|x86.ActiveCfg = Debug|iPhone
|
||||
{32F5A2D6-F54D-4DA1-AE26-0A980D48F422}.Debug|x86.Build.0 = Debug|iPhone
|
||||
{32F5A2D6-F54D-4DA1-AE26-0A980D48F422}.FDroid|Any CPU.ActiveCfg = Release|iPhoneSimulator
|
||||
{32F5A2D6-F54D-4DA1-AE26-0A980D48F422}.FDroid|Any CPU.Build.0 = Release|iPhoneSimulator
|
||||
{32F5A2D6-F54D-4DA1-AE26-0A980D48F422}.FDroid|ARM.ActiveCfg = Release|iPhoneSimulator
|
||||
{32F5A2D6-F54D-4DA1-AE26-0A980D48F422}.FDroid|ARM.Build.0 = Release|iPhoneSimulator
|
||||
{32F5A2D6-F54D-4DA1-AE26-0A980D48F422}.FDroid|iPhone.ActiveCfg = Release|iPhone
|
||||
{32F5A2D6-F54D-4DA1-AE26-0A980D48F422}.FDroid|iPhone.Build.0 = Release|iPhone
|
||||
{32F5A2D6-F54D-4DA1-AE26-0A980D48F422}.FDroid|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
|
||||
{32F5A2D6-F54D-4DA1-AE26-0A980D48F422}.FDroid|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
|
||||
{32F5A2D6-F54D-4DA1-AE26-0A980D48F422}.FDroid|x64.ActiveCfg = Release|iPhoneSimulator
|
||||
{32F5A2D6-F54D-4DA1-AE26-0A980D48F422}.FDroid|x64.Build.0 = Release|iPhoneSimulator
|
||||
{32F5A2D6-F54D-4DA1-AE26-0A980D48F422}.FDroid|x86.ActiveCfg = Release|iPhoneSimulator
|
||||
{32F5A2D6-F54D-4DA1-AE26-0A980D48F422}.FDroid|x86.Build.0 = Release|iPhoneSimulator
|
||||
{32F5A2D6-F54D-4DA1-AE26-0A980D48F422}.Release|Any CPU.ActiveCfg = Release|iPhone
|
||||
{32F5A2D6-F54D-4DA1-AE26-0A980D48F422}.Release|ARM.ActiveCfg = Release|iPhone
|
||||
{32F5A2D6-F54D-4DA1-AE26-0A980D48F422}.Release|iPhone.ActiveCfg = Release|iPhone
|
||||
@@ -300,9 +314,20 @@ Global
|
||||
{B2538ADA-B605-4D6F-ACD2-62A409680F84}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{B2538ADA-B605-4D6F-ACD2-62A409680F84}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{B2538ADA-B605-4D6F-ACD2-62A409680F84}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{B2538ADA-B605-4D6F-ACD2-62A409680F84}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{B2538ADA-B605-4D6F-ACD2-62A409680F84}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{B2538ADA-B605-4D6F-ACD2-62A409680F84}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{B2538ADA-B605-4D6F-ACD2-62A409680F84}.FDroid|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B2538ADA-B605-4D6F-ACD2-62A409680F84}.FDroid|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B2538ADA-B605-4D6F-ACD2-62A409680F84}.FDroid|ARM.ActiveCfg = Debug|Any CPU
|
||||
{B2538ADA-B605-4D6F-ACD2-62A409680F84}.FDroid|ARM.Build.0 = Debug|Any CPU
|
||||
{B2538ADA-B605-4D6F-ACD2-62A409680F84}.FDroid|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{B2538ADA-B605-4D6F-ACD2-62A409680F84}.FDroid|iPhone.Build.0 = Debug|Any CPU
|
||||
{B2538ADA-B605-4D6F-ACD2-62A409680F84}.FDroid|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{B2538ADA-B605-4D6F-ACD2-62A409680F84}.FDroid|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{B2538ADA-B605-4D6F-ACD2-62A409680F84}.FDroid|x64.ActiveCfg = Debug|Any CPU
|
||||
{B2538ADA-B605-4D6F-ACD2-62A409680F84}.FDroid|x64.Build.0 = Debug|Any CPU
|
||||
{B2538ADA-B605-4D6F-ACD2-62A409680F84}.FDroid|x86.ActiveCfg = Debug|Any CPU
|
||||
{B2538ADA-B605-4D6F-ACD2-62A409680F84}.FDroid|x86.Build.0 = Debug|Any CPU
|
||||
{B2538ADA-B605-4D6F-ACD2-62A409680F84}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B2538ADA-B605-4D6F-ACD2-62A409680F84}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{B2538ADA-B605-4D6F-ACD2-62A409680F84}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
@@ -313,158 +338,170 @@ Global
|
||||
{B2538ADA-B605-4D6F-ACD2-62A409680F84}.Release|x64.Build.0 = Release|Any CPU
|
||||
{B2538ADA-B605-4D6F-ACD2-62A409680F84}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{B2538ADA-B605-4D6F-ACD2-62A409680F84}.Release|x86.Build.0 = Release|Any CPU
|
||||
{6702027A-F726-4149-863E-7CB924674B9A}.Ad-Hoc|Any CPU.ActiveCfg = Ad-Hoc|iPhone
|
||||
{6702027A-F726-4149-863E-7CB924674B9A}.Ad-Hoc|ARM.ActiveCfg = Ad-Hoc|iPhone
|
||||
{6702027A-F726-4149-863E-7CB924674B9A}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone
|
||||
{6702027A-F726-4149-863E-7CB924674B9A}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone
|
||||
{6702027A-F726-4149-863E-7CB924674B9A}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Ad-Hoc|iPhoneSimulator
|
||||
{6702027A-F726-4149-863E-7CB924674B9A}.Ad-Hoc|iPhoneSimulator.Build.0 = Ad-Hoc|iPhoneSimulator
|
||||
{6702027A-F726-4149-863E-7CB924674B9A}.Ad-Hoc|x64.ActiveCfg = Ad-Hoc|iPhone
|
||||
{6702027A-F726-4149-863E-7CB924674B9A}.Ad-Hoc|x86.ActiveCfg = Ad-Hoc|iPhone
|
||||
{6702027A-F726-4149-863E-7CB924674B9A}.AppStore|Any CPU.ActiveCfg = AppStore|iPhone
|
||||
{6702027A-F726-4149-863E-7CB924674B9A}.AppStore|ARM.ActiveCfg = AppStore|iPhone
|
||||
{6702027A-F726-4149-863E-7CB924674B9A}.AppStore|iPhone.ActiveCfg = AppStore|iPhone
|
||||
{6702027A-F726-4149-863E-7CB924674B9A}.AppStore|iPhone.Build.0 = AppStore|iPhone
|
||||
{6702027A-F726-4149-863E-7CB924674B9A}.AppStore|iPhoneSimulator.ActiveCfg = AppStore|iPhoneSimulator
|
||||
{6702027A-F726-4149-863E-7CB924674B9A}.AppStore|iPhoneSimulator.Build.0 = AppStore|iPhoneSimulator
|
||||
{6702027A-F726-4149-863E-7CB924674B9A}.AppStore|x64.ActiveCfg = AppStore|iPhone
|
||||
{6702027A-F726-4149-863E-7CB924674B9A}.AppStore|x86.ActiveCfg = AppStore|iPhone
|
||||
{6702027A-F726-4149-863E-7CB924674B9A}.Debug|Any CPU.ActiveCfg = Debug|iPhone
|
||||
{6702027A-F726-4149-863E-7CB924674B9A}.Debug|ARM.ActiveCfg = Debug|iPhone
|
||||
{6702027A-F726-4149-863E-7CB924674B9A}.Debug|iPhone.ActiveCfg = Debug|iPhone
|
||||
{6702027A-F726-4149-863E-7CB924674B9A}.Debug|iPhone.Build.0 = Debug|iPhone
|
||||
{6702027A-F726-4149-863E-7CB924674B9A}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
|
||||
{6702027A-F726-4149-863E-7CB924674B9A}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
|
||||
{6702027A-F726-4149-863E-7CB924674B9A}.Debug|x64.ActiveCfg = Debug|iPhone
|
||||
{6702027A-F726-4149-863E-7CB924674B9A}.Debug|x86.ActiveCfg = Debug|iPhone
|
||||
{6702027A-F726-4149-863E-7CB924674B9A}.Release|Any CPU.ActiveCfg = Release|iPhone
|
||||
{6702027A-F726-4149-863E-7CB924674B9A}.Release|ARM.ActiveCfg = Release|iPhone
|
||||
{6702027A-F726-4149-863E-7CB924674B9A}.Release|iPhone.ActiveCfg = Release|iPhone
|
||||
{6702027A-F726-4149-863E-7CB924674B9A}.Release|iPhone.Build.0 = Release|iPhone
|
||||
{6702027A-F726-4149-863E-7CB924674B9A}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
|
||||
{6702027A-F726-4149-863E-7CB924674B9A}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
|
||||
{6702027A-F726-4149-863E-7CB924674B9A}.Release|x64.ActiveCfg = Release|iPhone
|
||||
{6702027A-F726-4149-863E-7CB924674B9A}.Release|x86.ActiveCfg = Release|iPhone
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Ad-Hoc|Any CPU.Deploy.0 = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Ad-Hoc|ARM.Build.0 = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Ad-Hoc|ARM.Deploy.0 = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Ad-Hoc|iPhone.Deploy.0 = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Ad-Hoc|iPhoneSimulator.Deploy.0 = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Ad-Hoc|x64.Build.0 = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Ad-Hoc|x64.Deploy.0 = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Ad-Hoc|x86.Build.0 = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Ad-Hoc|x86.Deploy.0 = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.AppStore|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.AppStore|Any CPU.Build.0 = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.AppStore|Any CPU.Deploy.0 = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.AppStore|ARM.ActiveCfg = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.AppStore|ARM.Build.0 = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.AppStore|ARM.Deploy.0 = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.AppStore|iPhone.ActiveCfg = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.AppStore|iPhone.Build.0 = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.AppStore|iPhone.Deploy.0 = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.AppStore|iPhoneSimulator.Deploy.0 = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.AppStore|x64.ActiveCfg = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.AppStore|x64.Build.0 = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.AppStore|x64.Deploy.0 = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.AppStore|x86.ActiveCfg = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.AppStore|x86.Build.0 = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.AppStore|x86.Deploy.0 = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Debug|ARM.Deploy.0 = Debug|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Debug|iPhone.Deploy.0 = Debug|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Debug|x64.Deploy.0 = Debug|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Debug|x86.Deploy.0 = Debug|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Release|Any CPU.Deploy.0 = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Release|ARM.Deploy.0 = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Release|iPhone.Deploy.0 = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Release|x64.Build.0 = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Release|x64.Deploy.0 = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Release|x86.Build.0 = Release|Any CPU
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE}.Release|x86.Deploy.0 = Release|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.Ad-Hoc|ARM.Build.0 = Release|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.Ad-Hoc|x64.Build.0 = Release|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.Ad-Hoc|x86.Build.0 = Release|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.AppStore|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.AppStore|Any CPU.Build.0 = Release|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.AppStore|ARM.ActiveCfg = Release|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.AppStore|ARM.Build.0 = Release|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.AppStore|iPhone.ActiveCfg = Release|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.AppStore|iPhone.Build.0 = Release|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.AppStore|x64.ActiveCfg = Release|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.AppStore|x64.Build.0 = Release|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.AppStore|x86.ActiveCfg = Release|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.AppStore|x86.Build.0 = Release|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.Release|x64.Build.0 = Release|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640}.Release|x86.Build.0 = Release|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.AppStore|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.AppStore|ARM.ActiveCfg = Debug|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.AppStore|ARM.Build.0 = Debug|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.AppStore|iPhone.Build.0 = Debug|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.AppStore|x64.ActiveCfg = Debug|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.AppStore|x64.Build.0 = Debug|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.AppStore|x86.ActiveCfg = Debug|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.AppStore|x86.Build.0 = Debug|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.FDroid|Any CPU.ActiveCfg = FDroid|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.FDroid|Any CPU.Build.0 = FDroid|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.FDroid|ARM.ActiveCfg = FDroid|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.FDroid|ARM.Build.0 = FDroid|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.FDroid|iPhone.ActiveCfg = FDroid|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.FDroid|iPhone.Build.0 = FDroid|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.FDroid|iPhoneSimulator.ActiveCfg = FDroid|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.FDroid|iPhoneSimulator.Build.0 = FDroid|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.FDroid|x64.ActiveCfg = FDroid|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.FDroid|x64.Build.0 = FDroid|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.FDroid|x86.ActiveCfg = FDroid|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.FDroid|x86.Build.0 = FDroid|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.Release|x64.Build.0 = Release|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{8A279EE4-4537-4656-9C93-44945E594556}.Release|x86.Build.0 = Release|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.AppStore|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.AppStore|ARM.ActiveCfg = Debug|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.AppStore|ARM.Build.0 = Debug|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.AppStore|iPhone.Build.0 = Debug|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.AppStore|x64.ActiveCfg = Debug|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.AppStore|x64.Build.0 = Debug|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.AppStore|x86.ActiveCfg = Debug|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.AppStore|x86.Build.0 = Debug|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.FDroid|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.FDroid|Any CPU.Build.0 = Release|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.FDroid|ARM.ActiveCfg = Release|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.FDroid|ARM.Build.0 = Release|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.FDroid|iPhone.ActiveCfg = Release|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.FDroid|iPhone.Build.0 = Release|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.FDroid|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.FDroid|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.FDroid|x64.ActiveCfg = Release|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.FDroid|x64.Build.0 = Release|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.FDroid|x86.ActiveCfg = Release|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.FDroid|x86.Build.0 = Release|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.Release|x64.Build.0 = Release|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B}.Release|x86.Build.0 = Release|Any CPU
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.Ad-Hoc|Any CPU.ActiveCfg = Ad-Hoc|iPhone
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.Ad-Hoc|ARM.ActiveCfg = Ad-Hoc|iPhone
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Ad-Hoc|iPhoneSimulator
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.Ad-Hoc|iPhoneSimulator.Build.0 = Ad-Hoc|iPhoneSimulator
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.Ad-Hoc|x64.ActiveCfg = Ad-Hoc|iPhone
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.Ad-Hoc|x86.ActiveCfg = Ad-Hoc|iPhone
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.AppStore|Any CPU.ActiveCfg = AppStore|iPhone
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.AppStore|ARM.ActiveCfg = AppStore|iPhone
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.AppStore|iPhone.ActiveCfg = AppStore|iPhone
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.AppStore|iPhone.Build.0 = AppStore|iPhone
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.AppStore|iPhoneSimulator.ActiveCfg = AppStore|iPhoneSimulator
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.AppStore|iPhoneSimulator.Build.0 = AppStore|iPhoneSimulator
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.AppStore|x64.ActiveCfg = AppStore|iPhone
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.AppStore|x86.ActiveCfg = AppStore|iPhone
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.Debug|Any CPU.ActiveCfg = Debug|iPhone
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.Debug|ARM.ActiveCfg = Debug|iPhone
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.Debug|iPhone.ActiveCfg = Debug|iPhone
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.Debug|iPhone.Build.0 = Debug|iPhone
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.Debug|x64.ActiveCfg = Debug|iPhone
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.Debug|x86.ActiveCfg = Debug|iPhone
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.FDroid|Any CPU.ActiveCfg = AppStore|iPhone
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.FDroid|Any CPU.Build.0 = AppStore|iPhone
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.FDroid|ARM.ActiveCfg = AppStore|iPhone
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.FDroid|ARM.Build.0 = AppStore|iPhone
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.FDroid|iPhone.ActiveCfg = AppStore|iPhone
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.FDroid|iPhone.Build.0 = AppStore|iPhone
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.FDroid|iPhoneSimulator.ActiveCfg = AppStore|iPhoneSimulator
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.FDroid|iPhoneSimulator.Build.0 = AppStore|iPhoneSimulator
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.FDroid|x64.ActiveCfg = AppStore|iPhone
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.FDroid|x64.Build.0 = AppStore|iPhone
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.FDroid|x86.ActiveCfg = AppStore|iPhone
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.FDroid|x86.Build.0 = AppStore|iPhone
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.Release|Any CPU.ActiveCfg = Release|iPhone
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.Release|ARM.ActiveCfg = Release|iPhone
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.Release|iPhone.ActiveCfg = Release|iPhone
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.Release|iPhone.Build.0 = Release|iPhone
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.Release|x64.ActiveCfg = Release|iPhone
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F}.Release|x86.ActiveCfg = Release|iPhone
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -472,13 +509,15 @@ Global
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{04B18ED2-B76D-4947-8474-191F8FD2B5E0} = {EC730FD9-F623-4B6C-B503-95CDCFBCF277}
|
||||
{1F78403F-9A28-405B-9289-B9DBEB55F074} = {EC730FD9-F623-4B6C-B503-95CDCFBCF277}
|
||||
{B490C5DA-639E-4994-ABD2-54222B8A348E} = {EC730FD9-F623-4B6C-B503-95CDCFBCF277}
|
||||
{A300DCE1-8D10-4267-B96A-CB01AEB7C220} = {0D790714-ECF8-4A83-BE4A-E9C84DD1BB5D}
|
||||
{32F5A2D6-F54D-4DA1-AE26-0A980D48F422} = {EC730FD9-F623-4B6C-B503-95CDCFBCF277}
|
||||
{B2538ADA-B605-4D6F-ACD2-62A409680F84} = {EC730FD9-F623-4B6C-B503-95CDCFBCF277}
|
||||
{6702027A-F726-4149-863E-7CB924674B9A} = {0D790714-ECF8-4A83-BE4A-E9C84DD1BB5D}
|
||||
{FA507A17-D4E3-46DF-ACD8-D7E6D7D4E3AE} = {0D790714-ECF8-4A83-BE4A-E9C84DD1BB5D}
|
||||
{2E399654-26A2-46F6-B9CA-1B496A3F370A} = {92470CBD-9047-4C3C-8EA3-D972D6622D84}
|
||||
{428CACAB-CC26-4F41-9062-1E4A9BC82640} = {2E399654-26A2-46F6-B9CA-1B496A3F370A}
|
||||
{8A279EE4-4537-4656-9C93-44945E594556} = {EC730FD9-F623-4B6C-B503-95CDCFBCF277}
|
||||
{D5D91152-CB01-4F24-A503-304D3A94408B} = {2E399654-26A2-46F6-B9CA-1B496A3F370A}
|
||||
{C2B7ADCA-5964-43C5-A7C8-D3B6F8023F4F} = {EC730FD9-F623-4B6C-B503-95CDCFBCF277}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {318CB2DF-0118-43A3-AC83-56BADCF71CCD}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
28
crowdin.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
files:
|
||||
- source: /src/App/Resources/AppResources.resx
|
||||
translation: /src/App/Resources/AppResources.%two_letters_code%.resx
|
||||
update_option: update_as_unapproved
|
||||
languages_mapping:
|
||||
two_letters_code:
|
||||
zh-CN: zh-Hans
|
||||
zh-TW: zh-Hant
|
||||
pt-PT: pt-PT
|
||||
pt-BR: pt-BR
|
||||
- source: /store/apple/en/copy.resx
|
||||
translation: /store/apple/%two_letters_code%/copy.resx
|
||||
update_option: update_as_unapproved
|
||||
languages_mapping:
|
||||
two_letters_code:
|
||||
zh-CN: zh-Hans
|
||||
zh-TW: zh-Hant
|
||||
pt-PT: pt-PT
|
||||
pt-BR: pt-BR
|
||||
- source: /store/google/en/copy.resx
|
||||
translation: /store/google/%two_letters_code%/copy.resx
|
||||
update_option: update_as_unapproved
|
||||
languages_mapping:
|
||||
two_letters_code:
|
||||
zh-CN: zh-Hans
|
||||
zh-TW: zh-Hant
|
||||
pt-BR: pt-BR
|
||||
pt-PT: pt-PT
|
||||
176
src/Android/Autofill/AutofillHelpers.cs
Normal file
@@ -0,0 +1,176 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Android.Content;
|
||||
using Android.Service.Autofill;
|
||||
using Android.Widget;
|
||||
using System.Linq;
|
||||
using Android.App;
|
||||
using Bit.App.Abstractions;
|
||||
using System.Threading.Tasks;
|
||||
using Bit.App.Resources;
|
||||
using Bit.App.Enums;
|
||||
using Android.Views.Autofill;
|
||||
|
||||
namespace Bit.Android.Autofill
|
||||
{
|
||||
public static class AutofillHelpers
|
||||
{
|
||||
private static int _pendingIntentId = 0;
|
||||
|
||||
// These browser work natively with the autofill framework
|
||||
public static HashSet<string> TrustedBrowsers = new HashSet<string>
|
||||
{
|
||||
"org.mozilla.focus","org.mozilla.klar","com.duckduckgo.mobile.android"
|
||||
};
|
||||
|
||||
// These browsers work using the compatibility shim for the autofill framework
|
||||
public static HashSet<string> CompatBrowsers = new HashSet<string>
|
||||
{
|
||||
"org.mozilla.firefox","org.mozilla.firefox_beta","com.microsoft.emmx","com.android.chrome",
|
||||
"com.chrome.beta","com.android.browser","com.brave.browser","com.opera.browser",
|
||||
"com.opera.browser.beta","com.opera.mini.native","com.chrome.dev","com.chrome.canary",
|
||||
"com.google.android.apps.chrome","com.google.android.apps.chrome_dev","com.yandex.browser",
|
||||
"com.sec.android.app.sbrowser","com.sec.android.app.sbrowser.beta","org.codeaurora.swe.browser",
|
||||
"com.amazon.cloud9","mark.via.gp","org.bromite.bromite","org.chromium.chrome","com.kiwibrowser.browser",
|
||||
"com.ecosia.android", "com.opera.mini.native.beta","org.mozilla.fennec_aurora"
|
||||
};
|
||||
|
||||
public static async Task<List<FilledItem>> GetFillItemsAsync(Parser parser, ICipherService service)
|
||||
{
|
||||
var items = new List<FilledItem>();
|
||||
|
||||
if(parser.FieldCollection.FillableForLogin)
|
||||
{
|
||||
var ciphers = await service.GetAllAsync(parser.Uri);
|
||||
if(ciphers.Item1.Any() || ciphers.Item2.Any())
|
||||
{
|
||||
var allCiphers = ciphers.Item1.ToList();
|
||||
allCiphers.AddRange(ciphers.Item2.ToList());
|
||||
foreach(var cipher in allCiphers)
|
||||
{
|
||||
items.Add(new FilledItem(cipher));
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(parser.FieldCollection.FillableForCard)
|
||||
{
|
||||
var ciphers = await service.GetAllAsync();
|
||||
foreach(var cipher in ciphers.Where(c => c.Type == CipherType.Card))
|
||||
{
|
||||
items.Add(new FilledItem(cipher));
|
||||
}
|
||||
}
|
||||
|
||||
return items;
|
||||
}
|
||||
|
||||
public static FillResponse BuildFillResponse(Context context, Parser parser, List<FilledItem> items, bool locked)
|
||||
{
|
||||
var responseBuilder = new FillResponse.Builder();
|
||||
if(items != null && items.Count > 0)
|
||||
{
|
||||
foreach(var item in items)
|
||||
{
|
||||
var dataset = BuildDataset(context, parser.FieldCollection, item);
|
||||
if(dataset != null)
|
||||
{
|
||||
responseBuilder.AddDataset(dataset);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
responseBuilder.AddDataset(BuildVaultDataset(context, parser.FieldCollection, parser.Uri, locked));
|
||||
AddSaveInfo(parser, responseBuilder, parser.FieldCollection);
|
||||
responseBuilder.SetIgnoredIds(parser.FieldCollection.IgnoreAutofillIds.ToArray());
|
||||
return responseBuilder.Build();
|
||||
}
|
||||
|
||||
public static Dataset BuildDataset(Context context, FieldCollection fields, FilledItem filledItem)
|
||||
{
|
||||
var datasetBuilder = new Dataset.Builder(
|
||||
BuildListView(context.PackageName, filledItem.Name, filledItem.Subtitle, filledItem.Icon));
|
||||
if(filledItem.ApplyToFields(fields, datasetBuilder))
|
||||
{
|
||||
return datasetBuilder.Build();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static Dataset BuildVaultDataset(Context context, FieldCollection fields, string uri, bool locked)
|
||||
{
|
||||
var intent = new Intent(context, typeof(MainActivity));
|
||||
intent.PutExtra("autofillFramework", true);
|
||||
if(fields.FillableForLogin)
|
||||
{
|
||||
intent.PutExtra("autofillFrameworkFillType", (int)CipherType.Login);
|
||||
}
|
||||
else if(fields.FillableForCard)
|
||||
{
|
||||
intent.PutExtra("autofillFrameworkFillType", (int)CipherType.Card);
|
||||
}
|
||||
else if(fields.FillableForIdentity)
|
||||
{
|
||||
intent.PutExtra("autofillFrameworkFillType", (int)CipherType.Identity);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
intent.PutExtra("autofillFrameworkUri", uri);
|
||||
var pendingIntent = PendingIntent.GetActivity(context, ++_pendingIntentId, intent,
|
||||
PendingIntentFlags.CancelCurrent);
|
||||
|
||||
var view = BuildListView(context.PackageName, AppResources.AutofillWithBitwarden,
|
||||
locked ? AppResources.VaultIsLocked : AppResources.GoToMyVault, Resource.Drawable.icon);
|
||||
|
||||
var datasetBuilder = new Dataset.Builder(view);
|
||||
datasetBuilder.SetAuthentication(pendingIntent.IntentSender);
|
||||
|
||||
// Dataset must have a value set. We will reset this in the main activity when the real item is chosen.
|
||||
foreach(var autofillId in fields.AutofillIds)
|
||||
{
|
||||
datasetBuilder.SetValue(autofillId, AutofillValue.ForText("PLACEHOLDER"));
|
||||
}
|
||||
|
||||
return datasetBuilder.Build();
|
||||
}
|
||||
|
||||
public static RemoteViews BuildListView(string packageName, string text, string subtext, int iconId)
|
||||
{
|
||||
var view = new RemoteViews(packageName, Resource.Layout.autofill_listitem);
|
||||
view.SetTextViewText(Resource.Id.text, text);
|
||||
view.SetTextViewText(Resource.Id.text2, subtext);
|
||||
view.SetImageViewResource(Resource.Id.icon, iconId);
|
||||
return view;
|
||||
}
|
||||
|
||||
public static void AddSaveInfo(Parser parser, FillResponse.Builder responseBuilder, FieldCollection fields)
|
||||
{
|
||||
// Docs state that password fields cannot be reliably saved in Compat mode since they will show as
|
||||
// masked values.
|
||||
var compatBrowser = CompatBrowsers.Contains(parser.PackageName);
|
||||
if(compatBrowser && fields.SaveType == SaveDataType.Password)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var requiredIds = fields.GetRequiredSaveFields();
|
||||
if(fields.SaveType == SaveDataType.Generic || requiredIds.Length == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var saveBuilder = new SaveInfo.Builder(fields.SaveType, requiredIds);
|
||||
var optionalIds = fields.GetOptionalSaveIds();
|
||||
if(optionalIds.Length > 0)
|
||||
{
|
||||
saveBuilder.SetOptionalIds(optionalIds);
|
||||
}
|
||||
if(compatBrowser)
|
||||
{
|
||||
saveBuilder.SetFlags(SaveFlags.SaveOnAllViewsInvisible);
|
||||
}
|
||||
responseBuilder.SetSaveInfo(saveBuilder.Build());
|
||||
}
|
||||
}
|
||||
}
|
||||
113
src/Android/Autofill/AutofillService.cs
Normal file
@@ -0,0 +1,113 @@
|
||||
using Android;
|
||||
using Android.App;
|
||||
using Android.Content;
|
||||
using Android.OS;
|
||||
using Android.Runtime;
|
||||
using Android.Service.Autofill;
|
||||
using Android.Widget;
|
||||
using Bit.App;
|
||||
using Bit.App.Abstractions;
|
||||
using Bit.App.Enums;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using XLabs.Ioc;
|
||||
|
||||
namespace Bit.Android.Autofill
|
||||
{
|
||||
[Service(Permission = Manifest.Permission.BindAutofillService, Label = "Bitwarden")]
|
||||
[IntentFilter(new string[] { "android.service.autofill.AutofillService" })]
|
||||
[MetaData("android.autofill", Resource = "@xml/autofillservice")]
|
||||
[Register("com.x8bit.bitwarden.Autofill.AutofillService")]
|
||||
public class AutofillService : global::Android.Service.Autofill.AutofillService
|
||||
{
|
||||
private ICipherService _cipherService;
|
||||
private ILockService _lockService;
|
||||
|
||||
public async override void OnFillRequest(FillRequest request, CancellationSignal cancellationSignal, FillCallback callback)
|
||||
{
|
||||
var structure = request.FillContexts?.LastOrDefault()?.Structure;
|
||||
if(structure == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var parser = new Parser(structure);
|
||||
parser.Parse();
|
||||
|
||||
if(string.IsNullOrWhiteSpace(parser.Uri) || parser.Uri == "androidapp://com.x8bit.bitwarden" ||
|
||||
parser.Uri == "androidapp://android" || !parser.FieldCollection.Fillable)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(_lockService == null)
|
||||
{
|
||||
_lockService = Resolver.Resolve<ILockService>();
|
||||
}
|
||||
|
||||
List<FilledItem> items = null;
|
||||
var locked = (await _lockService.GetLockTypeAsync(false)) != LockType.None;
|
||||
if(!locked)
|
||||
{
|
||||
if(_cipherService == null)
|
||||
{
|
||||
_cipherService = Resolver.Resolve<ICipherService>();
|
||||
}
|
||||
|
||||
items = await AutofillHelpers.GetFillItemsAsync(parser, _cipherService);
|
||||
}
|
||||
|
||||
// build response
|
||||
var response = AutofillHelpers.BuildFillResponse(this, parser, items, locked);
|
||||
callback.OnSuccess(response);
|
||||
}
|
||||
|
||||
public override void OnSaveRequest(SaveRequest request, SaveCallback callback)
|
||||
{
|
||||
var structure = request.FillContexts?.LastOrDefault()?.Structure;
|
||||
if(structure == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var parser = new Parser(structure);
|
||||
parser.Parse();
|
||||
|
||||
var savedItem = parser.FieldCollection.GetSavedItem();
|
||||
if(savedItem == null)
|
||||
{
|
||||
Toast.MakeText(this, "Unable to save this form.", ToastLength.Short).Show();
|
||||
return;
|
||||
}
|
||||
|
||||
var intent = new Intent(this, typeof(MainActivity));
|
||||
intent.SetFlags(ActivityFlags.NewTask | ActivityFlags.ClearTop);
|
||||
intent.PutExtra("autofillFramework", true);
|
||||
intent.PutExtra("autofillFrameworkSave", true);
|
||||
intent.PutExtra("autofillFrameworkType", (int)savedItem.Type);
|
||||
switch(savedItem.Type)
|
||||
{
|
||||
case CipherType.Login:
|
||||
intent.PutExtra("autofillFrameworkName", parser.Uri
|
||||
.Replace(Constants.AndroidAppProtocol, string.Empty)
|
||||
.Replace("https://", string.Empty)
|
||||
.Replace("http://", string.Empty));
|
||||
intent.PutExtra("autofillFrameworkUri", parser.Uri);
|
||||
intent.PutExtra("autofillFrameworkUsername", savedItem.Login.Username);
|
||||
intent.PutExtra("autofillFrameworkPassword", savedItem.Login.Password);
|
||||
break;
|
||||
case CipherType.Card:
|
||||
intent.PutExtra("autofillFrameworkCardName", savedItem.Card.Name);
|
||||
intent.PutExtra("autofillFrameworkCardNumber", savedItem.Card.Number);
|
||||
intent.PutExtra("autofillFrameworkCardExpMonth", savedItem.Card.ExpMonth);
|
||||
intent.PutExtra("autofillFrameworkCardExpYear", savedItem.Card.ExpYear);
|
||||
intent.PutExtra("autofillFrameworkCardCode", savedItem.Card.Code);
|
||||
break;
|
||||
default:
|
||||
Toast.MakeText(this, "Unable to save this type of form.", ToastLength.Short).Show();
|
||||
return;
|
||||
}
|
||||
StartActivity(intent);
|
||||
}
|
||||
}
|
||||
}
|
||||
199
src/Android/Autofill/Field.cs
Normal file
@@ -0,0 +1,199 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Android.Service.Autofill;
|
||||
using Android.Views;
|
||||
using Android.Views.Autofill;
|
||||
using static Android.App.Assist.AssistStructure;
|
||||
using Android.Text;
|
||||
using static Android.Views.ViewStructure;
|
||||
|
||||
namespace Bit.Android.Autofill
|
||||
{
|
||||
public class Field
|
||||
{
|
||||
private List<string> _hints;
|
||||
|
||||
public Field(ViewNode node)
|
||||
{
|
||||
Id = node.Id;
|
||||
TrackingId = $"{node.Id}_{node.GetHashCode()}";
|
||||
IdEntry = node.IdEntry;
|
||||
AutofillId = node.AutofillId;
|
||||
AutofillType = node.AutofillType;
|
||||
InputType = node.InputType;
|
||||
Focused = node.IsFocused;
|
||||
Selected = node.IsSelected;
|
||||
Clickable = node.IsClickable;
|
||||
Visible = node.Visibility == ViewStates.Visible;
|
||||
Hints = FilterForSupportedHints(node.GetAutofillHints());
|
||||
Hint = node.Hint;
|
||||
AutofillOptions = node.GetAutofillOptions()?.ToList();
|
||||
HtmlInfo = node.HtmlInfo;
|
||||
Node = node;
|
||||
|
||||
if(node.AutofillValue != null)
|
||||
{
|
||||
if(node.AutofillValue.IsList)
|
||||
{
|
||||
var autofillOptions = node.GetAutofillOptions();
|
||||
if(autofillOptions != null && autofillOptions.Length > 0)
|
||||
{
|
||||
ListValue = node.AutofillValue.ListValue;
|
||||
TextValue = autofillOptions[node.AutofillValue.ListValue];
|
||||
}
|
||||
}
|
||||
else if(node.AutofillValue.IsDate)
|
||||
{
|
||||
DateValue = node.AutofillValue.DateValue;
|
||||
}
|
||||
else if(node.AutofillValue.IsText)
|
||||
{
|
||||
TextValue = node.AutofillValue.TextValue;
|
||||
}
|
||||
else if(node.AutofillValue.IsToggle)
|
||||
{
|
||||
ToggleValue = node.AutofillValue.ToggleValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public SaveDataType SaveType { get; set; } = SaveDataType.Generic;
|
||||
public List<string> Hints
|
||||
{
|
||||
get => _hints;
|
||||
set
|
||||
{
|
||||
_hints = value;
|
||||
UpdateSaveTypeFromHints();
|
||||
}
|
||||
}
|
||||
public string Hint { get; set; }
|
||||
public int Id { get; private set; }
|
||||
public string TrackingId { get; private set; }
|
||||
public string IdEntry { get; set; }
|
||||
public AutofillId AutofillId { get; private set; }
|
||||
public AutofillType AutofillType { get; private set; }
|
||||
public InputTypes InputType { get; private set; }
|
||||
public bool Focused { get; private set; }
|
||||
public bool Selected { get; private set; }
|
||||
public bool Clickable { get; private set; }
|
||||
public bool Visible { get; private set; }
|
||||
public List<string> AutofillOptions { get; set; }
|
||||
public string TextValue { get; set; }
|
||||
public long? DateValue { get; set; }
|
||||
public int? ListValue { get; set; }
|
||||
public bool? ToggleValue { get; set; }
|
||||
public HtmlInfo HtmlInfo { get; private set; }
|
||||
public ViewNode Node { get; private set; }
|
||||
|
||||
private void UpdateSaveTypeFromHints()
|
||||
{
|
||||
SaveType = SaveDataType.Generic;
|
||||
if(_hints == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
foreach(var hint in _hints)
|
||||
{
|
||||
switch(hint)
|
||||
{
|
||||
case View.AutofillHintCreditCardExpirationDate:
|
||||
case View.AutofillHintCreditCardExpirationDay:
|
||||
case View.AutofillHintCreditCardExpirationMonth:
|
||||
case View.AutofillHintCreditCardExpirationYear:
|
||||
case View.AutofillHintCreditCardNumber:
|
||||
case View.AutofillHintCreditCardSecurityCode:
|
||||
SaveType |= SaveDataType.CreditCard;
|
||||
break;
|
||||
case View.AutofillHintEmailAddress:
|
||||
SaveType |= SaveDataType.EmailAddress;
|
||||
break;
|
||||
case View.AutofillHintPhone:
|
||||
case View.AutofillHintName:
|
||||
SaveType |= SaveDataType.Generic;
|
||||
break;
|
||||
case View.AutofillHintPassword:
|
||||
SaveType |= SaveDataType.Password;
|
||||
SaveType &= ~SaveDataType.EmailAddress;
|
||||
SaveType &= ~SaveDataType.Username;
|
||||
break;
|
||||
case View.AutofillHintPostalAddress:
|
||||
case View.AutofillHintPostalCode:
|
||||
SaveType |= SaveDataType.Address;
|
||||
break;
|
||||
case View.AutofillHintUsername:
|
||||
SaveType |= SaveDataType.Username;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool ValueIsNull()
|
||||
{
|
||||
return TextValue == null && DateValue == null && ToggleValue == null;
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if(this == obj)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if(obj == null || GetType() != obj.GetType())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var field = obj as Field;
|
||||
if(TextValue != null ? !TextValue.Equals(field.TextValue) : field.TextValue != null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if(DateValue != null ? !DateValue.Equals(field.DateValue) : field.DateValue != null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return ToggleValue != null ? ToggleValue.Equals(field.ToggleValue) : field.ToggleValue == null;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
var result = TextValue != null ? TextValue.GetHashCode() : 0;
|
||||
result = 31 * result + (DateValue != null ? DateValue.GetHashCode() : 0);
|
||||
result = 31 * result + (ToggleValue != null ? ToggleValue.GetHashCode() : 0);
|
||||
return result;
|
||||
}
|
||||
|
||||
private static List<string> FilterForSupportedHints(string[] hints)
|
||||
{
|
||||
return hints?.Where(h => IsValidHint(h)).ToList() ?? new List<string>();
|
||||
}
|
||||
|
||||
private static bool IsValidHint(string hint)
|
||||
{
|
||||
switch(hint)
|
||||
{
|
||||
case View.AutofillHintCreditCardExpirationDate:
|
||||
case View.AutofillHintCreditCardExpirationDay:
|
||||
case View.AutofillHintCreditCardExpirationMonth:
|
||||
case View.AutofillHintCreditCardExpirationYear:
|
||||
case View.AutofillHintCreditCardNumber:
|
||||
case View.AutofillHintCreditCardSecurityCode:
|
||||
case View.AutofillHintEmailAddress:
|
||||
case View.AutofillHintPhone:
|
||||
case View.AutofillHintName:
|
||||
case View.AutofillHintPassword:
|
||||
case View.AutofillHintPostalAddress:
|
||||
case View.AutofillHintPostalCode:
|
||||
case View.AutofillHintUsername:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
341
src/Android/Autofill/FieldCollection.cs
Normal file
@@ -0,0 +1,341 @@
|
||||
using System.Collections.Generic;
|
||||
using Android.Service.Autofill;
|
||||
using Android.Views.Autofill;
|
||||
using System.Linq;
|
||||
using Android.Text;
|
||||
using Android.Views;
|
||||
|
||||
namespace Bit.Android.Autofill
|
||||
{
|
||||
public class FieldCollection
|
||||
{
|
||||
private List<Field> _passwordFields = null;
|
||||
private List<Field> _usernameFields = null;
|
||||
private HashSet<string> _ignoreSearchTerms = new HashSet<string> { "search", "find", "recipient", "edit" };
|
||||
private HashSet<string> _passwordTerms = new HashSet<string> { "password", "pswd" };
|
||||
|
||||
public List<AutofillId> AutofillIds { get; private set; } = new List<AutofillId>();
|
||||
public SaveDataType SaveType
|
||||
{
|
||||
get
|
||||
{
|
||||
if(FillableForLogin)
|
||||
{
|
||||
return SaveDataType.Password;
|
||||
}
|
||||
else if(FillableForCard)
|
||||
{
|
||||
return SaveDataType.CreditCard;
|
||||
}
|
||||
|
||||
return SaveDataType.Generic;
|
||||
}
|
||||
}
|
||||
public HashSet<string> Hints { get; private set; } = new HashSet<string>();
|
||||
public HashSet<string> FocusedHints { get; private set; } = new HashSet<string>();
|
||||
public HashSet<string> FieldTrackingIds { get; private set; } = new HashSet<string>();
|
||||
public List<Field> Fields { get; private set; } = new List<Field>();
|
||||
public IDictionary<string, List<Field>> HintToFieldsMap { get; private set; } =
|
||||
new Dictionary<string, List<Field>>();
|
||||
public List<AutofillId> IgnoreAutofillIds { get; private set; } = new List<AutofillId>();
|
||||
|
||||
public List<Field> PasswordFields
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_passwordFields != null)
|
||||
{
|
||||
return _passwordFields;
|
||||
}
|
||||
|
||||
if(Hints.Any())
|
||||
{
|
||||
_passwordFields = new List<Field>();
|
||||
if(HintToFieldsMap.ContainsKey(View.AutofillHintPassword))
|
||||
{
|
||||
_passwordFields.AddRange(HintToFieldsMap[View.AutofillHintPassword]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_passwordFields = Fields.Where(f => FieldIsPassword(f)).ToList();
|
||||
if(!_passwordFields.Any())
|
||||
{
|
||||
_passwordFields = Fields.Where(f => FieldHasPasswordTerms(f)).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
return _passwordFields;
|
||||
}
|
||||
}
|
||||
|
||||
public List<Field> UsernameFields
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_usernameFields != null)
|
||||
{
|
||||
return _usernameFields;
|
||||
}
|
||||
|
||||
_usernameFields = new List<Field>();
|
||||
if(Hints.Any())
|
||||
{
|
||||
if(HintToFieldsMap.ContainsKey(View.AutofillHintEmailAddress))
|
||||
{
|
||||
_usernameFields.AddRange(HintToFieldsMap[View.AutofillHintEmailAddress]);
|
||||
}
|
||||
if(HintToFieldsMap.ContainsKey(View.AutofillHintUsername))
|
||||
{
|
||||
_usernameFields.AddRange(HintToFieldsMap[View.AutofillHintUsername]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach(var passwordField in PasswordFields)
|
||||
{
|
||||
var usernameField = Fields.TakeWhile(f => f.AutofillId != passwordField.AutofillId)
|
||||
.LastOrDefault();
|
||||
if(usernameField != null)
|
||||
{
|
||||
_usernameFields.Add(usernameField);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return _usernameFields;
|
||||
}
|
||||
}
|
||||
|
||||
public bool FillableForLogin => FocusedHintsContain(
|
||||
new string[] { View.AutofillHintUsername, View.AutofillHintEmailAddress, View.AutofillHintPassword }) ||
|
||||
UsernameFields.Any(f => f.Focused) || PasswordFields.Any(f => f.Focused);
|
||||
public bool FillableForCard => FocusedHintsContain(
|
||||
new string[] { View.AutofillHintCreditCardNumber, View.AutofillHintCreditCardExpirationMonth,
|
||||
View.AutofillHintCreditCardExpirationYear, View.AutofillHintCreditCardSecurityCode});
|
||||
public bool FillableForIdentity => FocusedHintsContain(
|
||||
new string[] { View.AutofillHintName, View.AutofillHintPhone, View.AutofillHintPostalAddress,
|
||||
View.AutofillHintPostalCode });
|
||||
|
||||
public bool Fillable => FillableForLogin || FillableForCard || FillableForIdentity;
|
||||
|
||||
public void Add(Field field)
|
||||
{
|
||||
if(field == null || FieldTrackingIds.Contains(field.TrackingId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_passwordFields = _usernameFields = null;
|
||||
|
||||
FieldTrackingIds.Add(field.TrackingId);
|
||||
Fields.Add(field);
|
||||
AutofillIds.Add(field.AutofillId);
|
||||
|
||||
if(field.Hints != null)
|
||||
{
|
||||
foreach(var hint in field.Hints)
|
||||
{
|
||||
Hints.Add(hint);
|
||||
if(field.Focused)
|
||||
{
|
||||
FocusedHints.Add(hint);
|
||||
}
|
||||
|
||||
if(!HintToFieldsMap.ContainsKey(hint))
|
||||
{
|
||||
HintToFieldsMap.Add(hint, new List<Field>());
|
||||
}
|
||||
|
||||
HintToFieldsMap[hint].Add(field);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public SavedItem GetSavedItem()
|
||||
{
|
||||
if(SaveType == SaveDataType.Password)
|
||||
{
|
||||
var passwordField = PasswordFields.FirstOrDefault(f => !string.IsNullOrWhiteSpace(f.TextValue));
|
||||
if(passwordField == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var savedItem = new SavedItem
|
||||
{
|
||||
Type = App.Enums.CipherType.Login,
|
||||
Login = new SavedItem.LoginItem
|
||||
{
|
||||
Password = GetFieldValue(passwordField)
|
||||
}
|
||||
};
|
||||
|
||||
var usernameField = Fields.TakeWhile(f => f.AutofillId != passwordField.AutofillId).LastOrDefault();
|
||||
savedItem.Login.Username = GetFieldValue(usernameField);
|
||||
|
||||
return savedItem;
|
||||
}
|
||||
else if(SaveType == SaveDataType.CreditCard)
|
||||
{
|
||||
var savedItem = new SavedItem
|
||||
{
|
||||
Type = App.Enums.CipherType.Card,
|
||||
Card = new SavedItem.CardItem
|
||||
{
|
||||
Number = GetFieldValue(View.AutofillHintCreditCardNumber),
|
||||
Name = GetFieldValue(View.AutofillHintName),
|
||||
ExpMonth = GetFieldValue(View.AutofillHintCreditCardExpirationMonth, true),
|
||||
ExpYear = GetFieldValue(View.AutofillHintCreditCardExpirationYear),
|
||||
Code = GetFieldValue(View.AutofillHintCreditCardSecurityCode)
|
||||
}
|
||||
};
|
||||
|
||||
return savedItem;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public AutofillId[] GetOptionalSaveIds()
|
||||
{
|
||||
if(SaveType == SaveDataType.Password)
|
||||
{
|
||||
return UsernameFields.Select(f => f.AutofillId).ToArray();
|
||||
}
|
||||
else if(SaveType == SaveDataType.CreditCard)
|
||||
{
|
||||
var fieldList = new List<Field>();
|
||||
if(HintToFieldsMap.ContainsKey(View.AutofillHintCreditCardSecurityCode))
|
||||
{
|
||||
fieldList.AddRange(HintToFieldsMap[View.AutofillHintCreditCardSecurityCode]);
|
||||
}
|
||||
if(HintToFieldsMap.ContainsKey(View.AutofillHintCreditCardExpirationYear))
|
||||
{
|
||||
fieldList.AddRange(HintToFieldsMap[View.AutofillHintCreditCardExpirationYear]);
|
||||
}
|
||||
if(HintToFieldsMap.ContainsKey(View.AutofillHintCreditCardExpirationMonth))
|
||||
{
|
||||
fieldList.AddRange(HintToFieldsMap[View.AutofillHintCreditCardExpirationMonth]);
|
||||
}
|
||||
if(HintToFieldsMap.ContainsKey(View.AutofillHintName))
|
||||
{
|
||||
fieldList.AddRange(HintToFieldsMap[View.AutofillHintName]);
|
||||
}
|
||||
return fieldList.Select(f => f.AutofillId).ToArray();
|
||||
}
|
||||
|
||||
return new AutofillId[0];
|
||||
}
|
||||
|
||||
public AutofillId[] GetRequiredSaveFields()
|
||||
{
|
||||
if(SaveType == SaveDataType.Password)
|
||||
{
|
||||
return PasswordFields.Select(f => f.AutofillId).ToArray();
|
||||
}
|
||||
else if(SaveType == SaveDataType.CreditCard && HintToFieldsMap.ContainsKey(View.AutofillHintCreditCardNumber))
|
||||
{
|
||||
return HintToFieldsMap[View.AutofillHintCreditCardNumber].Select(f => f.AutofillId).ToArray();
|
||||
}
|
||||
|
||||
return new AutofillId[0];
|
||||
}
|
||||
|
||||
private bool FocusedHintsContain(IEnumerable<string> hints)
|
||||
{
|
||||
return hints.Any(h => FocusedHints.Contains(h));
|
||||
}
|
||||
|
||||
private string GetFieldValue(string hint, bool monthValue = false)
|
||||
{
|
||||
if(HintToFieldsMap.ContainsKey(hint))
|
||||
{
|
||||
foreach(var field in HintToFieldsMap[hint])
|
||||
{
|
||||
var val = GetFieldValue(field, monthValue);
|
||||
if(!string.IsNullOrWhiteSpace(val))
|
||||
{
|
||||
return val;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private string GetFieldValue(Field field, bool monthValue = false)
|
||||
{
|
||||
if(field == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if(!string.IsNullOrWhiteSpace(field.TextValue))
|
||||
{
|
||||
if(field.AutofillType == AutofillType.List && field.ListValue.HasValue && monthValue)
|
||||
{
|
||||
if(field.AutofillOptions.Count == 13)
|
||||
{
|
||||
return field.ListValue.ToString();
|
||||
}
|
||||
else if(field.AutofillOptions.Count == 12)
|
||||
{
|
||||
return (field.ListValue + 1).ToString();
|
||||
}
|
||||
}
|
||||
return field.TextValue;
|
||||
}
|
||||
else if(field.DateValue.HasValue)
|
||||
{
|
||||
return field.DateValue.Value.ToString();
|
||||
}
|
||||
else if(field.ToggleValue.HasValue)
|
||||
{
|
||||
return field.ToggleValue.Value.ToString();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private bool FieldIsPassword(Field f)
|
||||
{
|
||||
var inputTypePassword = f.InputType.HasFlag(InputTypes.TextVariationPassword) ||
|
||||
f.InputType.HasFlag(InputTypes.TextVariationVisiblePassword) ||
|
||||
f.InputType.HasFlag(InputTypes.TextVariationWebPassword);
|
||||
|
||||
if(!inputTypePassword && f.HtmlInfo != null && f.HtmlInfo.Tag == "input" &&
|
||||
(f.HtmlInfo.Attributes?.Any() ?? false))
|
||||
{
|
||||
foreach(var a in f.HtmlInfo.Attributes)
|
||||
{
|
||||
var key = a.First as Java.Lang.String;
|
||||
var val = a.Second as Java.Lang.String;
|
||||
if(key != null && val != null && key.ToString() == "type" && val.ToString() == "password")
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return inputTypePassword && !ValueContainsAnyTerms(f.IdEntry, _ignoreSearchTerms) &&
|
||||
!ValueContainsAnyTerms(f.Hint, _ignoreSearchTerms);
|
||||
}
|
||||
|
||||
private bool FieldHasPasswordTerms(Field f)
|
||||
{
|
||||
return ValueContainsAnyTerms(f.IdEntry, _passwordTerms) || ValueContainsAnyTerms(f.Hint, _passwordTerms);
|
||||
}
|
||||
|
||||
private bool ValueContainsAnyTerms(string value, HashSet<string> terms)
|
||||
{
|
||||
if(string.IsNullOrWhiteSpace(value))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var lowerValue = value.ToLowerInvariant();
|
||||
return terms.Any(t => lowerValue.Contains(t));
|
||||
}
|
||||
}
|
||||
}
|
||||
273
src/Android/Autofill/FilledItem.cs
Normal file
@@ -0,0 +1,273 @@
|
||||
using System;
|
||||
using Android.Service.Autofill;
|
||||
using Android.Views.Autofill;
|
||||
using System.Linq;
|
||||
using Bit.App.Models;
|
||||
using Bit.App.Enums;
|
||||
using Android.Views;
|
||||
|
||||
namespace Bit.Android.Autofill
|
||||
{
|
||||
public class FilledItem
|
||||
{
|
||||
private Lazy<string> _password;
|
||||
private Lazy<string> _cardName;
|
||||
private string _cardNumber;
|
||||
private Lazy<string> _cardExpMonth;
|
||||
private Lazy<string> _cardExpYear;
|
||||
private Lazy<string> _cardCode;
|
||||
private Lazy<string> _idPhone;
|
||||
private Lazy<string> _idEmail;
|
||||
private Lazy<string> _idUsername;
|
||||
private Lazy<string> _idAddress;
|
||||
private Lazy<string> _idPostalCode;
|
||||
|
||||
public FilledItem(Cipher cipher)
|
||||
{
|
||||
Name = cipher.Name?.Decrypt(cipher.OrganizationId) ?? "--";
|
||||
Type = cipher.Type;
|
||||
|
||||
switch(Type)
|
||||
{
|
||||
case CipherType.Login:
|
||||
Subtitle = cipher.Login.Username?.Decrypt(cipher.OrganizationId) ?? string.Empty;
|
||||
Icon = Resource.Drawable.login;
|
||||
_password = new Lazy<string>(() => cipher.Login.Password?.Decrypt(cipher.OrganizationId));
|
||||
break;
|
||||
case CipherType.Card:
|
||||
Subtitle = cipher.Card.Brand?.Decrypt(cipher.OrganizationId);
|
||||
_cardNumber = cipher.Card.Number?.Decrypt(cipher.OrganizationId);
|
||||
if(!string.IsNullOrWhiteSpace(_cardNumber) && _cardNumber.Length >= 4)
|
||||
{
|
||||
if(!string.IsNullOrWhiteSpace(_cardNumber))
|
||||
{
|
||||
Subtitle += ", ";
|
||||
}
|
||||
Subtitle += ("*" + _cardNumber.Substring(_cardNumber.Length - 4));
|
||||
}
|
||||
Icon = Resource.Drawable.card;
|
||||
_cardName = new Lazy<string>(() => cipher.Card.CardholderName?.Decrypt(cipher.OrganizationId));
|
||||
_cardCode = new Lazy<string>(() => cipher.Card.Code?.Decrypt(cipher.OrganizationId));
|
||||
_cardExpMonth = new Lazy<string>(() => cipher.Card.ExpMonth?.Decrypt(cipher.OrganizationId));
|
||||
_cardExpYear = new Lazy<string>(() => cipher.Card.ExpYear?.Decrypt(cipher.OrganizationId));
|
||||
break;
|
||||
case CipherType.Identity:
|
||||
var firstName = cipher.Identity?.FirstName?.Decrypt(cipher.OrganizationId) ?? " ";
|
||||
var lastName = cipher.Identity?.LastName?.Decrypt(cipher.OrganizationId) ?? " ";
|
||||
Subtitle = " ";
|
||||
if(!string.IsNullOrWhiteSpace(firstName))
|
||||
{
|
||||
Subtitle = firstName;
|
||||
}
|
||||
if(!string.IsNullOrWhiteSpace(lastName))
|
||||
{
|
||||
if(!string.IsNullOrWhiteSpace(Subtitle))
|
||||
{
|
||||
Subtitle += " ";
|
||||
}
|
||||
Subtitle += lastName;
|
||||
}
|
||||
Icon = Resource.Drawable.id;
|
||||
_idPhone = new Lazy<string>(() => cipher.Identity.Phone?.Decrypt(cipher.OrganizationId));
|
||||
_idEmail = new Lazy<string>(() => cipher.Identity.Email?.Decrypt(cipher.OrganizationId));
|
||||
_idUsername = new Lazy<string>(() => cipher.Identity.Username?.Decrypt(cipher.OrganizationId));
|
||||
_idAddress = new Lazy<string>(() =>
|
||||
{
|
||||
var address = cipher.Identity.Address1?.Decrypt(cipher.OrganizationId);
|
||||
|
||||
var address2 = cipher.Identity.Address2?.Decrypt(cipher.OrganizationId);
|
||||
if(!string.IsNullOrWhiteSpace(address2))
|
||||
{
|
||||
if(!string.IsNullOrWhiteSpace(address))
|
||||
{
|
||||
address += ", ";
|
||||
}
|
||||
|
||||
address += address2;
|
||||
}
|
||||
|
||||
var address3 = cipher.Identity.Address3?.Decrypt(cipher.OrganizationId);
|
||||
if(!string.IsNullOrWhiteSpace(address3))
|
||||
{
|
||||
if(!string.IsNullOrWhiteSpace(address))
|
||||
{
|
||||
address += ", ";
|
||||
}
|
||||
|
||||
address += address3;
|
||||
}
|
||||
|
||||
return address;
|
||||
});
|
||||
_idPostalCode = new Lazy<string>(() => cipher.Identity.PostalCode?.Decrypt(cipher.OrganizationId));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public string Name { get; set; }
|
||||
public string Subtitle { get; set; } = string.Empty;
|
||||
public int Icon { get; set; } = Resource.Drawable.login;
|
||||
public CipherType Type { get; set; }
|
||||
|
||||
public bool ApplyToFields(FieldCollection fieldCollection, Dataset.Builder datasetBuilder)
|
||||
{
|
||||
if(!fieldCollection?.Fields.Any() ?? true)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var setValues = false;
|
||||
if(Type == CipherType.Login)
|
||||
{
|
||||
if(fieldCollection.PasswordFields.Any() && !string.IsNullOrWhiteSpace(_password.Value))
|
||||
{
|
||||
foreach(var f in fieldCollection.PasswordFields)
|
||||
{
|
||||
var val = ApplyValue(f, _password.Value);
|
||||
if(val != null)
|
||||
{
|
||||
setValues = true;
|
||||
datasetBuilder.SetValue(f.AutofillId, val);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(fieldCollection.UsernameFields.Any() && !string.IsNullOrWhiteSpace(Subtitle))
|
||||
{
|
||||
foreach(var f in fieldCollection.UsernameFields)
|
||||
{
|
||||
var val = ApplyValue(f, Subtitle);
|
||||
if(val != null)
|
||||
{
|
||||
setValues = true;
|
||||
datasetBuilder.SetValue(f.AutofillId, val);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(Type == CipherType.Card)
|
||||
{
|
||||
if(ApplyValue(datasetBuilder, fieldCollection, View.AutofillHintCreditCardNumber,
|
||||
new Lazy<string>(() => _cardNumber)))
|
||||
{
|
||||
setValues = true;
|
||||
}
|
||||
if(ApplyValue(datasetBuilder, fieldCollection, View.AutofillHintCreditCardSecurityCode, _cardCode))
|
||||
{
|
||||
setValues = true;
|
||||
}
|
||||
if(ApplyValue(datasetBuilder, fieldCollection, View.AutofillHintCreditCardExpirationMonth, _cardExpMonth, true))
|
||||
{
|
||||
setValues = true;
|
||||
}
|
||||
if(ApplyValue(datasetBuilder, fieldCollection, View.AutofillHintCreditCardExpirationYear, _cardExpYear))
|
||||
{
|
||||
setValues = true;
|
||||
}
|
||||
if(ApplyValue(datasetBuilder, fieldCollection, View.AutofillHintName, _cardName))
|
||||
{
|
||||
setValues = true;
|
||||
}
|
||||
}
|
||||
else if(Type == CipherType.Identity)
|
||||
{
|
||||
if(ApplyValue(datasetBuilder, fieldCollection, View.AutofillHintPhone, _idPhone))
|
||||
{
|
||||
setValues = true;
|
||||
}
|
||||
if(ApplyValue(datasetBuilder, fieldCollection, View.AutofillHintEmailAddress, _idEmail))
|
||||
{
|
||||
setValues = true;
|
||||
}
|
||||
if(ApplyValue(datasetBuilder, fieldCollection, View.AutofillHintUsername, _idUsername))
|
||||
{
|
||||
setValues = true;
|
||||
}
|
||||
if(ApplyValue(datasetBuilder, fieldCollection, View.AutofillHintPostalAddress, _idAddress))
|
||||
{
|
||||
setValues = true;
|
||||
}
|
||||
if(ApplyValue(datasetBuilder, fieldCollection, View.AutofillHintPostalCode, _idPostalCode))
|
||||
{
|
||||
setValues = true;
|
||||
}
|
||||
if(ApplyValue(datasetBuilder, fieldCollection, View.AutofillHintName, new Lazy<string>(() => Subtitle)))
|
||||
{
|
||||
setValues = true;
|
||||
}
|
||||
}
|
||||
|
||||
return setValues;
|
||||
}
|
||||
|
||||
private static bool ApplyValue(Dataset.Builder builder, FieldCollection fieldCollection,
|
||||
string hint, Lazy<string> value, bool monthValue = false)
|
||||
{
|
||||
bool setValues = false;
|
||||
if(fieldCollection.HintToFieldsMap.ContainsKey(hint) && !string.IsNullOrWhiteSpace(value.Value))
|
||||
{
|
||||
foreach(var f in fieldCollection.HintToFieldsMap[hint])
|
||||
{
|
||||
var val = ApplyValue(f, value.Value, monthValue);
|
||||
if(val != null)
|
||||
{
|
||||
setValues = true;
|
||||
builder.SetValue(f.AutofillId, val);
|
||||
}
|
||||
}
|
||||
}
|
||||
return setValues;
|
||||
}
|
||||
|
||||
private static AutofillValue ApplyValue(Field field, string value, bool monthValue = false)
|
||||
{
|
||||
switch(field.AutofillType)
|
||||
{
|
||||
case AutofillType.Date:
|
||||
if(long.TryParse(value, out long dateValue))
|
||||
{
|
||||
return AutofillValue.ForDate(dateValue);
|
||||
}
|
||||
break;
|
||||
case AutofillType.List:
|
||||
if(field.AutofillOptions != null)
|
||||
{
|
||||
if(monthValue && int.TryParse(value, out int monthIndex))
|
||||
{
|
||||
if(field.AutofillOptions.Count == 13)
|
||||
{
|
||||
return AutofillValue.ForList(monthIndex);
|
||||
}
|
||||
else if(field.AutofillOptions.Count >= monthIndex)
|
||||
{
|
||||
return AutofillValue.ForList(monthIndex - 1);
|
||||
}
|
||||
}
|
||||
|
||||
for(var i = 0; i < field.AutofillOptions.Count; i++)
|
||||
{
|
||||
if(field.AutofillOptions[i].Equals(value))
|
||||
{
|
||||
return AutofillValue.ForList(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case AutofillType.Text:
|
||||
return AutofillValue.ForText(value);
|
||||
case AutofillType.Toggle:
|
||||
if(bool.TryParse(value, out bool toggleValue))
|
||||
{
|
||||
return AutofillValue.ForToggle(toggleValue);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
127
src/Android/Autofill/Parser.cs
Normal file
@@ -0,0 +1,127 @@
|
||||
using static Android.App.Assist.AssistStructure;
|
||||
using Android.App.Assist;
|
||||
using Bit.App;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Bit.Android.Autofill
|
||||
{
|
||||
public class Parser
|
||||
{
|
||||
|
||||
public static HashSet<string> ExcludedPackageIds = new HashSet<string>
|
||||
{
|
||||
"android"
|
||||
};
|
||||
|
||||
private readonly AssistStructure _structure;
|
||||
private string _uri;
|
||||
private string _packageName;
|
||||
private string _webDomain;
|
||||
|
||||
public Parser(AssistStructure structure)
|
||||
{
|
||||
_structure = structure;
|
||||
}
|
||||
|
||||
public FieldCollection FieldCollection { get; private set; } = new FieldCollection();
|
||||
public string Uri
|
||||
{
|
||||
get
|
||||
{
|
||||
if(!string.IsNullOrWhiteSpace(_uri))
|
||||
{
|
||||
return _uri;
|
||||
}
|
||||
|
||||
if(string.IsNullOrWhiteSpace(WebDomain) && string.IsNullOrWhiteSpace(PackageName))
|
||||
{
|
||||
_uri = null;
|
||||
}
|
||||
else if(!string.IsNullOrWhiteSpace(WebDomain))
|
||||
{
|
||||
_uri = string.Concat("http://", WebDomain);
|
||||
}
|
||||
else
|
||||
{
|
||||
_uri = string.Concat(Constants.AndroidAppProtocol, PackageName);
|
||||
}
|
||||
|
||||
return _uri;
|
||||
}
|
||||
}
|
||||
public string PackageName
|
||||
{
|
||||
get => _packageName;
|
||||
set
|
||||
{
|
||||
if(string.IsNullOrWhiteSpace(value))
|
||||
{
|
||||
_packageName = _uri = null;
|
||||
}
|
||||
|
||||
_packageName = value;
|
||||
}
|
||||
}
|
||||
public string WebDomain
|
||||
{
|
||||
get => _webDomain;
|
||||
set
|
||||
{
|
||||
if(string.IsNullOrWhiteSpace(value))
|
||||
{
|
||||
_webDomain = _uri = null;
|
||||
}
|
||||
|
||||
_webDomain = value;
|
||||
}
|
||||
}
|
||||
|
||||
public void Parse()
|
||||
{
|
||||
for(var i = 0; i < _structure.WindowNodeCount; i++)
|
||||
{
|
||||
var node = _structure.GetWindowNodeAt(i);
|
||||
ParseNode(node.RootViewNode);
|
||||
}
|
||||
|
||||
if(!AutofillHelpers.TrustedBrowsers.Contains(PackageName) &&
|
||||
!AutofillHelpers.CompatBrowsers.Contains(PackageName))
|
||||
{
|
||||
WebDomain = null;
|
||||
}
|
||||
}
|
||||
|
||||
private void ParseNode(ViewNode node)
|
||||
{
|
||||
SetPackageAndDomain(node);
|
||||
var hints = node.GetAutofillHints();
|
||||
var isEditText = node.ClassName == "android.widget.EditText" || node?.HtmlInfo?.Tag == "input";
|
||||
if(isEditText || (hints?.Length ?? 0) > 0)
|
||||
{
|
||||
FieldCollection.Add(new Field(node));
|
||||
}
|
||||
else
|
||||
{
|
||||
FieldCollection.IgnoreAutofillIds.Add(node.AutofillId);
|
||||
}
|
||||
|
||||
for(var i = 0; i < node.ChildCount; i++)
|
||||
{
|
||||
ParseNode(node.GetChildAt(i));
|
||||
}
|
||||
}
|
||||
|
||||
private void SetPackageAndDomain(ViewNode node)
|
||||
{
|
||||
if(string.IsNullOrWhiteSpace(PackageName) && !string.IsNullOrWhiteSpace(node.IdPackage) &&
|
||||
!ExcludedPackageIds.Contains(node.IdPackage))
|
||||
{
|
||||
PackageName = node.IdPackage;
|
||||
}
|
||||
if(string.IsNullOrWhiteSpace(WebDomain) && !string.IsNullOrWhiteSpace(node.WebDomain))
|
||||
{
|
||||
WebDomain = node.WebDomain;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
26
src/Android/Autofill/SavedItem.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using Bit.App.Enums;
|
||||
|
||||
namespace Bit.Android.Autofill
|
||||
{
|
||||
public class SavedItem
|
||||
{
|
||||
public CipherType Type { get; set; }
|
||||
public LoginItem Login { get; set; }
|
||||
public CardItem Card { get; set; }
|
||||
|
||||
public class LoginItem
|
||||
{
|
||||
public string Username { get; set; }
|
||||
public string Password { get; set; }
|
||||
}
|
||||
|
||||
public class CardItem
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Number { get; set; }
|
||||
public string ExpMonth { get; set; }
|
||||
public string ExpYear { get; set; }
|
||||
public string Code { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,15 +3,14 @@ using Android.Content;
|
||||
using Android.OS;
|
||||
using Android.Runtime;
|
||||
using Android.Views;
|
||||
using System;
|
||||
|
||||
namespace Bit.Android
|
||||
{
|
||||
[Activity(Theme = "@style/BitwardenTheme.Splash",
|
||||
Label = "bitwarden",
|
||||
Icon = "@drawable/icon",
|
||||
WindowSoftInputMode = SoftInput.StateHidden)]
|
||||
[Activity(Theme = "@style/BitwardenTheme.Splash", WindowSoftInputMode = SoftInput.StateHidden)]
|
||||
public class AutofillActivity : Activity
|
||||
{
|
||||
private DateTime? _lastLaunch = null;
|
||||
private string _lastQueriedUri;
|
||||
|
||||
public static AutofillCredentials LastCredentials { get; set; }
|
||||
@@ -93,6 +92,13 @@ namespace Bit.Android
|
||||
return;
|
||||
}
|
||||
|
||||
var now = DateTime.UtcNow;
|
||||
if(_lastLaunch.HasValue && (now - _lastLaunch.Value <= TimeSpan.FromSeconds(2)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_lastLaunch = now;
|
||||
var intent = new Intent(this, typeof(MainActivity));
|
||||
if(!callingIntent.Flags.HasFlag(ActivityFlags.LaunchedFromHistory))
|
||||
{
|
||||
|
||||
@@ -6,23 +6,30 @@ using Android.App;
|
||||
using Android.Content;
|
||||
using Android.OS;
|
||||
using Android.Views.Accessibility;
|
||||
using Bit.App.Abstractions;
|
||||
using XLabs.Ioc;
|
||||
using Bit.App.Resources;
|
||||
|
||||
namespace Bit.Android
|
||||
{
|
||||
[Service(Permission = "android.permission.BIND_ACCESSIBILITY_SERVICE", Label = "bitwarden")]
|
||||
[Service(Permission = global::Android.Manifest.Permission.BindAccessibilityService, Label = "Bitwarden")]
|
||||
[IntentFilter(new string[] { "android.accessibilityservice.AccessibilityService" })]
|
||||
[MetaData("android.accessibilityservice", Resource = "@xml/accessibilityservice")]
|
||||
public class AutofillService : AccessibilityService
|
||||
{
|
||||
private NotificationChannel _notificationChannel;
|
||||
|
||||
private const string BitwardenTag = "bw_access";
|
||||
private const int AutoFillNotificationId = 34573;
|
||||
private const string SystemUiPackage = "com.android.systemui";
|
||||
private const string BitwardenPackage = "com.x8bit.bitwarden";
|
||||
private const string BitwardenWebsite = "bitwarden.com";
|
||||
private const string BitwardenWebsite = "vault.bitwarden.com";
|
||||
|
||||
private static Dictionary<string, Browser> SupportedBrowsers => new List<Browser>
|
||||
{
|
||||
new Browser("com.android.chrome", "url_bar"),
|
||||
new Browser("com.chrome.beta", "url_bar"),
|
||||
new Browser("org.chromium.chrome", "url_bar"),
|
||||
new Browser("com.android.browser", "url"),
|
||||
new Browser("com.brave.browser", "url_bar"),
|
||||
new Browser("com.opera.browser", "url_field"),
|
||||
@@ -32,13 +39,17 @@ namespace Bit.Android
|
||||
new Browser("com.chrome.canary", "url_bar"),
|
||||
new Browser("com.google.android.apps.chrome", "url_bar"),
|
||||
new Browser("com.google.android.apps.chrome_dev", "url_bar"),
|
||||
new Browser("org.codeaurora.swe.browser", "url_bar"),
|
||||
new Browser("org.iron.srware", "url_bar"),
|
||||
new Browser("com.sec.android.app.sbrowser", "sbrowser_url_bar"),
|
||||
new Browser("com.sec.android.app.sbrowser", "location_bar_edit_text"),
|
||||
new Browser("com.sec.android.app.sbrowser.beta", "location_bar_edit_text"),
|
||||
new Browser("com.yandex.browser", "bro_omnibar_address_title_text",
|
||||
(s) => s.Split(' ').FirstOrDefault()),
|
||||
(s) => s.Split(new char[]{' ', '<27>'}).FirstOrDefault()), // 0 = Regular Space, 1 = No-break space (00A0)
|
||||
new Browser("org.mozilla.firefox", "url_bar_title"),
|
||||
new Browser("org.mozilla.firefox_beta", "url_bar_title"),
|
||||
new Browser("org.mozilla.fennec_aurora", "url_bar_title"),
|
||||
new Browser("org.mozilla.focus", "display_url"),
|
||||
new Browser("org.mozilla.klar", "display_url"),
|
||||
new Browser("com.ghostery.android.ghostery", "search_field"),
|
||||
new Browser("org.adblockplus.browser", "url_bar_title"),
|
||||
new Browser("com.htc.sense.browser", "title"),
|
||||
@@ -49,53 +60,155 @@ namespace Bit.Android
|
||||
new Browser("com.mx.browser", "address_editor_with_progress"),
|
||||
new Browser("com.mx.browser.tablet", "address_editor_with_progress"),
|
||||
new Browser("com.linkbubble.playstore", "url_text"),
|
||||
new Browser("com.ksmobile.cb", "address_bar_edit_text")
|
||||
new Browser("com.ksmobile.cb", "address_bar_edit_text"),
|
||||
new Browser("acr.browser.lightning", "search"),
|
||||
new Browser("acr.browser.barebones", "search"),
|
||||
new Browser("com.microsoft.emmx", "url_bar"),
|
||||
new Browser("com.duckduckgo.mobile.android", "omnibarTextInput"),
|
||||
new Browser("mark.via.gp", "aw"),
|
||||
new Browser("org.bromite.bromite", "url_bar"),
|
||||
new Browser("com.kiwibrowser.browser", "url_bar"),
|
||||
new Browser("com.ecosia.android", "url_bar"),
|
||||
}.ToDictionary(n => n.PackageName);
|
||||
|
||||
// Known packages to skip
|
||||
private static HashSet<string> FilteredPackageNames => new HashSet<string>
|
||||
{
|
||||
SystemUiPackage,
|
||||
"com.google.android.googlequicksearchbox",
|
||||
"com.google.android.apps.nexuslauncher",
|
||||
"com.google.android.launcher",
|
||||
"com.computer.desktop.ui.launcher",
|
||||
"com.launcher.notelauncher",
|
||||
"com.anddoes.launcher",
|
||||
"com.actionlauncher.playstore",
|
||||
"ch.deletescape.lawnchair.plah",
|
||||
"com.microsoft.launcher",
|
||||
"com.teslacoilsw.launcher",
|
||||
"com.teslacoilsw.launcher.prime",
|
||||
"is.shortcut",
|
||||
"me.craftsapp.nlauncher",
|
||||
"com.ss.squarehome2"
|
||||
};
|
||||
|
||||
private readonly IAppSettingsService _appSettings;
|
||||
private long _lastNotificationTime = 0;
|
||||
private string _lastNotificationUri = null;
|
||||
private HashSet<string> _launcherPackageNames = null;
|
||||
private DateTime? _lastLauncherSetBuilt = null;
|
||||
private TimeSpan _rebuildLauncherSpan = TimeSpan.FromHours(1);
|
||||
|
||||
public AutofillService()
|
||||
{
|
||||
_appSettings = Resolver.Resolve<IAppSettingsService>();
|
||||
}
|
||||
|
||||
public override void OnAccessibilityEvent(AccessibilityEvent e)
|
||||
{
|
||||
try
|
||||
{
|
||||
var root = RootInActiveWindow;
|
||||
if(e == null || root == null || string.IsNullOrWhiteSpace(e.PackageName) ||
|
||||
e.PackageName == SystemUiPackage || root.PackageName != e.PackageName)
|
||||
var powerManager = (PowerManager)GetSystemService(PowerService);
|
||||
if(Build.VERSION.SdkInt > BuildVersionCodes.KitkatWatch && !powerManager.IsInteractive)
|
||||
{
|
||||
return;
|
||||
}
|
||||
else if(Build.VERSION.SdkInt < BuildVersionCodes.Lollipop && !powerManager.IsScreenOn)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var testNodes = GetWindowNodes(root, e, n => n.ViewIdResourceName != null && n.Text != null, false);
|
||||
var testNodesData = testNodes.Select(n => new { id = n.ViewIdResourceName, text = n.Text });
|
||||
testNodes.Dispose();
|
||||
if(SkipPackage(e?.PackageName))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var root = RootInActiveWindow;
|
||||
if(root == null || root.PackageName != e.PackageName)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//var testNodes = GetWindowNodes(root, e, n => n.ViewIdResourceName != null && n.Text != null, false);
|
||||
//var testNodesData = testNodes.Select(n => new { id = n.ViewIdResourceName, text = n.Text });
|
||||
|
||||
var notificationManager = (NotificationManager)GetSystemService(NotificationService);
|
||||
var cancelNotification = true;
|
||||
|
||||
switch(e.EventType)
|
||||
{
|
||||
case EventTypes.WindowContentChanged:
|
||||
case EventTypes.WindowStateChanged:
|
||||
var cancelNotification = true;
|
||||
|
||||
if(e.PackageName == BitwardenPackage)
|
||||
case EventTypes.ViewFocused:
|
||||
if(e.Source == null || !e.Source.Password || !_appSettings.AutofillPasswordField)
|
||||
{
|
||||
notificationManager?.Cancel(AutoFillNotificationId);
|
||||
break;
|
||||
}
|
||||
|
||||
var passwordNodes = GetWindowNodes(root, e, n => n.Password, false);
|
||||
if(passwordNodes.Count > 0)
|
||||
if(e.PackageName == BitwardenPackage)
|
||||
{
|
||||
CancelNotification(notificationManager);
|
||||
break;
|
||||
}
|
||||
|
||||
if(ScanAndAutofill(root, e, notificationManager, cancelNotification))
|
||||
{
|
||||
CancelNotification(notificationManager);
|
||||
}
|
||||
break;
|
||||
case EventTypes.WindowContentChanged:
|
||||
case EventTypes.WindowStateChanged:
|
||||
if(_appSettings.AutofillPasswordField && e.Source.Password)
|
||||
{
|
||||
break;
|
||||
}
|
||||
else if(_appSettings.AutofillPasswordField && AutofillActivity.LastCredentials == null)
|
||||
{
|
||||
if(string.IsNullOrWhiteSpace(_lastNotificationUri))
|
||||
{
|
||||
CancelNotification(notificationManager);
|
||||
break;
|
||||
}
|
||||
|
||||
var uri = GetUri(root);
|
||||
if(uri != _lastNotificationUri)
|
||||
{
|
||||
CancelNotification(notificationManager);
|
||||
}
|
||||
else if(uri.StartsWith(App.Constants.AndroidAppProtocol))
|
||||
{
|
||||
CancelNotification(notificationManager, 30000);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if(e.PackageName == BitwardenPackage)
|
||||
{
|
||||
CancelNotification(notificationManager);
|
||||
break;
|
||||
}
|
||||
|
||||
if(_appSettings.AutofillPersistNotification)
|
||||
{
|
||||
var uri = GetUri(root);
|
||||
if(uri != null && !uri.Contains(BitwardenWebsite))
|
||||
{
|
||||
if(NeedToAutofill(AutofillActivity.LastCredentials, uri))
|
||||
var needToFill = NeedToAutofill(AutofillActivity.LastCredentials, uri);
|
||||
if(needToFill)
|
||||
{
|
||||
var allEditTexts = GetWindowNodes(root, e, n => EditText(n), false);
|
||||
var usernameEditText = allEditTexts.TakeWhile(n => !n.Password).LastOrDefault();
|
||||
FillCredentials(usernameEditText, passwordNodes);
|
||||
var passwordNodes = GetWindowNodes(root, e, n => n.Password, false);
|
||||
needToFill = passwordNodes.Any();
|
||||
if(needToFill)
|
||||
{
|
||||
var allEditTexts = GetWindowNodes(root, e, n => EditText(n), false);
|
||||
var usernameEditText = allEditTexts.TakeWhile(n => !n.Password).LastOrDefault();
|
||||
FillCredentials(usernameEditText, passwordNodes);
|
||||
|
||||
allEditTexts.Dispose();
|
||||
usernameEditText.Dispose();
|
||||
allEditTexts.Dispose();
|
||||
usernameEditText.Dispose();
|
||||
}
|
||||
passwordNodes.Dispose();
|
||||
}
|
||||
else
|
||||
|
||||
if(!needToFill)
|
||||
{
|
||||
NotifyToAutofill(uri, notificationManager);
|
||||
cancelNotification = false;
|
||||
@@ -104,12 +217,14 @@ namespace Bit.Android
|
||||
|
||||
AutofillActivity.LastCredentials = null;
|
||||
}
|
||||
|
||||
passwordNodes.Dispose();
|
||||
else
|
||||
{
|
||||
cancelNotification = ScanAndAutofill(root, e, notificationManager, cancelNotification);
|
||||
}
|
||||
|
||||
if(cancelNotification)
|
||||
{
|
||||
notificationManager?.Cancel(AutoFillNotificationId);
|
||||
CancelNotification(notificationManager);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -120,8 +235,8 @@ namespace Bit.Android
|
||||
root.Dispose();
|
||||
e.Dispose();
|
||||
}
|
||||
// Some unknown condition is causing NullReferenceException's in production. Suppress it for now.
|
||||
catch(NullReferenceException) { }
|
||||
// Suppress exceptions so that service doesn't crash
|
||||
catch { }
|
||||
}
|
||||
|
||||
public override void OnInterrupt()
|
||||
@@ -129,6 +244,57 @@ namespace Bit.Android
|
||||
|
||||
}
|
||||
|
||||
public bool ScanAndAutofill(AccessibilityNodeInfo root, AccessibilityEvent e,
|
||||
NotificationManager notificationManager, bool cancelNotification)
|
||||
{
|
||||
var passwordNodes = GetWindowNodes(root, e, n => n.Password, false);
|
||||
if(passwordNodes.Count > 0)
|
||||
{
|
||||
var uri = GetUri(root);
|
||||
if(uri != null && !uri.Contains(BitwardenWebsite))
|
||||
{
|
||||
if(NeedToAutofill(AutofillActivity.LastCredentials, uri))
|
||||
{
|
||||
var allEditTexts = GetWindowNodes(root, e, n => EditText(n), false);
|
||||
var usernameEditText = allEditTexts.TakeWhile(n => !n.Password).LastOrDefault();
|
||||
FillCredentials(usernameEditText, passwordNodes);
|
||||
|
||||
allEditTexts.Dispose();
|
||||
usernameEditText.Dispose();
|
||||
}
|
||||
else
|
||||
{
|
||||
NotifyToAutofill(uri, notificationManager);
|
||||
cancelNotification = false;
|
||||
}
|
||||
}
|
||||
|
||||
AutofillActivity.LastCredentials = null;
|
||||
}
|
||||
else if(AutofillActivity.LastCredentials != null)
|
||||
{
|
||||
System.Threading.Tasks.Task.Run(async () =>
|
||||
{
|
||||
await System.Threading.Tasks.Task.Delay(1000);
|
||||
AutofillActivity.LastCredentials = null;
|
||||
});
|
||||
}
|
||||
|
||||
passwordNodes.Dispose();
|
||||
return cancelNotification;
|
||||
}
|
||||
|
||||
public void CancelNotification(NotificationManager notificationManager, long limit = 250)
|
||||
{
|
||||
if(Java.Lang.JavaSystem.CurrentTimeMillis() - _lastNotificationTime < limit)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_lastNotificationUri = null;
|
||||
notificationManager?.Cancel(AutoFillNotificationId);
|
||||
}
|
||||
|
||||
private string GetUri(AccessibilityNodeInfo root)
|
||||
{
|
||||
var uri = string.Concat(App.Constants.AndroidAppProtocol, root.PackageName);
|
||||
@@ -208,17 +374,22 @@ namespace Bit.Android
|
||||
return;
|
||||
}
|
||||
|
||||
var now = Java.Lang.JavaSystem.CurrentTimeMillis();
|
||||
var intent = new Intent(this, typeof(AutofillActivity));
|
||||
intent.PutExtra("uri", uri);
|
||||
intent.SetFlags(ActivityFlags.NewTask | ActivityFlags.SingleTop | ActivityFlags.ClearTop);
|
||||
var pendingIntent = PendingIntent.GetActivity(this, 0, intent, PendingIntentFlags.UpdateCurrent);
|
||||
|
||||
var notificationContent = Build.VERSION.SdkInt > BuildVersionCodes.KitkatWatch ?
|
||||
AppResources.BitwardenAutofillServiceNotificationContent :
|
||||
AppResources.BitwardenAutofillServiceNotificationContentOld;
|
||||
|
||||
var builder = new Notification.Builder(this);
|
||||
builder.SetSmallIcon(Resource.Drawable.notification_sm)
|
||||
.SetContentTitle(App.Resources.AppResources.BitwardenAutofillService)
|
||||
.SetContentText(App.Resources.AppResources.BitwardenAutofillServiceNotificationContent)
|
||||
.SetTicker(App.Resources.AppResources.BitwardenAutofillServiceNotificationContent)
|
||||
.SetWhen(Java.Lang.JavaSystem.CurrentTimeMillis())
|
||||
.SetContentTitle(AppResources.BitwardenAutofillService)
|
||||
.SetContentText(notificationContent)
|
||||
.SetTicker(notificationContent)
|
||||
.SetWhen(now)
|
||||
.SetContentIntent(pendingIntent);
|
||||
|
||||
if(Build.VERSION.SdkInt > BuildVersionCodes.KitkatWatch)
|
||||
@@ -228,6 +399,24 @@ namespace Bit.Android
|
||||
Resource.Color.primary));
|
||||
}
|
||||
|
||||
if(Build.VERSION.SdkInt >= BuildVersionCodes.O)
|
||||
{
|
||||
if(_notificationChannel == null)
|
||||
{
|
||||
_notificationChannel = new NotificationChannel("bitwarden_autofill_service",
|
||||
AppResources.AutofillService, NotificationImportance.Low);
|
||||
notificationManager.CreateNotificationChannel(_notificationChannel);
|
||||
}
|
||||
builder.SetChannelId(_notificationChannel.Id);
|
||||
}
|
||||
|
||||
if(/*Build.VERSION.SdkInt <= BuildVersionCodes.N && */_appSettings.AutofillPersistNotification)
|
||||
{
|
||||
builder.SetPriority(-2);
|
||||
}
|
||||
|
||||
_lastNotificationTime = now;
|
||||
_lastNotificationUri = uri;
|
||||
notificationManager.Notify(AutoFillNotificationId, builder.Build());
|
||||
|
||||
builder.Dispose();
|
||||
@@ -255,16 +444,17 @@ namespace Bit.Android
|
||||
}
|
||||
|
||||
private NodeList GetWindowNodes(AccessibilityNodeInfo n, AccessibilityEvent e,
|
||||
Func<AccessibilityNodeInfo, bool> condition, bool disposeIfUnused, NodeList nodes = null)
|
||||
Func<AccessibilityNodeInfo, bool> condition, bool disposeIfUnused, NodeList nodes = null,
|
||||
int recursionDepth = 0)
|
||||
{
|
||||
if(nodes == null)
|
||||
{
|
||||
nodes = new NodeList();
|
||||
}
|
||||
|
||||
if(n != null)
|
||||
var dispose = disposeIfUnused;
|
||||
if(n != null && recursionDepth < 50)
|
||||
{
|
||||
var dispose = disposeIfUnused;
|
||||
if(n.WindowId == e.WindowId && !(n.ViewIdResourceName?.StartsWith(SystemUiPackage) ?? false) && condition(n))
|
||||
{
|
||||
dispose = false;
|
||||
@@ -273,18 +463,54 @@ namespace Bit.Android
|
||||
|
||||
for(var i = 0; i < n.ChildCount; i++)
|
||||
{
|
||||
GetWindowNodes(n.GetChild(i), e, condition, true, nodes);
|
||||
}
|
||||
|
||||
if(dispose)
|
||||
{
|
||||
n.Dispose();
|
||||
var childNode = n.GetChild(i);
|
||||
if(i > 100)
|
||||
{
|
||||
global::Android.Util.Log.Info(BitwardenTag, "Too many child iterations.");
|
||||
break;
|
||||
}
|
||||
else if(childNode.GetHashCode() == n.GetHashCode())
|
||||
{
|
||||
global::Android.Util.Log.Info(BitwardenTag,
|
||||
"Child node is the same as parent for some reason.");
|
||||
}
|
||||
else
|
||||
{
|
||||
GetWindowNodes(childNode, e, condition, true, nodes, recursionDepth++);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(dispose)
|
||||
{
|
||||
n?.Dispose();
|
||||
}
|
||||
|
||||
return nodes;
|
||||
}
|
||||
|
||||
private bool SkipPackage(string eventPackageName)
|
||||
{
|
||||
if(string.IsNullOrWhiteSpace(eventPackageName) || FilteredPackageNames.Contains(eventPackageName)
|
||||
|| eventPackageName.Contains("launcher"))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if(_launcherPackageNames == null || _lastLauncherSetBuilt == null ||
|
||||
(DateTime.Now - _lastLauncherSetBuilt.Value) > _rebuildLauncherSpan)
|
||||
{
|
||||
// refresh launcher list every now and then
|
||||
_lastLauncherSetBuilt = DateTime.Now;
|
||||
var intent = new Intent(Intent.ActionMain);
|
||||
intent.AddCategory(Intent.CategoryHome);
|
||||
var resolveInfo = PackageManager.QueryIntentActivities(intent, 0);
|
||||
_launcherPackageNames = resolveInfo.Select(ri => ri.ActivityInfo.PackageName).ToHashSet();
|
||||
}
|
||||
|
||||
return _launcherPackageNames.Contains(eventPackageName);
|
||||
}
|
||||
|
||||
public class Browser
|
||||
{
|
||||
public Browser(string packageName, string uriViewId)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using Android.Content;
|
||||
using Bit.Android.Controls;
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Platform.Android;
|
||||
@@ -9,6 +10,10 @@ namespace Bit.Android.Controls
|
||||
{
|
||||
public class CustomButtonRenderer : ButtonRenderer
|
||||
{
|
||||
public CustomButtonRenderer(Context context)
|
||||
: base(context)
|
||||
{ }
|
||||
|
||||
protected override void OnElementChanged(ElementChangedEventArgs<Button> e)
|
||||
{
|
||||
base.OnElementChanged(e);
|
||||
@@ -16,6 +21,10 @@ namespace Bit.Android.Controls
|
||||
{
|
||||
Control.TextSize = (float)Device.GetNamedSize(NamedSize.Medium, typeof(Button));
|
||||
}
|
||||
|
||||
// This will prevent all screen overlay apps from being able to interact with buttons.
|
||||
// Ex: apps that change the screen color for "night mode"
|
||||
// Control.FilterTouchesWhenObscured = true;
|
||||
}
|
||||
|
||||
protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
|
||||
|
||||
21
src/Android/Controls/CustomLabelRenderer.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using Android.Content;
|
||||
using Bit.Android.Controls;
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Platform.Android;
|
||||
|
||||
[assembly: ExportRenderer(typeof(Label), typeof(CustomLabelRenderer))]
|
||||
namespace Bit.Android.Controls
|
||||
{
|
||||
public class CustomLabelRenderer : LabelRenderer
|
||||
{
|
||||
public CustomLabelRenderer(Context context)
|
||||
: base(context)
|
||||
{ }
|
||||
|
||||
protected override void OnElementChanged(ElementChangedEventArgs<Label> e)
|
||||
{
|
||||
base.OnElementChanged(e);
|
||||
Control.SetMaxLines(int.MaxValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using Android.Content;
|
||||
using Bit.Android.Controls;
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Platform.Android;
|
||||
@@ -9,6 +10,10 @@ namespace Bit.Android.Controls
|
||||
{
|
||||
public class CustomSearchBarRenderer : SearchBarRenderer
|
||||
{
|
||||
public CustomSearchBarRenderer(Context context)
|
||||
: base(context)
|
||||
{ }
|
||||
|
||||
protected override void OnElementChanged(ElementChangedEventArgs<SearchBar> e)
|
||||
{
|
||||
base.OnElementChanged(e);
|
||||
|
||||
27
src/Android/Controls/CustomSliderRenderer.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using Bit.Android.Controls;
|
||||
using Xamarin.Forms;
|
||||
using Android.Content;
|
||||
using Xamarin.Forms.Platform.Android;
|
||||
using Android.Support.V4.Content.Res;
|
||||
|
||||
[assembly: ExportRenderer(typeof(Slider), typeof(CustomSliderRenderer))]
|
||||
namespace Bit.Android.Controls
|
||||
{
|
||||
public class CustomSliderRenderer : SliderRenderer
|
||||
{
|
||||
public CustomSliderRenderer(Context context)
|
||||
: base(context)
|
||||
{ }
|
||||
|
||||
protected override void OnElementChanged(ElementChangedEventArgs<Slider> e)
|
||||
{
|
||||
base.OnElementChanged(e);
|
||||
if(Control != null)
|
||||
{
|
||||
var thumb = ResourcesCompat.GetDrawable(Resources, Resource.Drawable.slider_thumb, null);
|
||||
Control.SetThumb(thumb);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using Android.Content;
|
||||
using Bit.Android.Controls;
|
||||
using Bit.App.Controls;
|
||||
using Xamarin.Forms;
|
||||
@@ -10,6 +11,10 @@ namespace Bit.Android.Controls
|
||||
{
|
||||
public class ExtendedButtonRenderer : CustomButtonRenderer
|
||||
{
|
||||
public ExtendedButtonRenderer(Context context)
|
||||
: base(context)
|
||||
{ }
|
||||
|
||||
protected override void OnElementChanged(ElementChangedEventArgs<Button> e)
|
||||
{
|
||||
base.OnElementChanged(e);
|
||||
|
||||
@@ -4,12 +4,19 @@ using Bit.Android.Controls;
|
||||
using Bit.App.Controls;
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Platform.Android;
|
||||
using Android.Text.Method;
|
||||
using Android.Views;
|
||||
using Android.Content;
|
||||
|
||||
[assembly: ExportRenderer(typeof(ExtendedEditor), typeof(ExtendedEditorRenderer))]
|
||||
namespace Bit.Android.Controls
|
||||
{
|
||||
public class ExtendedEditorRenderer : EditorRenderer
|
||||
{
|
||||
public ExtendedEditorRenderer(Context context)
|
||||
: base(context)
|
||||
{ }
|
||||
|
||||
protected override void OnElementChanged(ElementChangedEventArgs<Editor> e)
|
||||
{
|
||||
base.OnElementChanged(e);
|
||||
@@ -17,6 +24,7 @@ namespace Bit.Android.Controls
|
||||
var view = (ExtendedEditor)Element;
|
||||
|
||||
SetBorder(view);
|
||||
SetScrollable();
|
||||
}
|
||||
|
||||
protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
|
||||
@@ -44,5 +52,35 @@ namespace Bit.Android.Controls
|
||||
Control.SetBackgroundColor(global::Android.Graphics.Color.Transparent);
|
||||
}
|
||||
}
|
||||
|
||||
private void SetScrollable()
|
||||
{
|
||||
// While scrolling inside Editor stop scrolling parent view.
|
||||
Control.OverScrollMode = OverScrollMode.Always;
|
||||
Control.ScrollBarStyle = ScrollbarStyles.InsideInset;
|
||||
Control.SetOnTouchListener(new EditorTouchListener());
|
||||
|
||||
// For Scrolling in Editor innner area
|
||||
Control.VerticalScrollBarEnabled = true;
|
||||
Control.ScrollBarStyle = ScrollbarStyles.InsideInset;
|
||||
|
||||
// Force scrollbars to be displayed
|
||||
var arr = Control.Context.Theme.ObtainStyledAttributes(new int[0]);
|
||||
InitializeScrollbars(arr);
|
||||
arr.Recycle();
|
||||
}
|
||||
|
||||
public class EditorTouchListener : Java.Lang.Object, IOnTouchListener
|
||||
{
|
||||
public bool OnTouch(global::Android.Views.View v, MotionEvent e)
|
||||
{
|
||||
v.Parent?.RequestDisallowInterceptTouchEvent(true);
|
||||
if((e.Action & MotionEventActions.Up) != 0 && (e.ActionMasked & MotionEventActions.Up) != 0)
|
||||
{
|
||||
v.Parent?.RequestDisallowInterceptTouchEvent(false);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using Android.Content;
|
||||
using Android.Graphics;
|
||||
using Android.Text;
|
||||
using Android.Text.Method;
|
||||
@@ -8,6 +9,7 @@ using Android.Widget;
|
||||
using Bit.Android.Controls;
|
||||
using Bit.App.Controls;
|
||||
using Bit.App.Enums;
|
||||
using Plugin.CurrentActivity;
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Platform.Android;
|
||||
|
||||
@@ -16,6 +18,10 @@ namespace Bit.Android.Controls
|
||||
{
|
||||
public class ExtendedEntryRenderer : EntryRenderer
|
||||
{
|
||||
public ExtendedEntryRenderer(Context context)
|
||||
: base(context)
|
||||
{ }
|
||||
|
||||
private bool _isPassword;
|
||||
private bool _toggledPassword;
|
||||
private bool _isDisposed;
|
||||
@@ -55,12 +61,22 @@ namespace Bit.Android.Controls
|
||||
Control.SetRawInputType(Control.InputType |= InputTypes.TextFlagNoSuggestions);
|
||||
}
|
||||
|
||||
if(_view.IsPassword)
|
||||
{
|
||||
Control.SetRawInputType(InputTypes.TextFlagNoSuggestions | InputTypes.TextVariationVisiblePassword);
|
||||
}
|
||||
|
||||
_view.ToggleIsPassword += ToggleIsPassword;
|
||||
|
||||
if(_view.FontFamily == "monospace")
|
||||
{
|
||||
Control.Typeface = Typeface.Monospace;
|
||||
}
|
||||
|
||||
if(_view.HideCursor)
|
||||
{
|
||||
Control.SetCursorVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
private void ToggleIsPassword(object sender, EventArgs e)
|
||||
@@ -69,6 +85,7 @@ namespace Bit.Android.Controls
|
||||
var cursorEnd = Control.SelectionEnd;
|
||||
|
||||
Control.TransformationMethod = _isPassword ? null : new PasswordTransformationMethod();
|
||||
Control.SetRawInputType(InputTypes.TextFlagNoSuggestions | InputTypes.TextVariationVisiblePassword);
|
||||
|
||||
// set focus
|
||||
Control.RequestFocus();
|
||||
@@ -85,11 +102,9 @@ namespace Bit.Android.Controls
|
||||
}
|
||||
|
||||
// show keyboard
|
||||
var app = XLabs.Ioc.Resolver.Resolve<global::Android.App.Application>();
|
||||
var inputMethodManager =
|
||||
app.GetSystemService(global::Android.Content.Context.InputMethodService) as InputMethodManager;
|
||||
inputMethodManager.ShowSoftInput(Control, ShowFlags.Forced);
|
||||
inputMethodManager.ToggleSoftInput(ShowFlags.Forced, HideSoftInputFlags.ImplicitOnly);
|
||||
var imm = CrossCurrentActivity.Current.Activity.GetSystemService(Context.InputMethodService) as InputMethodManager;
|
||||
imm.ShowSoftInput(Control, ShowFlags.Forced);
|
||||
imm.ToggleSoftInput(ShowFlags.Forced, HideSoftInputFlags.ImplicitOnly);
|
||||
|
||||
_isPassword = _view.IsPasswordFromToggled = !_isPassword;
|
||||
_toggledPassword = true;
|
||||
@@ -97,7 +112,7 @@ namespace Bit.Android.Controls
|
||||
|
||||
private void Control_EditorAction(object sender, TextView.EditorActionEventArgs e)
|
||||
{
|
||||
if(_view.ReturnType != ReturnType.Next)
|
||||
if(_view.TargetReturnType != Bit.App.Enums.ReturnType.Next)
|
||||
{
|
||||
_view.Unfocus();
|
||||
}
|
||||
@@ -150,23 +165,23 @@ namespace Bit.Android.Controls
|
||||
|
||||
private void SetReturnType(ExtendedEntry view)
|
||||
{
|
||||
if(view.ReturnType.HasValue)
|
||||
if(view.TargetReturnType.HasValue)
|
||||
{
|
||||
switch(view.ReturnType.Value)
|
||||
switch(view.TargetReturnType.Value)
|
||||
{
|
||||
case ReturnType.Go:
|
||||
case App.Enums.ReturnType.Go:
|
||||
Control.ImeOptions = ImeAction.Go;
|
||||
Control.SetImeActionLabel("Go", ImeAction.Go);
|
||||
break;
|
||||
case ReturnType.Next:
|
||||
case App.Enums.ReturnType.Next:
|
||||
Control.ImeOptions = ImeAction.Next;
|
||||
Control.SetImeActionLabel("Next", ImeAction.Next);
|
||||
break;
|
||||
case ReturnType.Search:
|
||||
case App.Enums.ReturnType.Search:
|
||||
Control.ImeOptions = ImeAction.Search;
|
||||
Control.SetImeActionLabel("Search", ImeAction.Search);
|
||||
break;
|
||||
case ReturnType.Send:
|
||||
case App.Enums.ReturnType.Send:
|
||||
Control.ImeOptions = ImeAction.Send;
|
||||
Control.SetImeActionLabel("Send", ImeAction.Send);
|
||||
break;
|
||||
@@ -191,7 +206,7 @@ namespace Bit.Android.Controls
|
||||
|
||||
private void SetMaxLength(ExtendedEntry view)
|
||||
{
|
||||
Control.SetFilters(new IInputFilter[] { new InputFilterLengthFilter(view.MaxLength) });
|
||||
Control.SetFilters(new IInputFilter[] { new InputFilterLengthFilter(view.TargetMaxLength) });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
33
src/Android/Controls/ExtendedListViewRenderer.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using Bit.Android.Controls;
|
||||
using Bit.App.Controls;
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Platform.Android;
|
||||
using Android.Content;
|
||||
using Android.Views;
|
||||
|
||||
[assembly: ExportRenderer(typeof(ExtendedListView), typeof(ExtendedListViewRenderer))]
|
||||
namespace Bit.Android.Controls
|
||||
{
|
||||
public class ExtendedListViewRenderer : ListViewRenderer
|
||||
{
|
||||
public ExtendedListViewRenderer(Context context)
|
||||
: base(context)
|
||||
{ }
|
||||
|
||||
protected override void OnElementChanged(ElementChangedEventArgs<ListView> e)
|
||||
{
|
||||
base.OnElementChanged(e);
|
||||
|
||||
if(e.NewElement is ExtendedListView listView)
|
||||
{
|
||||
if(listView.BottomPadding > 0)
|
||||
{
|
||||
Control.SetPadding(0, 0, 0, listView.BottomPadding);
|
||||
Control.SetClipToPadding(false);
|
||||
Control.ScrollBarStyle = ScrollbarStyles.OutsideOverlay;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using Android.Content;
|
||||
using Bit.Android.Controls;
|
||||
using Bit.App.Controls;
|
||||
using Xamarin.Forms;
|
||||
@@ -10,6 +11,10 @@ namespace Bit.Android.Controls
|
||||
{
|
||||
public class ExtendedPickerRenderer : PickerRenderer
|
||||
{
|
||||
public ExtendedPickerRenderer(Context context)
|
||||
: base(context)
|
||||
{ }
|
||||
|
||||
protected override void OnElementChanged(ElementChangedEventArgs<Picker> e)
|
||||
{
|
||||
base.OnElementChanged(e);
|
||||
|
||||
@@ -2,88 +2,434 @@
|
||||
using Bit.Android.Controls;
|
||||
using Bit.App.Controls;
|
||||
using Xamarin.Forms;
|
||||
using Com.Ittianyu.Bottomnavigationviewex;
|
||||
using Xamarin.Forms.Platform.Android;
|
||||
using Android.Support.Design.Widget;
|
||||
using Xamarin.Forms.Platform.Android.AppCompat;
|
||||
using System.Reflection;
|
||||
using RelativeLayout = Android.Widget.RelativeLayout;
|
||||
using Platform = Xamarin.Forms.Platform.Android.Platform;
|
||||
using Android.Content;
|
||||
using Android.Views;
|
||||
using Android.Widget;
|
||||
using Android.Support.Design.Internal;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.ComponentModel;
|
||||
using Android.Support.Design.Widget;
|
||||
|
||||
[assembly: ExportRenderer(typeof(ExtendedTabbedPage), typeof(ExtendedTabbedPageRenderer))]
|
||||
namespace Bit.Android.Controls
|
||||
{
|
||||
public class ExtendedTabbedPageRenderer : TabbedPageRenderer, TabLayout.IOnTabSelectedListener
|
||||
public class ExtendedTabbedPageRenderer : VisualElementRenderer<ExtendedTabbedPage>,
|
||||
BottomNavigationView.IOnNavigationItemSelectedListener
|
||||
{
|
||||
private TabLayout _tabLayout;
|
||||
public static bool ShouldUpdateSelectedIcon;
|
||||
public static Action<IMenuItem, FileImageSource, bool> MenuItemIconSetter;
|
||||
public static float? BottomBarHeight = 50;
|
||||
|
||||
protected override void OnElementChanged(ElementChangedEventArgs<TabbedPage> e)
|
||||
private RelativeLayout _rootLayout;
|
||||
private FrameLayout _pageContainer;
|
||||
private BottomNavigationViewEx _bottomNav;
|
||||
private readonly int _barId;
|
||||
|
||||
public static global::Android.Graphics.Color? BackgroundColor;
|
||||
|
||||
public ExtendedTabbedPageRenderer(Context context)
|
||||
: base(context)
|
||||
{
|
||||
AutoPackage = false;
|
||||
_barId = GenerateViewId();
|
||||
}
|
||||
|
||||
IPageController TabbedController => Element as IPageController;
|
||||
public int LastSelectedIndex { get; internal set; }
|
||||
|
||||
public bool OnNavigationItemSelected(IMenuItem item)
|
||||
{
|
||||
this.SwitchPage(item);
|
||||
return true;
|
||||
}
|
||||
|
||||
internal void SetupTabItems()
|
||||
{
|
||||
this.SetupTabItems(_bottomNav);
|
||||
}
|
||||
|
||||
internal void SetupBottomBar()
|
||||
{
|
||||
_bottomNav = this.SetupBottomBar(_rootLayout, _bottomNav, _barId);
|
||||
}
|
||||
|
||||
public static readonly Action<IMenuItem, FileImageSource, bool> DefaultMenuItemIconSetter = (menuItem, icon, selected) =>
|
||||
{
|
||||
var tabIconId = ResourceUtils.IdFromTitle(icon, ResourceManager.DrawableClass);
|
||||
menuItem.SetIcon(tabIconId);
|
||||
};
|
||||
|
||||
protected override void OnElementChanged(ElementChangedEventArgs<ExtendedTabbedPage> e)
|
||||
{
|
||||
base.OnElementChanged(e);
|
||||
var view = (ExtendedTabbedPage)Element;
|
||||
|
||||
var field = typeof(ExtendedTabbedPageRenderer).BaseType.GetField("_tabLayout",
|
||||
BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
_tabLayout = field?.GetValue(this) as TabLayout;
|
||||
if(_tabLayout != null)
|
||||
if(e.OldElement != null)
|
||||
{
|
||||
var tab = _tabLayout.GetTabAt(0);
|
||||
SetSelectedTabIcon(tab, Element.Children[0].Icon, true);
|
||||
e.OldElement.ChildAdded -= PagesChanged;
|
||||
e.OldElement.ChildRemoved -= PagesChanged;
|
||||
e.OldElement.ChildrenReordered -= PagesChanged;
|
||||
}
|
||||
}
|
||||
|
||||
void TabLayout.IOnTabSelectedListener.OnTabSelected(TabLayout.Tab tab)
|
||||
{
|
||||
if(Element == null)
|
||||
if(e.NewElement == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var selectedIndex = tab.Position;
|
||||
var child = Element.Children[selectedIndex];
|
||||
if(Element.Children.Count > selectedIndex && selectedIndex >= 0)
|
||||
UpdateIgnoreContainerAreas();
|
||||
|
||||
if(_rootLayout == null)
|
||||
{
|
||||
Element.CurrentPage = Element.Children[selectedIndex];
|
||||
SetupNativeView();
|
||||
}
|
||||
|
||||
SetSelectedTabIcon(tab, child.Icon, true);
|
||||
this.HandlePagesChanged();
|
||||
SwitchContent(Element.CurrentPage);
|
||||
|
||||
Element.ChildAdded += PagesChanged;
|
||||
Element.ChildRemoved += PagesChanged;
|
||||
Element.ChildrenReordered += PagesChanged;
|
||||
}
|
||||
|
||||
void TabLayout.IOnTabSelectedListener.OnTabUnselected(TabLayout.Tab tab)
|
||||
protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
|
||||
{
|
||||
var child = Element.Children[tab.Position];
|
||||
SetSelectedTabIcon(tab, child.Icon, false);
|
||||
base.OnElementPropertyChanged(sender, e);
|
||||
if(e.PropertyName == nameof(TabbedPage.CurrentPage))
|
||||
{
|
||||
SwitchContent(Element.CurrentPage);
|
||||
}
|
||||
}
|
||||
|
||||
private void SetSelectedTabIcon(TabLayout.Tab tab, string icon, bool selected)
|
||||
void PagesChanged(object sender, EventArgs e)
|
||||
{
|
||||
if(string.IsNullOrEmpty(icon))
|
||||
this.HandlePagesChanged();
|
||||
}
|
||||
|
||||
protected override void OnAttachedToWindow()
|
||||
{
|
||||
base.OnAttachedToWindow();
|
||||
TabbedController?.SendAppearing();
|
||||
}
|
||||
|
||||
protected override void OnDetachedFromWindow()
|
||||
{
|
||||
base.OnDetachedFromWindow();
|
||||
TabbedController?.SendDisappearing();
|
||||
}
|
||||
|
||||
protected override void OnLayout(bool changed, int left, int top, int right, int bottom)
|
||||
{
|
||||
var width = right - left;
|
||||
var height = bottom - top;
|
||||
|
||||
base.OnLayout(changed, left, top, right, bottom);
|
||||
if(width <= 0 || height <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(selected)
|
||||
this.Layout(width, height);
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if(disposing)
|
||||
{
|
||||
var selectedResource = IdFromTitle(string.Format("{0}_selected", icon), ResourceManager.DrawableClass);
|
||||
if(selectedResource != 0)
|
||||
Element.ChildAdded -= PagesChanged;
|
||||
Element.ChildRemoved -= PagesChanged;
|
||||
Element.ChildrenReordered -= PagesChanged;
|
||||
|
||||
if(_rootLayout != null)
|
||||
{
|
||||
tab.SetIcon(selectedResource);
|
||||
return;
|
||||
RemoveAllViews();
|
||||
foreach(Page pageToRemove in Element.Children)
|
||||
{
|
||||
var pageRenderer = Platform.GetRenderer(pageToRemove);
|
||||
if(pageRenderer != null)
|
||||
{
|
||||
pageRenderer.View.RemoveFromParent();
|
||||
pageRenderer.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
if(_bottomNav != null)
|
||||
{
|
||||
_bottomNav.SetOnNavigationItemSelectedListener(null);
|
||||
_bottomNav.Dispose();
|
||||
_bottomNav = null;
|
||||
}
|
||||
_rootLayout.Dispose();
|
||||
_rootLayout = null;
|
||||
}
|
||||
}
|
||||
|
||||
var resource = IdFromTitle(icon, ResourceManager.DrawableClass);
|
||||
tab.SetIcon(resource);
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
private int IdFromTitle(string title, Type type)
|
||||
internal void SetupNativeView()
|
||||
{
|
||||
var name = System.IO.Path.GetFileNameWithoutExtension(title);
|
||||
return GetId(type, name);
|
||||
_rootLayout = this.CreateRoot(_barId, GenerateViewId(), out _pageContainer);
|
||||
AddView(_rootLayout);
|
||||
}
|
||||
|
||||
private int GetId(Type type, string propertyName)
|
||||
void SwitchContent(Page page)
|
||||
{
|
||||
this.ChangePage(_pageContainer, page);
|
||||
}
|
||||
|
||||
void UpdateIgnoreContainerAreas()
|
||||
{
|
||||
foreach(var child in Element.Children)
|
||||
{
|
||||
child.IgnoresContainerArea = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal static class TabExtensions
|
||||
{
|
||||
public static Rectangle CreateRect(this Context context, int width, int height)
|
||||
{
|
||||
return new Rectangle(0, 0, context.FromPixels(width), context.FromPixels(height));
|
||||
}
|
||||
|
||||
public static void HandlePagesChanged(this ExtendedTabbedPageRenderer renderer)
|
||||
{
|
||||
renderer.SetupBottomBar();
|
||||
renderer.SetupTabItems();
|
||||
|
||||
if(renderer.Element.Children.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
EnsureTabIndex(renderer);
|
||||
}
|
||||
|
||||
static void EnsureTabIndex(ExtendedTabbedPageRenderer renderer)
|
||||
{
|
||||
var rootLayout = (RelativeLayout)renderer.GetChildAt(0);
|
||||
var bottomNav = (BottomNavigationViewEx)rootLayout.GetChildAt(1);
|
||||
var menu = (BottomNavigationMenu)bottomNav.Menu;
|
||||
|
||||
var itemIndex = menu.FindItemIndex(bottomNav.SelectedItemId);
|
||||
var pageIndex = renderer.Element.Children.IndexOf(renderer.Element.CurrentPage);
|
||||
if(pageIndex >= 0 && pageIndex != itemIndex && pageIndex < bottomNav.ItemCount)
|
||||
{
|
||||
var menuItem = menu.GetItem(pageIndex);
|
||||
bottomNav.SelectedItemId = menuItem.ItemId;
|
||||
|
||||
if(ExtendedTabbedPageRenderer.ShouldUpdateSelectedIcon && ExtendedTabbedPageRenderer.MenuItemIconSetter != null)
|
||||
{
|
||||
ExtendedTabbedPageRenderer.MenuItemIconSetter?.Invoke(menuItem, renderer.Element.CurrentPage.Icon, true);
|
||||
|
||||
if(renderer.LastSelectedIndex != pageIndex)
|
||||
{
|
||||
var lastSelectedPage = renderer.Element.Children[renderer.LastSelectedIndex];
|
||||
var lastSelectedMenuItem = menu.GetItem(renderer.LastSelectedIndex);
|
||||
ExtendedTabbedPageRenderer.MenuItemIconSetter?.Invoke(lastSelectedMenuItem, lastSelectedPage.Icon, false);
|
||||
renderer.LastSelectedIndex = pageIndex;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void SwitchPage(this ExtendedTabbedPageRenderer renderer, IMenuItem item)
|
||||
{
|
||||
var rootLayout = (RelativeLayout)renderer.GetChildAt(0);
|
||||
var bottomNav = (BottomNavigationViewEx)rootLayout.GetChildAt(1);
|
||||
var menu = (BottomNavigationMenu)bottomNav.Menu;
|
||||
|
||||
var index = menu.FindItemIndex(item.ItemId);
|
||||
var pageIndex = index % renderer.Element.Children.Count;
|
||||
var currentPageIndex = renderer.Element.Children.IndexOf(renderer.Element.CurrentPage);
|
||||
|
||||
if(currentPageIndex != pageIndex)
|
||||
{
|
||||
renderer.Element.CurrentPage = renderer.Element.Children[pageIndex];
|
||||
}
|
||||
}
|
||||
|
||||
public static void Layout(this ExtendedTabbedPageRenderer renderer, int width, int height)
|
||||
{
|
||||
var rootLayout = (RelativeLayout)renderer.GetChildAt(0);
|
||||
var bottomNav = (BottomNavigationViewEx)rootLayout.GetChildAt(1);
|
||||
|
||||
var Context = renderer.Context;
|
||||
|
||||
rootLayout.Measure(MakeMeasureSpec(width, MeasureSpecMode.Exactly),
|
||||
MakeMeasureSpec(height, MeasureSpecMode.AtMost));
|
||||
|
||||
((IPageController)renderer.Element).ContainerArea =
|
||||
Context.CreateRect(rootLayout.MeasuredWidth, rootLayout.GetChildAt(0).MeasuredHeight);
|
||||
|
||||
rootLayout.Measure(MakeMeasureSpec(width, MeasureSpecMode.Exactly),
|
||||
MakeMeasureSpec(height, MeasureSpecMode.Exactly));
|
||||
rootLayout.Layout(0, 0, rootLayout.MeasuredWidth, rootLayout.MeasuredHeight);
|
||||
|
||||
if(renderer.Element.Children.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int tabsHeight = bottomNav.MeasuredHeight;
|
||||
|
||||
var item = (ViewGroup)bottomNav.GetChildAt(0);
|
||||
item.Measure(MakeMeasureSpec(width, MeasureSpecMode.Exactly),
|
||||
MakeMeasureSpec(tabsHeight, MeasureSpecMode.Exactly));
|
||||
|
||||
item.Layout(0, 0, width, tabsHeight);
|
||||
int item_w = width / item.ChildCount;
|
||||
for(int i = 0; i < item.ChildCount; i++)
|
||||
{
|
||||
var frame = (FrameLayout)item.GetChildAt(i);
|
||||
frame.Measure(MakeMeasureSpec(item_w, MeasureSpecMode.Exactly),
|
||||
MakeMeasureSpec(tabsHeight, MeasureSpecMode.Exactly));
|
||||
frame.Layout(i * item_w, 0, i * item_w + item_w, tabsHeight);
|
||||
}
|
||||
}
|
||||
|
||||
public static void SetupTabItems(this ExtendedTabbedPageRenderer renderer, BottomNavigationViewEx bottomNav)
|
||||
{
|
||||
var element = renderer.Element;
|
||||
var menu = (BottomNavigationMenu)bottomNav.Menu;
|
||||
menu.ClearAll();
|
||||
|
||||
var tabsCount = Math.Min(element.Children.Count, bottomNav.MaxItemCount);
|
||||
for(int i = 0; i < tabsCount; i++)
|
||||
{
|
||||
var page = element.Children[i];
|
||||
var menuItem = menu.Add(0, i, 0, page.Title);
|
||||
var setter = ExtendedTabbedPageRenderer.MenuItemIconSetter ?? ExtendedTabbedPageRenderer.DefaultMenuItemIconSetter;
|
||||
setter.Invoke(menuItem, page.Icon, renderer.LastSelectedIndex == i);
|
||||
}
|
||||
|
||||
if(element.Children.Count > 0)
|
||||
{
|
||||
bottomNav.EnableShiftingMode(false);
|
||||
bottomNav.EnableItemShiftingMode(false);
|
||||
bottomNav.EnableAnimation(false);
|
||||
bottomNav.SetTextVisibility(false);
|
||||
bottomNav.SetBackgroundResource(Resource.Drawable.bottom_nav_bg);
|
||||
bottomNav.SetIconSize(24, 24);
|
||||
bottomNav.SetIconsMarginTop(32);
|
||||
|
||||
if(element.Children.Count > 3)
|
||||
{
|
||||
bottomNav.SetIconSizeAt(3, 29, 29);
|
||||
bottomNav.SetIconMarginTop(3, 28);
|
||||
}
|
||||
|
||||
var stateList = new global::Android.Content.Res.ColorStateList(
|
||||
new int[][] {
|
||||
new int[] { global::Android.Resource.Attribute.StateChecked },
|
||||
new int[] { global::Android.Resource.Attribute.StateEnabled}
|
||||
},
|
||||
new int[] {
|
||||
element.TintColor.ToAndroid(), // Selected
|
||||
Color.FromHex("A1A1A1").ToAndroid() // Normal
|
||||
});
|
||||
|
||||
bottomNav.ItemIconTintList = stateList;
|
||||
}
|
||||
}
|
||||
|
||||
public static BottomNavigationViewEx SetupBottomBar(this ExtendedTabbedPageRenderer renderer,
|
||||
global::Android.Widget.RelativeLayout rootLayout, BottomNavigationViewEx bottomNav, int barId)
|
||||
{
|
||||
if(bottomNav != null)
|
||||
{
|
||||
rootLayout.RemoveView(bottomNav);
|
||||
bottomNav.SetOnNavigationItemSelectedListener(null);
|
||||
}
|
||||
|
||||
var barParams = new global::Android.Widget.RelativeLayout.LayoutParams(
|
||||
ViewGroup.LayoutParams.MatchParent,
|
||||
ExtendedTabbedPageRenderer.BottomBarHeight.HasValue ?
|
||||
(int)rootLayout.Context.ToPixels(ExtendedTabbedPageRenderer.BottomBarHeight.Value) :
|
||||
ViewGroup.LayoutParams.WrapContent);
|
||||
barParams.AddRule(LayoutRules.AlignParentBottom);
|
||||
bottomNav = new BottomNavigationViewEx(rootLayout.Context)
|
||||
{
|
||||
LayoutParameters = barParams,
|
||||
Id = barId
|
||||
};
|
||||
if(ExtendedTabbedPageRenderer.BackgroundColor.HasValue)
|
||||
{
|
||||
bottomNav.SetBackgroundColor(ExtendedTabbedPageRenderer.BackgroundColor.Value);
|
||||
}
|
||||
|
||||
bottomNav.SetOnNavigationItemSelectedListener(renderer);
|
||||
rootLayout.AddView(bottomNav, 1, barParams);
|
||||
|
||||
return bottomNav;
|
||||
}
|
||||
|
||||
public static void ChangePage(this ExtendedTabbedPageRenderer renderer, FrameLayout pageContainer, Page page)
|
||||
{
|
||||
renderer.Context.HideKeyboard(renderer);
|
||||
if(page == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(Platform.GetRenderer(page) == null)
|
||||
{
|
||||
Platform.SetRenderer(page, Platform.CreateRendererWithContext(page, renderer.Context));
|
||||
}
|
||||
|
||||
var pageContent = Platform.GetRenderer(page).View;
|
||||
pageContainer.AddView(pageContent);
|
||||
if(pageContainer.ChildCount > 1)
|
||||
{
|
||||
pageContainer.RemoveViewAt(0);
|
||||
}
|
||||
|
||||
EnsureTabIndex(renderer);
|
||||
}
|
||||
|
||||
public static RelativeLayout CreateRoot(this ExtendedTabbedPageRenderer renderer, int barId, int pageContainerId, out FrameLayout pageContainer)
|
||||
{
|
||||
var rootLayout = new RelativeLayout(renderer.Context)
|
||||
{
|
||||
LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent),
|
||||
};
|
||||
|
||||
var pageParams = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent);
|
||||
pageParams.AddRule(LayoutRules.Above, barId);
|
||||
pageContainer = new FrameLayout(renderer.Context)
|
||||
{
|
||||
LayoutParameters = pageParams,
|
||||
Id = pageContainerId
|
||||
};
|
||||
|
||||
rootLayout.AddView(pageContainer, 0, pageParams);
|
||||
return rootLayout;
|
||||
}
|
||||
|
||||
private static int MakeMeasureSpec(int size, MeasureSpecMode mode)
|
||||
{
|
||||
return size + (int)mode;
|
||||
}
|
||||
}
|
||||
|
||||
public static class ResourceUtils
|
||||
{
|
||||
public static int IdFromTitle(string title, Type type)
|
||||
{
|
||||
var name = Path.GetFileNameWithoutExtension(title);
|
||||
var id = GetId(type, name);
|
||||
return id;
|
||||
}
|
||||
|
||||
public static int GetId(Type type, string propertyName)
|
||||
{
|
||||
var props = type.GetFields();
|
||||
var prop = props.FirstOrDefault(p => p.Name == propertyName);
|
||||
var prop = props.Select(p => p).FirstOrDefault(p => p.Name == propertyName);
|
||||
if(prop != null)
|
||||
{
|
||||
return (int)prop.GetValue(type);
|
||||
|
||||
@@ -14,11 +14,25 @@ namespace Bit.Android.Controls
|
||||
{
|
||||
public class ExtendedTableViewRenderer : TableViewRenderer
|
||||
{
|
||||
public ExtendedTableViewRenderer(Context context)
|
||||
: base(context)
|
||||
{ }
|
||||
|
||||
protected override void OnElementChanged(ElementChangedEventArgs<TableView> e)
|
||||
{
|
||||
base.OnElementChanged(e);
|
||||
Control.Divider = null;
|
||||
Control.DividerHeight = 0;
|
||||
|
||||
if(e.NewElement is ExtendedTableView tableView)
|
||||
{
|
||||
if(tableView.BottomPadding > 0)
|
||||
{
|
||||
Control.SetPadding(0, 0, 0, tableView.BottomPadding);
|
||||
Control.SetClipToPadding(false);
|
||||
Control.ScrollBarStyle = ScrollbarStyles.OutsideOverlay;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override TableViewModelRenderer GetModelRenderer(AListView listView, TableView view)
|
||||
|
||||
78
src/Android/Controls/HybridWebViewRenderer.cs
Normal file
@@ -0,0 +1,78 @@
|
||||
using System;
|
||||
using Bit.Android.Controls;
|
||||
using Bit.App.Controls;
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Platform.Android;
|
||||
using Android.Webkit;
|
||||
using AWebkit = Android.Webkit;
|
||||
using Java.Interop;
|
||||
using Android.Content;
|
||||
using Plugin.CurrentActivity;
|
||||
|
||||
[assembly: ExportRenderer(typeof(HybridWebView), typeof(HybridWebViewRenderer))]
|
||||
namespace Bit.Android.Controls
|
||||
{
|
||||
public class HybridWebViewRenderer : ViewRenderer<HybridWebView, AWebkit.WebView>
|
||||
{
|
||||
private const string JSFunction = "function invokeCSharpAction(data){jsBridge.invokeAction(data);}";
|
||||
|
||||
public HybridWebViewRenderer(Context context)
|
||||
: base(context)
|
||||
{ }
|
||||
|
||||
protected override void OnElementChanged(ElementChangedEventArgs<HybridWebView> e)
|
||||
{
|
||||
base.OnElementChanged(e);
|
||||
|
||||
if(Control == null)
|
||||
{
|
||||
var webView = new AWebkit.WebView(CrossCurrentActivity.Current.Activity);
|
||||
webView.Settings.JavaScriptEnabled = true;
|
||||
SetNativeControl(webView);
|
||||
}
|
||||
|
||||
if(e.OldElement != null)
|
||||
{
|
||||
Control.RemoveJavascriptInterface("jsBridge");
|
||||
var hybridWebView = e.OldElement as HybridWebView;
|
||||
hybridWebView.Cleanup();
|
||||
}
|
||||
|
||||
if(e.NewElement != null)
|
||||
{
|
||||
Control.AddJavascriptInterface(new JSBridge(this), "jsBridge");
|
||||
Control.LoadUrl(Element.Uri);
|
||||
InjectJS(JSFunction);
|
||||
}
|
||||
}
|
||||
|
||||
private void InjectJS(string script)
|
||||
{
|
||||
if(Control != null)
|
||||
{
|
||||
Control.LoadUrl(string.Format("javascript: {0}", script));
|
||||
}
|
||||
}
|
||||
|
||||
public class JSBridge : Java.Lang.Object
|
||||
{
|
||||
private readonly WeakReference<HybridWebViewRenderer> _hybridWebViewRenderer;
|
||||
|
||||
public JSBridge(HybridWebViewRenderer hybridRenderer)
|
||||
{
|
||||
_hybridWebViewRenderer = new WeakReference<HybridWebViewRenderer>(hybridRenderer);
|
||||
}
|
||||
|
||||
[JavascriptInterface]
|
||||
[Export("invokeAction")]
|
||||
public void InvokeAction(string data)
|
||||
{
|
||||
HybridWebViewRenderer hybridRenderer;
|
||||
if(_hybridWebViewRenderer != null && _hybridWebViewRenderer.TryGetTarget(out hybridRenderer))
|
||||
{
|
||||
hybridRenderer.Element.InvokeAction(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,774 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Android.Runtime;
|
||||
using Java.IO;
|
||||
using Java.Net;
|
||||
using Java.Security;
|
||||
using Java.Security.Cert;
|
||||
using Javax.Net.Ssl;
|
||||
|
||||
namespace Xamarin.Android.Net
|
||||
{
|
||||
/// <summary>
|
||||
/// A custom implementation of <see cref="System.Net.Http.HttpClientHandler"/> which internally uses <see cref="Java.Net.HttpURLConnection"/>
|
||||
/// (or its HTTPS incarnation) to send HTTP requests.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>Instance of this class is used to configure <see cref="System.Net.Http.HttpClient"/> instance
|
||||
/// in the following way:
|
||||
///
|
||||
/// <example>
|
||||
/// var handler = new AndroidClientHandler {
|
||||
/// UseCookies = true,
|
||||
/// AutomaticDecompression = DecompressionMethods.Deflate | DecompressionMethods.GZip,
|
||||
/// };
|
||||
///
|
||||
/// var httpClient = new HttpClient (handler);
|
||||
/// var response = httpClient.GetAsync ("http://example.com")?.Result as AndroidHttpResponseMessage;
|
||||
/// </example></para>
|
||||
/// <para>
|
||||
/// The class supports pre-authentication of requests albeit in a slightly "manual" way. Namely, whenever a request to a server requiring authentication
|
||||
/// is made and no authentication credentials are provided in the <see cref="PreAuthenticationData"/> property (which is usually the case on the first
|
||||
/// request), the <see cref="RequestNeedsAuthorization"/> property will return <c>true</c> and the <see cref="RequestedAuthentication"/> property will
|
||||
/// contain all the authentication information gathered from the server. The application must then fill in the blanks (i.e. the credentials) and re-send
|
||||
/// the request configured to perform pre-authentication. The reason for this manual process is that the underlying Java HTTP client API supports only a
|
||||
/// single, VM-wide, authentication handler which cannot be configured to handle credentials for several requests. AndroidClientHandler, therefore, implements
|
||||
/// the authentication in managed .NET code. Message handler supports both Basic and Digest authentication. If an authentication scheme that's not supported
|
||||
/// by AndroidClientHandler is requested by the server, the application can provide its own authentication module (<see cref="AuthenticationData"/>,
|
||||
/// <see cref="PreAuthenticationData"/>) to handle the protocol authorization.</para>
|
||||
/// <para>AndroidClientHandler also supports requests to servers with "invalid" (e.g. self-signed) SSL certificates. Since this process is a bit convoluted using
|
||||
/// the Java APIs, AndroidClientHandler defines two ways to handle the situation. First, easier, is to store the necessary certificates (either CA or server certificates)
|
||||
/// in the <see cref="TrustedCerts"/> collection or, after deriving a custom class from AndroidClientHandler, by overriding one or more methods provided for this purpose
|
||||
/// (<see cref="ConfigureTrustManagerFactory"/>, <see cref="ConfigureKeyManagerFactory"/> and <see cref="ConfigureKeyStore"/>). The former method should be sufficient
|
||||
/// for most use cases, the latter allows the application to provide fully customized key store, trust manager and key manager, if needed. Note that the instance of
|
||||
/// AndroidClientHandler configured to accept an "invalid" certificate from the particular server will most likely fail to validate certificates from other servers (even
|
||||
/// if they use a certificate with a fully validated trust chain) unless you store the CA certificates from your Android system in <see cref="TrustedCerts"/> along with
|
||||
/// the self-signed certificate(s).</para>
|
||||
/// </remarks>
|
||||
public class CustomAndroidClientHandler : HttpClientHandler
|
||||
{
|
||||
sealed class RequestRedirectionState
|
||||
{
|
||||
public Uri NewUrl;
|
||||
public int RedirectCounter;
|
||||
public HttpMethod Method;
|
||||
}
|
||||
|
||||
internal const string LOG_APP = "monodroid-net";
|
||||
|
||||
const string GZIP_ENCODING = "gzip";
|
||||
const string DEFLATE_ENCODING = "deflate";
|
||||
const string IDENTITY_ENCODING = "identity";
|
||||
|
||||
static readonly HashSet<string> known_content_headers = new HashSet<string>(StringComparer.OrdinalIgnoreCase) {
|
||||
"Allow",
|
||||
"Content-Disposition",
|
||||
"Content-Encoding",
|
||||
"Content-Language",
|
||||
"Content-Length",
|
||||
"Content-Location",
|
||||
"Content-MD5",
|
||||
"Content-Range",
|
||||
"Content-Type",
|
||||
"Expires",
|
||||
"Last-Modified"
|
||||
};
|
||||
|
||||
static readonly List<IAndroidAuthenticationModule> authModules = new List<IAndroidAuthenticationModule> {
|
||||
new AuthModuleBasic (),
|
||||
// COMMENTED OUT: Kyle
|
||||
//new AuthModuleDigest ()
|
||||
};
|
||||
|
||||
bool disposed;
|
||||
|
||||
// Now all hail Java developers! Get this... HttpURLClient defaults to accepting AND
|
||||
// uncompressing the gzip content encoding UNLESS you set the Accept-Encoding header to ANY
|
||||
// value. So if we set it to 'gzip' below we WILL get gzipped stream but HttpURLClient will NOT
|
||||
// uncompress it any longer, doh. And they don't support 'deflate' so we need to handle it ourselves.
|
||||
bool decompress_here;
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Gets or sets the pre authentication data for the request. This property must be set by the application
|
||||
/// before the request is made. Generally the value can be taken from <see cref="RequestedAuthentication"/>
|
||||
/// after the initial request, without any authentication data, receives the authorization request from the
|
||||
/// server. The application must then store credentials in instance of <see cref="AuthenticationData"/> and
|
||||
/// assign the instance to this propery before retrying the request.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// The property is never set by AndroidClientHandler.
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <value>The pre authentication data.</value>
|
||||
public AuthenticationData PreAuthenticationData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// If the website requires authentication, this property will contain data about each scheme supported
|
||||
/// by the server after the response. Note that unauthorized request will return a valid response - you
|
||||
/// need to check the status code and and (re)configure AndroidClientHandler instance accordingly by providing
|
||||
/// both the credentials and the authentication scheme by setting the <see cref="PreAuthenticationData"/>
|
||||
/// property. If AndroidClientHandler is not able to detect the kind of authentication scheme it will store an
|
||||
/// instance of <see cref="AuthenticationData"/> with its <see cref="AuthenticationData.Scheme"/> property
|
||||
/// set to <c>AuthenticationScheme.Unsupported</c> and the application will be responsible for providing an
|
||||
/// instance of <see cref="IAndroidAuthenticationModule"/> which handles this kind of authorization scheme
|
||||
/// (<see cref="AuthenticationData.AuthModule"/>
|
||||
/// </summary>
|
||||
public IList<AuthenticationData> RequestedAuthentication { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Server authentication response indicates that the request to authorize comes from a proxy if this property is <c>true</c>.
|
||||
/// All the instances of <see cref="AuthenticationData"/> stored in the <see cref="RequestedAuthentication"/> property will
|
||||
/// have their <see cref="AuthenticationData.UseProxyAuthentication"/> preset to the same value as this property.
|
||||
/// </summary>
|
||||
public bool ProxyAuthenticationRequested { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// If <c>true</c> then the server requested authorization and the application must use information
|
||||
/// found in <see cref="RequestedAuthentication"/> to set the value of <see cref="PreAuthenticationData"/>
|
||||
/// </summary>
|
||||
public bool RequestNeedsAuthorization
|
||||
{
|
||||
get { return RequestedAuthentication?.Count > 0; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// If the request is to the server protected with a self-signed (or otherwise untrusted) SSL certificate, the request will
|
||||
/// fail security chain verification unless the application provides either the CA certificate of the entity which issued the
|
||||
/// server's certificate or, alternatively, provides the server public key. Whichever the case, the certificate(s) must be stored
|
||||
/// in this property in order for AndroidClientHandler to configure the request to accept the server certificate.</para>
|
||||
/// <para>AndroidClientHandler uses a custom <see cref="KeyStore"/> and <see cref="TrustManagerFactory"/> to configure the connection.
|
||||
/// If, however, the application requires finer control over the SSL configuration (e.g. it implements its own TrustManager) then
|
||||
/// it should leave this property empty and instead derive a custom class from AndroidClientHandler and override, as needed, the
|
||||
/// <see cref="ConfigureTrustManagerFactory"/>, <see cref="ConfigureKeyManagerFactory"/> and <see cref="ConfigureKeyStore"/> methods
|
||||
/// instead</para>
|
||||
/// </summary>
|
||||
/// <value>The trusted certs.</value>
|
||||
public IList<Certificate> TrustedCerts { get; set; }
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
disposed = true;
|
||||
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
protected void AssertSelf()
|
||||
{
|
||||
if(!disposed)
|
||||
return;
|
||||
throw new ObjectDisposedException(nameof(AndroidClientHandler));
|
||||
}
|
||||
|
||||
string EncodeUrl(Uri url)
|
||||
{
|
||||
if(url == null)
|
||||
return String.Empty;
|
||||
|
||||
if(String.IsNullOrEmpty(url.Query))
|
||||
return Uri.EscapeUriString(url.ToString());
|
||||
|
||||
// UriBuilder takes care of encoding everything properly
|
||||
var bldr = new UriBuilder(url);
|
||||
if(url.IsDefaultPort)
|
||||
bldr.Port = -1; // Avoids adding :80 or :443 to the host name in the result
|
||||
|
||||
// bldr.Uri.ToString () would ruin the good job UriBuilder did
|
||||
return bldr.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates, configures and processes an asynchronous request to the indicated resource.
|
||||
/// </summary>
|
||||
/// <returns>Task in which the request is executed</returns>
|
||||
/// <param name="request">Request provided by <see cref="System.Net.Http.HttpClient"/></param>
|
||||
/// <param name="cancellationToken">Cancellation token.</param>
|
||||
protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
|
||||
{
|
||||
AssertSelf();
|
||||
if(request == null)
|
||||
throw new ArgumentNullException(nameof(request));
|
||||
|
||||
if(!request.RequestUri.IsAbsoluteUri)
|
||||
throw new ArgumentException("Must represent an absolute URI", "request");
|
||||
|
||||
var redirectState = new RequestRedirectionState
|
||||
{
|
||||
NewUrl = request.RequestUri,
|
||||
RedirectCounter = 0,
|
||||
Method = request.Method
|
||||
};
|
||||
while(true)
|
||||
{
|
||||
URL java_url = new URL(EncodeUrl(redirectState.NewUrl));
|
||||
URLConnection java_connection = java_url.OpenConnection();
|
||||
HttpURLConnection httpConnection = await SetupRequestInternal(request, java_connection);
|
||||
HttpResponseMessage response = await ProcessRequest(request, java_url, httpConnection, cancellationToken, redirectState);
|
||||
if(response != null)
|
||||
return response;
|
||||
|
||||
if(redirectState.NewUrl == null)
|
||||
throw new InvalidOperationException("Request redirected but no new URI specified");
|
||||
request.Method = redirectState.Method;
|
||||
}
|
||||
}
|
||||
|
||||
Task<HttpResponseMessage> ProcessRequest(HttpRequestMessage request, URL javaUrl, HttpURLConnection httpConnection, CancellationToken cancellationToken, RequestRedirectionState redirectState)
|
||||
{
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
httpConnection.InstanceFollowRedirects = false; // We handle it ourselves
|
||||
RequestedAuthentication = null;
|
||||
ProxyAuthenticationRequested = false;
|
||||
|
||||
return DoProcessRequest(request, javaUrl, httpConnection, cancellationToken, redirectState);
|
||||
}
|
||||
|
||||
async Task<HttpResponseMessage> DoProcessRequest(HttpRequestMessage request, URL javaUrl, HttpURLConnection httpConnection, CancellationToken cancellationToken, RequestRedirectionState redirectState)
|
||||
{
|
||||
if(cancellationToken.IsCancellationRequested)
|
||||
{
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
await Task.WhenAny(
|
||||
httpConnection.ConnectAsync(),
|
||||
Task.Run(() => { cancellationToken.WaitHandle.WaitOne(); }))
|
||||
.ConfigureAwait(false);
|
||||
}
|
||||
catch(Java.Net.ConnectException ex)
|
||||
{
|
||||
// Wrap it nicely in a "standard" exception so that it's compatible with HttpClientHandler
|
||||
throw new WebException(ex.Message, ex, WebExceptionStatus.ConnectFailure, null);
|
||||
}
|
||||
|
||||
if(cancellationToken.IsCancellationRequested)
|
||||
{
|
||||
httpConnection.Disconnect();
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
}
|
||||
cancellationToken.Register(httpConnection.Disconnect);
|
||||
|
||||
if(httpConnection.DoOutput)
|
||||
{
|
||||
using(var stream = await request.Content.ReadAsStreamAsync())
|
||||
{
|
||||
await stream.CopyToAsync(httpConnection.OutputStream, 4096, cancellationToken)
|
||||
.ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
if(cancellationToken.IsCancellationRequested)
|
||||
{
|
||||
httpConnection.Disconnect();
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
}
|
||||
|
||||
var statusCode = await Task.Run(() => (HttpStatusCode)httpConnection.ResponseCode).ConfigureAwait(false);
|
||||
var connectionUri = new Uri(httpConnection.URL.ToString());
|
||||
|
||||
// If the request was redirected we need to put the new URL in the request
|
||||
request.RequestUri = connectionUri;
|
||||
var ret = new AndroidHttpResponseMessage(javaUrl, httpConnection)
|
||||
{
|
||||
RequestMessage = request,
|
||||
ReasonPhrase = httpConnection.ResponseMessage,
|
||||
StatusCode = statusCode,
|
||||
};
|
||||
|
||||
bool disposeRet;
|
||||
if(HandleRedirect(statusCode, httpConnection, redirectState, out disposeRet))
|
||||
{
|
||||
if(disposeRet)
|
||||
{
|
||||
ret.Dispose();
|
||||
ret = null;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
switch(statusCode)
|
||||
{
|
||||
case HttpStatusCode.Unauthorized:
|
||||
case HttpStatusCode.ProxyAuthenticationRequired:
|
||||
// We don't resend the request since that would require new set of credentials if the
|
||||
// ones provided in Credentials are invalid (or null) and that, in turn, may require asking the
|
||||
// user which is not something that should be taken care of by us and in this
|
||||
// context. The application should be responsible for this.
|
||||
// HttpClientHandler throws an exception in this instance, but I think it's not a good
|
||||
// idea. We'll return the response message with all the information required by the
|
||||
// application to fill in the blanks and provide the requested credentials instead.
|
||||
//
|
||||
// We return the body of the response too, but the Java client will throw
|
||||
// a FileNotFound exception if we attempt to access the input stream.
|
||||
// Instead we try to read the error stream and return an default message if the error stream isn't readable.
|
||||
ret.Content = GetErrorContent(httpConnection, new StringContent("Unauthorized", Encoding.ASCII));
|
||||
CopyHeaders(httpConnection, ret);
|
||||
|
||||
if(ret.Headers.WwwAuthenticate != null)
|
||||
{
|
||||
ProxyAuthenticationRequested = false;
|
||||
CollectAuthInfo(ret.Headers.WwwAuthenticate);
|
||||
}
|
||||
else if(ret.Headers.ProxyAuthenticate != null)
|
||||
{
|
||||
ProxyAuthenticationRequested = true;
|
||||
CollectAuthInfo(ret.Headers.ProxyAuthenticate);
|
||||
}
|
||||
|
||||
// COMMENTED OUT: Kyle
|
||||
//ret.RequestedAuthentication = RequestedAuthentication;
|
||||
return ret;
|
||||
}
|
||||
|
||||
if(!IsErrorStatusCode(statusCode))
|
||||
{
|
||||
ret.Content = GetContent(httpConnection, httpConnection.InputStream);
|
||||
}
|
||||
else
|
||||
{
|
||||
// For 400 >= response code <= 599 the Java client throws the FileNotFound exception when attempting to read from the input stream.
|
||||
// Instead we try to read the error stream and return an empty string if the error stream isn't readable.
|
||||
ret.Content = GetErrorContent(httpConnection, new StringContent(String.Empty, Encoding.ASCII));
|
||||
}
|
||||
|
||||
CopyHeaders(httpConnection, ret);
|
||||
|
||||
IEnumerable<string> cookieHeaderValue;
|
||||
if(!UseCookies || CookieContainer == null || !ret.Headers.TryGetValues("Set-Cookie", out cookieHeaderValue) || cookieHeaderValue == null)
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
CookieContainer.SetCookies(connectionUri, String.Join(",", cookieHeaderValue));
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
// We don't want to terminate the response because of a bad cookie, hence just reporting
|
||||
// the issue. We might consider adding a virtual method to let the user handle the
|
||||
// issue, but not sure if it's really needed. Set-Cookie header will be part of the
|
||||
// header collection so the user can always examine it if they spot an error.
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
HttpContent GetErrorContent(HttpURLConnection httpConnection, HttpContent fallbackContent)
|
||||
{
|
||||
var contentStream = httpConnection.ErrorStream;
|
||||
|
||||
if(contentStream != null)
|
||||
{
|
||||
return GetContent(httpConnection, contentStream);
|
||||
}
|
||||
|
||||
return fallbackContent;
|
||||
}
|
||||
|
||||
HttpContent GetContent(URLConnection httpConnection, Stream contentStream)
|
||||
{
|
||||
Stream inputStream = new BufferedStream(contentStream);
|
||||
if(decompress_here)
|
||||
{
|
||||
string[] encodings = httpConnection.ContentEncoding?.Split(',');
|
||||
if(encodings != null)
|
||||
{
|
||||
if(encodings.Contains(GZIP_ENCODING, StringComparer.OrdinalIgnoreCase))
|
||||
inputStream = new GZipStream(inputStream, CompressionMode.Decompress);
|
||||
else if(encodings.Contains(DEFLATE_ENCODING, StringComparer.OrdinalIgnoreCase))
|
||||
inputStream = new DeflateStream(inputStream, CompressionMode.Decompress);
|
||||
}
|
||||
}
|
||||
return new StreamContent(inputStream);
|
||||
}
|
||||
|
||||
bool HandleRedirect(HttpStatusCode redirectCode, HttpURLConnection httpConnection, RequestRedirectionState redirectState, out bool disposeRet)
|
||||
{
|
||||
if(!AllowAutoRedirect)
|
||||
{
|
||||
disposeRet = false;
|
||||
return true; // We shouldn't follow and there's no data to fetch, just return
|
||||
}
|
||||
disposeRet = true;
|
||||
|
||||
redirectState.NewUrl = null;
|
||||
switch(redirectCode)
|
||||
{
|
||||
case HttpStatusCode.MultipleChoices: // 300
|
||||
break;
|
||||
|
||||
case HttpStatusCode.Moved: // 301
|
||||
case HttpStatusCode.Redirect: // 302
|
||||
case HttpStatusCode.SeeOther: // 303
|
||||
redirectState.Method = HttpMethod.Get;
|
||||
break;
|
||||
|
||||
case HttpStatusCode.TemporaryRedirect: // 307
|
||||
break;
|
||||
|
||||
default:
|
||||
if((int)redirectCode >= 300 && (int)redirectCode < 400)
|
||||
throw new InvalidOperationException($"HTTP Redirection status code {redirectCode} ({(int)redirectCode}) not supported");
|
||||
return false;
|
||||
}
|
||||
|
||||
IDictionary<string, IList<string>> headers = httpConnection.HeaderFields;
|
||||
IList<string> locationHeader;
|
||||
if(!headers.TryGetValue("Location", out locationHeader) || locationHeader == null || locationHeader.Count == 0)
|
||||
throw new InvalidOperationException($"HTTP connection redirected with code {redirectCode} ({(int)redirectCode}) but no Location header found in response");
|
||||
|
||||
|
||||
redirectState.RedirectCounter++;
|
||||
if(redirectState.RedirectCounter >= MaxAutomaticRedirections)
|
||||
throw new WebException($"Maximum automatic redirections exceeded (allowed {MaxAutomaticRedirections}, redirected {redirectState.RedirectCounter} times)");
|
||||
|
||||
Uri location = new Uri(locationHeader[0], UriKind.Absolute);
|
||||
redirectState.NewUrl = location;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool IsErrorStatusCode(HttpStatusCode statusCode)
|
||||
{
|
||||
return (int)statusCode >= 400 && (int)statusCode <= 599;
|
||||
}
|
||||
|
||||
void CollectAuthInfo(HttpHeaderValueCollection<AuthenticationHeaderValue> headers)
|
||||
{
|
||||
var authData = new List<AuthenticationData>(headers.Count);
|
||||
|
||||
foreach(AuthenticationHeaderValue ahv in headers)
|
||||
{
|
||||
var data = new AuthenticationData
|
||||
{
|
||||
Scheme = GetAuthScheme(ahv.Scheme),
|
||||
// COMMENTED OUT: Kyle
|
||||
//Challenge = $"{ahv.Scheme} {ahv.Parameter}",
|
||||
UseProxyAuthentication = ProxyAuthenticationRequested
|
||||
};
|
||||
authData.Add(data);
|
||||
}
|
||||
|
||||
RequestedAuthentication = authData.AsReadOnly();
|
||||
}
|
||||
|
||||
AuthenticationScheme GetAuthScheme(string scheme)
|
||||
{
|
||||
if(String.Compare("basic", scheme, StringComparison.OrdinalIgnoreCase) == 0)
|
||||
return AuthenticationScheme.Basic;
|
||||
if(String.Compare("digest", scheme, StringComparison.OrdinalIgnoreCase) == 0)
|
||||
return AuthenticationScheme.Digest;
|
||||
|
||||
return AuthenticationScheme.Unsupported;
|
||||
}
|
||||
|
||||
void CopyHeaders(HttpURLConnection httpConnection, HttpResponseMessage response)
|
||||
{
|
||||
IDictionary<string, IList<string>> headers = httpConnection.HeaderFields;
|
||||
foreach(string key in headers.Keys)
|
||||
{
|
||||
if(key == null) // First header entry has null key, it corresponds to the response message
|
||||
continue;
|
||||
|
||||
HttpHeaders item_headers;
|
||||
string kind;
|
||||
if(known_content_headers.Contains(key))
|
||||
{
|
||||
kind = "content";
|
||||
item_headers = response.Content.Headers;
|
||||
}
|
||||
else
|
||||
{
|
||||
kind = "response";
|
||||
item_headers = response.Headers;
|
||||
}
|
||||
item_headers.TryAddWithoutValidation(key, headers[key]);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Configure the <see cref="HttpURLConnection"/> before the request is sent. This method is meant to be overriden
|
||||
/// by applications which need to perform some extra configuration steps on the connection. It is called with all
|
||||
/// the request headers set, pre-authentication performed (if applicable) but before the request body is set
|
||||
/// (e.g. for POST requests). The default implementation in AndroidClientHandler does nothing.
|
||||
/// </summary>
|
||||
/// <param name="request">Request data</param>
|
||||
/// <param name="conn">Pre-configured connection instance</param>
|
||||
protected virtual Task SetupRequest(HttpRequestMessage request, HttpURLConnection conn)
|
||||
{
|
||||
return Task.Factory.StartNew(AssertSelf);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Configures the key store. The <paramref name="keyStore"/> parameter is set to instance of <see cref="KeyStore"/>
|
||||
/// created using the <see cref="KeyStore.DefaultType"/> type and with populated with certificates provided in the <see cref="TrustedCerts"/>
|
||||
/// property. AndroidClientHandler implementation simply returns the instance passed in the <paramref name="keyStore"/> parameter
|
||||
/// </summary>
|
||||
/// <returns>The key store.</returns>
|
||||
/// <param name="keyStore">Key store to configure.</param>
|
||||
protected virtual KeyStore ConfigureKeyStore(KeyStore keyStore)
|
||||
{
|
||||
AssertSelf();
|
||||
|
||||
return keyStore;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create and configure an instance of <see cref="KeyManagerFactory"/>. The <paramref name="keyStore"/> parameter is set to the
|
||||
/// return value of the <see cref="ConfigureKeyStore"/> method, so it might be null if the application overrode the method and provided
|
||||
/// no key store. It will not be <c>null</c> when the default implementation is used. The application can return <c>null</c> here since
|
||||
/// KeyManagerFactory is not required for the custom SSL configuration, but it might be used by the application to implement a more advanced
|
||||
/// mechanism of key management.
|
||||
/// </summary>
|
||||
/// <returns>The key manager factory or <c>null</c>.</returns>
|
||||
/// <param name="keyStore">Key store.</param>
|
||||
protected virtual KeyManagerFactory ConfigureKeyManagerFactory(KeyStore keyStore)
|
||||
{
|
||||
AssertSelf();
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create and configure an instance of <see cref="TrustManagerFactory"/>. The <paramref name="keyStore"/> parameter is set to the
|
||||
/// return value of the <see cref="ConfigureKeyStore"/> method, so it might be null if the application overrode the method and provided
|
||||
/// no key store. It will not be <c>null</c> when the default implementation is used. The application can return <c>null</c> from this
|
||||
/// method in which case AndroidClientHandler will create its own instance of the trust manager factory provided that the <see cref="TrustCerts"/>
|
||||
/// list contains at least one valid certificate. If there are no valid certificates and this method returns <c>null</c>, no custom
|
||||
/// trust manager will be created since that would make all the HTTPS requests fail.
|
||||
/// </summary>
|
||||
/// <returns>The trust manager factory.</returns>
|
||||
/// <param name="keyStore">Key store.</param>
|
||||
protected virtual TrustManagerFactory ConfigureTrustManagerFactory(KeyStore keyStore)
|
||||
{
|
||||
AssertSelf();
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
void AppendEncoding(string encoding, ref List<string> list)
|
||||
{
|
||||
if(list == null)
|
||||
list = new List<string>();
|
||||
if(list.Contains(encoding))
|
||||
return;
|
||||
list.Add(encoding);
|
||||
}
|
||||
|
||||
async Task<HttpURLConnection> SetupRequestInternal(HttpRequestMessage request, URLConnection conn)
|
||||
{
|
||||
if(conn == null)
|
||||
throw new ArgumentNullException(nameof(conn));
|
||||
var httpConnection = conn.JavaCast<HttpURLConnection>();
|
||||
if(httpConnection == null)
|
||||
throw new InvalidOperationException($"Unsupported URL scheme {conn.URL.Protocol}");
|
||||
|
||||
httpConnection.RequestMethod = request.Method.ToString();
|
||||
|
||||
// SSL context must be set up as soon as possible, before adding any content or
|
||||
// headers. Otherwise Java won't use the socket factory
|
||||
SetupSSL(httpConnection as HttpsURLConnection);
|
||||
if(request.Content != null)
|
||||
AddHeaders(httpConnection, request.Content.Headers);
|
||||
AddHeaders(httpConnection, request.Headers);
|
||||
|
||||
List<string> accept_encoding = null;
|
||||
|
||||
decompress_here = false;
|
||||
if((AutomaticDecompression & DecompressionMethods.GZip) != 0)
|
||||
{
|
||||
AppendEncoding(GZIP_ENCODING, ref accept_encoding);
|
||||
decompress_here = true;
|
||||
}
|
||||
|
||||
if((AutomaticDecompression & DecompressionMethods.Deflate) != 0)
|
||||
{
|
||||
AppendEncoding(DEFLATE_ENCODING, ref accept_encoding);
|
||||
decompress_here = true;
|
||||
}
|
||||
|
||||
if(AutomaticDecompression == DecompressionMethods.None)
|
||||
{
|
||||
accept_encoding?.Clear();
|
||||
AppendEncoding(IDENTITY_ENCODING, ref accept_encoding); // Turns off compression for the Java client
|
||||
}
|
||||
|
||||
if(accept_encoding?.Count > 0)
|
||||
httpConnection.SetRequestProperty("Accept-Encoding", String.Join(",", accept_encoding));
|
||||
|
||||
if(UseCookies && CookieContainer != null)
|
||||
{
|
||||
string cookieHeaderValue = CookieContainer.GetCookieHeader(request.RequestUri);
|
||||
if(!String.IsNullOrEmpty(cookieHeaderValue))
|
||||
httpConnection.SetRequestProperty("Cookie", cookieHeaderValue);
|
||||
}
|
||||
|
||||
HandlePreAuthentication(httpConnection);
|
||||
await SetupRequest(request, httpConnection);
|
||||
SetupRequestBody(httpConnection, request);
|
||||
|
||||
return httpConnection;
|
||||
}
|
||||
|
||||
void SetupSSL(HttpsURLConnection httpsConnection)
|
||||
{
|
||||
if(httpsConnection == null)
|
||||
return;
|
||||
|
||||
KeyStore keyStore = KeyStore.GetInstance(KeyStore.DefaultType);
|
||||
keyStore.Load(null, null);
|
||||
bool gotCerts = TrustedCerts?.Count > 0;
|
||||
if(gotCerts)
|
||||
{
|
||||
for(int i = 0; i < TrustedCerts.Count; i++)
|
||||
{
|
||||
Certificate cert = TrustedCerts[i];
|
||||
if(cert == null)
|
||||
continue;
|
||||
keyStore.SetCertificateEntry($"ca{i}", cert);
|
||||
}
|
||||
}
|
||||
keyStore = ConfigureKeyStore(keyStore);
|
||||
KeyManagerFactory kmf = ConfigureKeyManagerFactory(keyStore);
|
||||
TrustManagerFactory tmf = ConfigureTrustManagerFactory(keyStore);
|
||||
|
||||
if(tmf == null)
|
||||
{
|
||||
// If there are no certs and no trust manager factory, we can't use a custom manager
|
||||
// because it will cause all the HTTPS requests to fail because of unverified trust
|
||||
// chain
|
||||
if(!gotCerts)
|
||||
return;
|
||||
|
||||
tmf = TrustManagerFactory.GetInstance(TrustManagerFactory.DefaultAlgorithm);
|
||||
tmf.Init(keyStore);
|
||||
}
|
||||
|
||||
SSLContext context = SSLContext.GetInstance("TLS");
|
||||
context.Init(kmf?.GetKeyManagers(), tmf.GetTrustManagers(), null);
|
||||
httpsConnection.SSLSocketFactory = context.SocketFactory;
|
||||
}
|
||||
|
||||
void HandlePreAuthentication(HttpURLConnection httpConnection)
|
||||
{
|
||||
AuthenticationData data = PreAuthenticationData;
|
||||
if(!PreAuthenticate || data == null)
|
||||
return;
|
||||
|
||||
ICredentials creds = data.UseProxyAuthentication ? Proxy?.Credentials : Credentials;
|
||||
if(creds == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
IAndroidAuthenticationModule auth = data.Scheme == AuthenticationScheme.Unsupported ? data.AuthModule : authModules.Find(m => m?.Scheme == data.Scheme);
|
||||
if(auth == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Authorization authorization = auth.Authenticate(data.Challenge, httpConnection, creds);
|
||||
if(authorization == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
httpConnection.SetRequestProperty(data.UseProxyAuthentication ? "Proxy-Authorization" : "Authorization", authorization.Message);
|
||||
}
|
||||
|
||||
void AddHeaders(HttpURLConnection conn, HttpHeaders headers)
|
||||
{
|
||||
if(headers == null)
|
||||
return;
|
||||
|
||||
foreach(KeyValuePair<string, IEnumerable<string>> header in headers)
|
||||
{
|
||||
conn.SetRequestProperty(header.Key, header.Value != null ? String.Join(",", header.Value) : String.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
void SetupRequestBody(HttpURLConnection httpConnection, HttpRequestMessage request)
|
||||
{
|
||||
if(request.Content == null)
|
||||
{
|
||||
// Pilfered from System.Net.Http.HttpClientHandler:SendAync
|
||||
if(HttpMethod.Post.Equals(request.Method) || HttpMethod.Put.Equals(request.Method) || HttpMethod.Delete.Equals(request.Method))
|
||||
{
|
||||
// Explicitly set this to make sure we're sending a "Content-Length: 0" header.
|
||||
// This fixes the issue that's been reported on the forums:
|
||||
// http://forums.xamarin.com/discussion/17770/length-required-error-in-http-post-since-latest-release
|
||||
httpConnection.SetRequestProperty("Content-Length", "0");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
httpConnection.DoOutput = true;
|
||||
long? contentLength = request.Content.Headers.ContentLength;
|
||||
if(contentLength != null)
|
||||
httpConnection.SetFixedLengthStreamingMode((int)contentLength);
|
||||
else
|
||||
httpConnection.SetChunkedStreamingMode(0);
|
||||
}
|
||||
}
|
||||
|
||||
sealed class AuthModuleBasic : IAndroidAuthenticationModule
|
||||
{
|
||||
public AuthenticationScheme Scheme { get; } = AuthenticationScheme.Basic;
|
||||
public string AuthenticationType { get; } = "Basic";
|
||||
public bool CanPreAuthenticate { get; } = true;
|
||||
|
||||
public Authorization Authenticate(string challenge, HttpURLConnection request, ICredentials credentials)
|
||||
{
|
||||
string header = challenge?.Trim();
|
||||
if(credentials == null || String.IsNullOrEmpty(header))
|
||||
return null;
|
||||
|
||||
if(header.IndexOf("basic", StringComparison.OrdinalIgnoreCase) == -1)
|
||||
return null;
|
||||
|
||||
return InternalAuthenticate(request, credentials);
|
||||
}
|
||||
|
||||
public Authorization PreAuthenticate(HttpURLConnection request, ICredentials credentials)
|
||||
{
|
||||
return InternalAuthenticate(request, credentials);
|
||||
}
|
||||
|
||||
Authorization InternalAuthenticate(HttpURLConnection request, ICredentials credentials)
|
||||
{
|
||||
if(request == null || credentials == null)
|
||||
return null;
|
||||
|
||||
NetworkCredential cred = credentials.GetCredential(new Uri(request.URL.ToString()), AuthenticationType.ToLowerInvariant());
|
||||
if(cred == null)
|
||||
return null;
|
||||
|
||||
if(String.IsNullOrEmpty(cred.UserName))
|
||||
return null;
|
||||
|
||||
string domain = cred.Domain?.Trim();
|
||||
string response = String.Empty;
|
||||
|
||||
// If domain is set, MS sends "domain\user:password".
|
||||
if(!String.IsNullOrEmpty(domain))
|
||||
response = domain + "\\";
|
||||
response += cred.UserName + ":" + cred.Password;
|
||||
|
||||
return new Authorization($"{AuthenticationType} {Convert.ToBase64String(Encoding.ASCII.GetBytes(response))}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
XA_HTTP_CLIENT_HANDLER_TYPE=Xamarin.Android.Net.AndroidClientHandler
|
||||
25
src/Android/FirebaseInstanceIdService.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
#if !FDROID
|
||||
using System;
|
||||
using Android.App;
|
||||
using Android.Content;
|
||||
using Bit.App;
|
||||
using Bit.App.Abstractions;
|
||||
using Firebase.Iid;
|
||||
using Plugin.Settings.Abstractions;
|
||||
using XLabs.Ioc;
|
||||
|
||||
namespace Bit.Android
|
||||
{
|
||||
[Service]
|
||||
[IntentFilter(new[] { "com.google.firebase.INSTANCE_ID_EVENT" })]
|
||||
public class FirebaseInstanceIdService : Firebase.Iid.FirebaseInstanceIdService
|
||||
{
|
||||
public override void OnTokenRefresh()
|
||||
{
|
||||
var settings = Resolver.Resolve<ISettings>();
|
||||
settings.AddOrUpdateValue(Constants.PushRegisteredToken, FirebaseInstanceId.Instance.Token);
|
||||
Resolver.Resolve<IPushNotificationService>()?.Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
44
src/Android/FirebaseMessagingService.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
#if !FDROID
|
||||
using System;
|
||||
using Android.App;
|
||||
using Android.Content;
|
||||
using Bit.App.Abstractions;
|
||||
using Firebase.Messaging;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Xamarin.Forms;
|
||||
using XLabs.Ioc;
|
||||
|
||||
namespace Bit.Android
|
||||
{
|
||||
[Service]
|
||||
[IntentFilter(new[] { "com.google.firebase.MESSAGING_EVENT" })]
|
||||
public class FirebaseMessagingService : Firebase.Messaging.FirebaseMessagingService
|
||||
{
|
||||
public override void OnMessageReceived(RemoteMessage message)
|
||||
{
|
||||
if(message?.Data == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var data = message.Data.ContainsKey("data") ? message.Data["data"] : null;
|
||||
if(data == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var obj = JObject.Parse(data);
|
||||
var listener = Resolver.Resolve<IPushNotificationListener>();
|
||||
listener.OnMessage(obj, Device.Android);
|
||||
}
|
||||
catch(JsonReaderException ex)
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine(ex.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1,3 +1,4 @@
|
||||
#if !FDROID
|
||||
using HockeyApp.Android;
|
||||
using Bit.App.Abstractions;
|
||||
using Newtonsoft.Json;
|
||||
@@ -51,4 +52,5 @@ namespace Bit.Android
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -5,30 +5,35 @@ using Android.Views;
|
||||
using Android.OS;
|
||||
using Bit.App.Abstractions;
|
||||
using XLabs.Ioc;
|
||||
using Plugin.Fingerprint.Abstractions;
|
||||
using Plugin.Settings.Abstractions;
|
||||
using Plugin.Connectivity.Abstractions;
|
||||
using Acr.UserDialogs;
|
||||
using Android.Content;
|
||||
using System.Reflection;
|
||||
using Xamarin.Forms.Platform.Android;
|
||||
using Xamarin.Forms;
|
||||
using System.Threading.Tasks;
|
||||
using Bit.App.Models.Page;
|
||||
using Bit.App;
|
||||
using Android.Nfc;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Bit.App.Models;
|
||||
using Bit.App.Enums;
|
||||
|
||||
namespace Bit.Android
|
||||
{
|
||||
[Activity(Label = "bitwarden",
|
||||
Icon = "@drawable/icon",
|
||||
ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation,
|
||||
WindowSoftInputMode = SoftInput.StateHidden)]
|
||||
[Activity(ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation, Exported = false)]
|
||||
public class MainActivity : FormsAppCompatActivity
|
||||
{
|
||||
private const string HockeyAppId = "d3834185b4a643479047b86c65293d42";
|
||||
private Java.Util.Regex.Pattern _otpPattern = Java.Util.Regex.Pattern.Compile("^.*?([cbdefghijklnrtuv]{32,64})$");
|
||||
private IDeviceActionService _deviceActionService;
|
||||
private IDeviceInfoService _deviceInfoService;
|
||||
private IAppSettingsService _appSettingsService;
|
||||
private ISettings _settings;
|
||||
private AppOptions _appOptions;
|
||||
|
||||
protected override void OnCreate(Bundle bundle)
|
||||
{
|
||||
var uri = Intent.GetStringExtra("uri");
|
||||
if(!Resolver.IsSet)
|
||||
{
|
||||
MainApplication.SetIoc(Application);
|
||||
@@ -47,86 +52,57 @@ namespace Bit.Android
|
||||
Task.Delay(10).Wait();
|
||||
|
||||
Console.WriteLine("A OnCreate");
|
||||
Window.SetSoftInputMode(SoftInput.StateHidden);
|
||||
Window.AddFlags(WindowManagerFlags.Secure);
|
||||
if(!App.Utilities.Helpers.InDebugMode())
|
||||
{
|
||||
Window.AddFlags(WindowManagerFlags.Secure);
|
||||
}
|
||||
|
||||
var appIdService = Resolver.Resolve<IAppIdService>();
|
||||
var authService = Resolver.Resolve<IAuthService>();
|
||||
|
||||
#if !FDROID
|
||||
HockeyApp.Android.CrashManager.Register(this, HockeyAppId,
|
||||
new HockeyAppCrashManagerListener(appIdService, authService));
|
||||
#endif
|
||||
|
||||
Forms.Init(this, bundle);
|
||||
|
||||
typeof(Color).GetProperty("Accent", BindingFlags.Public | BindingFlags.Static)
|
||||
.SetValue(null, Color.FromHex("d2d6de"));
|
||||
|
||||
_deviceActionService = Resolver.Resolve<IDeviceActionService>();
|
||||
_deviceInfoService = Resolver.Resolve<IDeviceInfoService>();
|
||||
_appSettingsService = Resolver.Resolve<IAppSettingsService>();
|
||||
_settings = Resolver.Resolve<ISettings>();
|
||||
_appOptions = GetOptions();
|
||||
LoadApplication(new App.App(
|
||||
uri,
|
||||
_appOptions,
|
||||
Resolver.Resolve<IAuthService>(),
|
||||
Resolver.Resolve<IConnectivity>(),
|
||||
Resolver.Resolve<IUserDialogs>(),
|
||||
Resolver.Resolve<IDatabaseService>(),
|
||||
Resolver.Resolve<ISyncService>(),
|
||||
Resolver.Resolve<IFingerprint>(),
|
||||
Resolver.Resolve<ISettings>(),
|
||||
_settings,
|
||||
Resolver.Resolve<ILockService>(),
|
||||
Resolver.Resolve<IGoogleAnalyticsService>(),
|
||||
Resolver.Resolve<ILocalizeService>(),
|
||||
Resolver.Resolve<IAppInfoService>()));
|
||||
Resolver.Resolve<IAppInfoService>(),
|
||||
_appSettingsService,
|
||||
_deviceActionService));
|
||||
|
||||
MessagingCenter.Subscribe<Xamarin.Forms.Application>(Xamarin.Forms.Application.Current, "RateApp", (sender) =>
|
||||
if(_appOptions?.Uri == null)
|
||||
{
|
||||
RateApp();
|
||||
});
|
||||
MessagingCenter.Subscribe<Xamarin.Forms.Application, bool>(Xamarin.Forms.Application.Current,
|
||||
"ListenYubiKeyOTP", (sender, listen) => ListenYubiKey(listen));
|
||||
|
||||
MessagingCenter.Subscribe<Xamarin.Forms.Application>(Xamarin.Forms.Application.Current, "Accessibility", (sender) =>
|
||||
{
|
||||
OpenAccessibilitySettings();
|
||||
});
|
||||
|
||||
MessagingCenter.Subscribe<Xamarin.Forms.Application, VaultListPageModel.Login>(
|
||||
Xamarin.Forms.Application.Current, "Autofill", (sender, args) =>
|
||||
{
|
||||
ReturnCredentials(args);
|
||||
});
|
||||
|
||||
MessagingCenter.Subscribe<Xamarin.Forms.Application>(Xamarin.Forms.Application.Current, "BackgroundApp", (sender) =>
|
||||
{
|
||||
MoveTaskToBack(true);
|
||||
});
|
||||
}
|
||||
|
||||
private void ReturnCredentials(VaultListPageModel.Login login)
|
||||
{
|
||||
Intent data = new Intent();
|
||||
if(login == null)
|
||||
{
|
||||
data.PutExtra("canceled", "true");
|
||||
MessagingCenter.Subscribe<Xamarin.Forms.Application>(Xamarin.Forms.Application.Current,
|
||||
"FinishMainActivity", (sender) => Finish());
|
||||
}
|
||||
else
|
||||
{
|
||||
data.PutExtra("uri", login.Uri.Value);
|
||||
data.PutExtra("username", login.Username);
|
||||
data.PutExtra("password", login.Password.Value);
|
||||
}
|
||||
|
||||
if(Parent == null)
|
||||
{
|
||||
SetResult(Result.Ok, data);
|
||||
}
|
||||
else
|
||||
{
|
||||
Parent.SetResult(Result.Ok, data);
|
||||
}
|
||||
|
||||
Finish();
|
||||
}
|
||||
|
||||
protected override void OnPause()
|
||||
{
|
||||
Console.WriteLine("A OnPause");
|
||||
base.OnPause();
|
||||
ListenYubiKey(false);
|
||||
}
|
||||
|
||||
protected override void OnDestroy()
|
||||
@@ -161,44 +137,159 @@ namespace Bit.Android
|
||||
// workaround for app compat bug
|
||||
// ref https://bugzilla.xamarin.com/show_bug.cgi?id=36907
|
||||
Task.Delay(10).Wait();
|
||||
}
|
||||
|
||||
public void RateApp()
|
||||
{
|
||||
try
|
||||
if(_deviceInfoService.NfcEnabled)
|
||||
{
|
||||
var rateIntent = RateIntentForUrl("market://details");
|
||||
StartActivity(rateIntent);
|
||||
try
|
||||
{
|
||||
MessagingCenter.Send(Xamarin.Forms.Application.Current, "ResumeYubiKey");
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine(e);
|
||||
}
|
||||
}
|
||||
catch(ActivityNotFoundException)
|
||||
|
||||
if(_appSettingsService.Locked)
|
||||
{
|
||||
var rateIntent = RateIntentForUrl("https://play.google.com/store/apps/details");
|
||||
StartActivity(rateIntent);
|
||||
MessagingCenter.Send(Xamarin.Forms.Application.Current, "Resumed", false);
|
||||
}
|
||||
}
|
||||
|
||||
private Intent RateIntentForUrl(string url)
|
||||
protected override void OnNewIntent(Intent intent)
|
||||
{
|
||||
var intent = new Intent(Intent.ActionView, global::Android.Net.Uri.Parse($"{url}?id={PackageName}"));
|
||||
var flags = ActivityFlags.NoHistory | ActivityFlags.MultipleTask;
|
||||
if((int)Build.VERSION.SdkInt >= 21)
|
||||
base.OnNewIntent(intent);
|
||||
Console.WriteLine("A OnNewIntent");
|
||||
ParseYubiKey(intent.DataString);
|
||||
}
|
||||
|
||||
public async override void OnRequestPermissionsResult(int requestCode, string[] permissions, Permission[] grantResults)
|
||||
{
|
||||
if(requestCode == Constants.SelectFilePermissionRequestCode)
|
||||
{
|
||||
flags |= ActivityFlags.NewDocument;
|
||||
if(grantResults.Any(r => r != Permission.Granted))
|
||||
{
|
||||
MessagingCenter.Send(Xamarin.Forms.Application.Current, "SelectFileCameraPermissionDenied");
|
||||
}
|
||||
await _deviceActionService.SelectFileAsync();
|
||||
return;
|
||||
}
|
||||
|
||||
ZXing.Net.Mobile.Forms.Android.PermissionsHandler.OnRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||
}
|
||||
|
||||
protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
|
||||
{
|
||||
if(requestCode == Constants.SelectFileRequestCode && resultCode == Result.Ok)
|
||||
{
|
||||
global::Android.Net.Uri uri = null;
|
||||
string fileName = null;
|
||||
if(data != null && data.Data != null)
|
||||
{
|
||||
uri = data.Data;
|
||||
fileName = Utilities.GetFileName(ApplicationContext, uri);
|
||||
}
|
||||
else
|
||||
{
|
||||
// camera
|
||||
var root = new Java.IO.File(global::Android.OS.Environment.ExternalStorageDirectory, "bitwarden");
|
||||
var file = new Java.IO.File(root, "temp_camera_photo.jpg");
|
||||
uri = global::Android.Net.Uri.FromFile(file);
|
||||
fileName = $"photo_{DateTime.UtcNow.ToString("yyyyMMddHHmmss")}.jpg";
|
||||
}
|
||||
|
||||
if(uri == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
using(var stream = ContentResolver.OpenInputStream(uri))
|
||||
using(var memoryStream = new MemoryStream())
|
||||
{
|
||||
stream.CopyTo(memoryStream);
|
||||
MessagingCenter.Send(Xamarin.Forms.Application.Current, "SelectFileResult",
|
||||
new Tuple<byte[], string>(memoryStream.ToArray(), fileName ?? "unknown_file_name"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ListenYubiKey(bool listen)
|
||||
{
|
||||
if(!_deviceInfoService.NfcEnabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var adapter = NfcAdapter.GetDefaultAdapter(this);
|
||||
if(listen)
|
||||
{
|
||||
var intent = new Intent(this, Class);
|
||||
intent.AddFlags(ActivityFlags.SingleTop);
|
||||
var pendingIntent = PendingIntent.GetActivity(this, 0, intent, 0);
|
||||
|
||||
// register for all NDEF tags starting with http och https
|
||||
var ndef = new IntentFilter(NfcAdapter.ActionNdefDiscovered);
|
||||
ndef.AddDataScheme("http");
|
||||
ndef.AddDataScheme("https");
|
||||
var filters = new IntentFilter[] { ndef };
|
||||
|
||||
try
|
||||
{
|
||||
// register for foreground dispatch so we'll receive tags according to our intent filters
|
||||
adapter.EnableForegroundDispatch(this, pendingIntent, filters, null);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
else
|
||||
{
|
||||
// noinspection deprecation
|
||||
flags |= ActivityFlags.ClearWhenTaskReset;
|
||||
adapter.DisableForegroundDispatch(this);
|
||||
}
|
||||
|
||||
intent.AddFlags(flags);
|
||||
return intent;
|
||||
}
|
||||
|
||||
private void OpenAccessibilitySettings()
|
||||
private void ParseYubiKey(string data)
|
||||
{
|
||||
var intent = new Intent(global::Android.Provider.Settings.ActionAccessibilitySettings);
|
||||
StartActivity(intent);
|
||||
if(data == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var otpMatch = _otpPattern.Matcher(data);
|
||||
if(otpMatch.Matches())
|
||||
{
|
||||
var otp = otpMatch.Group(1);
|
||||
MessagingCenter.Send(Xamarin.Forms.Application.Current, "GotYubiKeyOTP", otp);
|
||||
}
|
||||
}
|
||||
|
||||
private AppOptions GetOptions()
|
||||
{
|
||||
var options = new AppOptions
|
||||
{
|
||||
Uri = Intent.GetStringExtra("uri") ?? Intent.GetStringExtra("autofillFrameworkUri"),
|
||||
MyVaultTile = Intent.GetBooleanExtra("myVaultTile", false),
|
||||
FromAutofillFramework = Intent.GetBooleanExtra("autofillFramework", false)
|
||||
};
|
||||
|
||||
var fillType = Intent.GetIntExtra("autofillFrameworkFillType", 0);
|
||||
if(fillType > 0)
|
||||
{
|
||||
options.FillType = (CipherType)fillType;
|
||||
}
|
||||
|
||||
if(Intent.GetBooleanExtra("autofillFrameworkSave", false))
|
||||
{
|
||||
options.SaveType = (CipherType)Intent.GetIntExtra("autofillFrameworkType", 0);
|
||||
options.SaveName = Intent.GetStringExtra("autofillFrameworkName");
|
||||
options.SaveUsername = Intent.GetStringExtra("autofillFrameworkUsername");
|
||||
options.SavePassword = Intent.GetStringExtra("autofillFrameworkPassword");
|
||||
options.SaveCardName = Intent.GetStringExtra("autofillFrameworkCardName");
|
||||
options.SaveCardNumber = Intent.GetStringExtra("autofillFrameworkCardNumber");
|
||||
options.SaveCardExpMonth = Intent.GetStringExtra("autofillFrameworkCardExpMonth");
|
||||
options.SaveCardExpYear = Intent.GetStringExtra("autofillFrameworkCardExpYear");
|
||||
options.SaveCardCode = Intent.GetStringExtra("autofillFrameworkCardCode");
|
||||
}
|
||||
|
||||
return options;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using Acr.UserDialogs;
|
||||
using Android.App;
|
||||
using Android.Content;
|
||||
using Android.OS;
|
||||
@@ -8,19 +7,15 @@ using Bit.Android.Services;
|
||||
using Bit.App.Abstractions;
|
||||
using Bit.App.Repositories;
|
||||
using Bit.App.Services;
|
||||
using Microsoft.Practices.Unity;
|
||||
using Plugin.Connectivity;
|
||||
using Plugin.CurrentActivity;
|
||||
using Plugin.Fingerprint;
|
||||
using Plugin.Settings;
|
||||
using PushNotification.Plugin;
|
||||
using PushNotification.Plugin.Abstractions;
|
||||
using XLabs.Ioc;
|
||||
using XLabs.Ioc.Unity;
|
||||
using System.Threading.Tasks;
|
||||
using Plugin.Settings.Abstractions;
|
||||
using Xamarin.Android.Net;
|
||||
using FFImageLoading.Forms.Droid;
|
||||
using XLabs.Ioc.SimpleInjectorContainer;
|
||||
using SimpleInjector;
|
||||
using Android.Gms.Security;
|
||||
|
||||
namespace Bit.Android
|
||||
{
|
||||
@@ -29,23 +24,29 @@ namespace Bit.Android
|
||||
#else
|
||||
[Application(Debuggable = false)]
|
||||
#endif
|
||||
public class MainApplication : Application, Application.IActivityLifecycleCallbacks
|
||||
public class MainApplication : Application, ProviderInstaller.IProviderInstallListener
|
||||
{
|
||||
private const string FirstLaunchKey = "firstLaunch";
|
||||
private const string LastVersionCodeKey = "lastVersionCode";
|
||||
|
||||
public static Context AppContext;
|
||||
|
||||
public MainApplication(IntPtr handle, JniHandleOwnership transer)
|
||||
: base(handle, transer)
|
||||
{
|
||||
// NOTE: This is just here to stop the linker from removing AndroidClientHandler references
|
||||
var handler = new AndroidClientHandler();
|
||||
//AndroidEnvironment.UnhandledExceptionRaiser += AndroidEnvironment_UnhandledExceptionRaiser;
|
||||
|
||||
if(!Resolver.IsSet)
|
||||
{
|
||||
SetIoc(this);
|
||||
}
|
||||
|
||||
if(Build.VERSION.SdkInt <= BuildVersionCodes.Kitkat)
|
||||
{
|
||||
ProviderInstaller.InstallIfNeededAsync(ApplicationContext, this);
|
||||
}
|
||||
}
|
||||
|
||||
private void AndroidEnvironment_UnhandledExceptionRaiser(object sender, RaiseThrowableEventArgs e)
|
||||
{
|
||||
var message = Utilities.AppendExceptionToMessage("", e.Exception);
|
||||
//Utilities.SaveCrashFile(message, true);
|
||||
Utilities.SendCrashEmail(message, false);
|
||||
}
|
||||
|
||||
public override void OnCreate()
|
||||
@@ -55,188 +56,92 @@ namespace Bit.Android
|
||||
// workaround for app compat bug
|
||||
// ref https://forums.xamarin.com/discussion/62414/app-resuming-results-in-crash-with-formsappcompatactivity
|
||||
Task.Delay(10).Wait();
|
||||
|
||||
RegisterActivityLifecycleCallbacks(this);
|
||||
AppContext = ApplicationContext;
|
||||
StartPushService();
|
||||
HandlePushReregistration();
|
||||
}
|
||||
|
||||
private void HandlePushReregistration()
|
||||
{
|
||||
var pushNotification = Resolver.Resolve<IPushNotification>();
|
||||
var settings = Resolver.Resolve<ISettings>();
|
||||
|
||||
// Reregister for push token based on certain conditions
|
||||
// ref https://github.com/rdelrosario/xamarin-plugins/issues/65
|
||||
|
||||
var reregister = false;
|
||||
|
||||
// 1. First time starting the app after a new install
|
||||
if(settings.GetValueOrDefault(FirstLaunchKey, true))
|
||||
{
|
||||
settings.AddOrUpdateValue(FirstLaunchKey, false);
|
||||
reregister = true;
|
||||
}
|
||||
|
||||
// 2. App version changed (installed update)
|
||||
var versionCode = Context.ApplicationContext.PackageManager.GetPackageInfo(Context.PackageName, 0).VersionCode;
|
||||
if(settings.GetValueOrDefault(LastVersionCodeKey, -1) != versionCode)
|
||||
{
|
||||
settings.AddOrUpdateValue(LastVersionCodeKey, versionCode);
|
||||
reregister = true;
|
||||
}
|
||||
|
||||
// 3. In debug mode
|
||||
if(InDebugMode())
|
||||
{
|
||||
reregister = true;
|
||||
}
|
||||
|
||||
// 4. Doesn't have a push token currently
|
||||
if(string.IsNullOrWhiteSpace(pushNotification.Token))
|
||||
{
|
||||
reregister = true;
|
||||
}
|
||||
|
||||
if(reregister)
|
||||
{
|
||||
pushNotification.Unregister();
|
||||
if(Resolver.Resolve<IAuthService>().IsAuthenticated)
|
||||
{
|
||||
pushNotification.Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool InDebugMode()
|
||||
{
|
||||
#if DEBUG
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
public override void OnTerminate()
|
||||
{
|
||||
base.OnTerminate();
|
||||
UnregisterActivityLifecycleCallbacks(this);
|
||||
}
|
||||
|
||||
public void OnActivityCreated(Activity activity, Bundle savedInstanceState)
|
||||
{
|
||||
CrossCurrentActivity.Current.Activity = activity;
|
||||
}
|
||||
|
||||
public void OnActivityDestroyed(Activity activity)
|
||||
{
|
||||
}
|
||||
|
||||
public void OnActivityPaused(Activity activity)
|
||||
{
|
||||
}
|
||||
|
||||
public void OnActivityResumed(Activity activity)
|
||||
{
|
||||
CrossCurrentActivity.Current.Activity = activity;
|
||||
}
|
||||
|
||||
public void OnActivitySaveInstanceState(Activity activity, Bundle outState)
|
||||
{
|
||||
}
|
||||
|
||||
public void OnActivityStarted(Activity activity)
|
||||
{
|
||||
CrossCurrentActivity.Current.Activity = activity;
|
||||
}
|
||||
|
||||
public void OnActivityStopped(Activity activity)
|
||||
{
|
||||
}
|
||||
|
||||
public static void StartPushService()
|
||||
{
|
||||
AppContext.StartService(new Intent(AppContext, typeof(PushNotificationService)));
|
||||
if(Build.VERSION.SdkInt >= BuildVersionCodes.Kitkat)
|
||||
{
|
||||
PendingIntent pintent = PendingIntent.GetService(AppContext, 0, new Intent(AppContext,
|
||||
typeof(PushNotificationService)), 0);
|
||||
AlarmManager alarm = (AlarmManager)AppContext.GetSystemService(AlarmService);
|
||||
alarm.Cancel(pintent);
|
||||
}
|
||||
}
|
||||
|
||||
public static void StopPushService()
|
||||
{
|
||||
AppContext.StopService(new Intent(AppContext, typeof(PushNotificationService)));
|
||||
if(Build.VERSION.SdkInt >= BuildVersionCodes.Kitkat)
|
||||
{
|
||||
PendingIntent pintent = PendingIntent.GetService(AppContext, 0, new Intent(AppContext,
|
||||
typeof(PushNotificationService)), 0);
|
||||
AlarmManager alarm = (AlarmManager)AppContext.GetSystemService(AlarmService);
|
||||
alarm.Cancel(pintent);
|
||||
}
|
||||
CrossCurrentActivity.Current.Init(this);
|
||||
}
|
||||
|
||||
public static void SetIoc(Application application)
|
||||
{
|
||||
UserDialogs.Init(application);
|
||||
|
||||
var container = new UnityContainer();
|
||||
|
||||
container
|
||||
// Android Stuff
|
||||
.RegisterInstance(application.ApplicationContext)
|
||||
.RegisterInstance<Application>(application)
|
||||
// Services
|
||||
.RegisterType<IDatabaseService, DatabaseService>(new ContainerControlledLifetimeManager())
|
||||
.RegisterType<ISqlService, SqlService>(new ContainerControlledLifetimeManager())
|
||||
.RegisterType<ISecureStorageService, KeyStoreStorageService>(new ContainerControlledLifetimeManager())
|
||||
.RegisterType<ICryptoService, CryptoService>(new ContainerControlledLifetimeManager())
|
||||
.RegisterType<IKeyDerivationService, BouncyCastleKeyDerivationService>(new ContainerControlledLifetimeManager())
|
||||
.RegisterType<IAuthService, AuthService>(new ContainerControlledLifetimeManager())
|
||||
.RegisterType<IFolderService, FolderService>(new ContainerControlledLifetimeManager())
|
||||
.RegisterType<ILoginService, LoginService>(new ContainerControlledLifetimeManager())
|
||||
.RegisterType<ISyncService, SyncService>(new ContainerControlledLifetimeManager())
|
||||
.RegisterType<IClipboardService, ClipboardService>(new ContainerControlledLifetimeManager())
|
||||
.RegisterType<IPushNotificationListener, PushNotificationListener>(new ContainerControlledLifetimeManager())
|
||||
.RegisterType<IAppIdService, AppIdService>(new ContainerControlledLifetimeManager())
|
||||
.RegisterType<IPasswordGenerationService, PasswordGenerationService>(new ContainerControlledLifetimeManager())
|
||||
.RegisterType<IReflectionService, ReflectionService>(new ContainerControlledLifetimeManager())
|
||||
.RegisterType<ILockService, LockService>(new ContainerControlledLifetimeManager())
|
||||
.RegisterType<IAppInfoService, AppInfoService>(new ContainerControlledLifetimeManager())
|
||||
.RegisterType<IGoogleAnalyticsService, GoogleAnalyticsService>(new ContainerControlledLifetimeManager())
|
||||
.RegisterType<IDeviceInfoService, DeviceInfoService>(new ContainerControlledLifetimeManager())
|
||||
.RegisterType<ILocalizeService, LocalizeService>(new ContainerControlledLifetimeManager())
|
||||
.RegisterType<ILogService, LogService>(new ContainerControlledLifetimeManager())
|
||||
.RegisterType<IHttpService, HttpService>(new ContainerControlledLifetimeManager())
|
||||
.RegisterType<ITokenService, TokenService>(new ContainerControlledLifetimeManager())
|
||||
.RegisterType<ISettingsService, SettingsService>(new ContainerControlledLifetimeManager())
|
||||
.RegisterType<IMemoryService, MemoryService>(new ContainerControlledLifetimeManager())
|
||||
// Repositories
|
||||
.RegisterType<IFolderRepository, FolderRepository>(new ContainerControlledLifetimeManager())
|
||||
.RegisterType<IFolderApiRepository, FolderApiRepository>(new ContainerControlledLifetimeManager())
|
||||
.RegisterType<ILoginRepository, LoginRepository>(new ContainerControlledLifetimeManager())
|
||||
.RegisterType<ILoginApiRepository, LoginApiRepository>(new ContainerControlledLifetimeManager())
|
||||
.RegisterType<IConnectApiRepository, ConnectApiRepository>(new ContainerControlledLifetimeManager())
|
||||
.RegisterType<IDeviceApiRepository, DeviceApiRepository>(new ContainerControlledLifetimeManager())
|
||||
.RegisterType<IAccountsApiRepository, AccountsApiRepository>(new ContainerControlledLifetimeManager())
|
||||
.RegisterType<ICipherApiRepository, CipherApiRepository>(new ContainerControlledLifetimeManager())
|
||||
.RegisterType<ISettingsRepository, SettingsRepository>(new ContainerControlledLifetimeManager())
|
||||
.RegisterType<ISettingsApiRepository, SettingsApiRepository>(new ContainerControlledLifetimeManager())
|
||||
// Other
|
||||
.RegisterInstance(CrossSettings.Current, new ContainerControlledLifetimeManager())
|
||||
.RegisterInstance(CrossConnectivity.Current, new ContainerControlledLifetimeManager())
|
||||
.RegisterInstance(UserDialogs.Instance, new ContainerControlledLifetimeManager())
|
||||
.RegisterInstance(CrossFingerprint.Current, new ContainerControlledLifetimeManager());
|
||||
|
||||
CrossPushNotification.Initialize(container.Resolve<IPushNotificationListener>(), "962181367620");
|
||||
container.RegisterInstance(CrossPushNotification.Current, new ContainerControlledLifetimeManager());
|
||||
CachedImageRenderer.Init();
|
||||
|
||||
Resolver.SetResolver(new UnityResolver(container));
|
||||
Refractored.FabControl.Droid.FloatingActionButtonViewRenderer.Init();
|
||||
FFImageLoading.Forms.Platform.CachedImageRenderer.Init(true);
|
||||
ZXing.Net.Mobile.Forms.Android.Platform.Init();
|
||||
CrossFingerprint.SetCurrentActivityResolver(() => CrossCurrentActivity.Current.Activity);
|
||||
|
||||
//var container = new UnityContainer();
|
||||
var container = new Container();
|
||||
|
||||
// Android Stuff
|
||||
container.RegisterInstance(application.ApplicationContext);
|
||||
container.RegisterInstance<Application>(application);
|
||||
|
||||
// Services
|
||||
container.RegisterSingleton<IDatabaseService, DatabaseService>();
|
||||
container.RegisterSingleton<ISqlService, SqlService>();
|
||||
container.RegisterSingleton<ISecureStorageService, AndroidKeyStoreStorageService>();
|
||||
container.RegisterSingleton<ICryptoService, CryptoService>();
|
||||
container.RegisterSingleton<IKeyDerivationService, BouncyCastleKeyDerivationService>();
|
||||
container.RegisterSingleton<IAuthService, AuthService>();
|
||||
container.RegisterSingleton<IFolderService, FolderService>();
|
||||
container.RegisterSingleton<ICollectionService, CollectionService>();
|
||||
container.RegisterSingleton<ICipherService, CipherService>();
|
||||
container.RegisterSingleton<ISyncService, SyncService>();
|
||||
container.RegisterSingleton<IDeviceActionService, DeviceActionService>();
|
||||
container.RegisterSingleton<IAppIdService, AppIdService>();
|
||||
container.RegisterSingleton<IPasswordGenerationService, PasswordGenerationService>();
|
||||
container.RegisterSingleton<ILockService, LockService>();
|
||||
container.RegisterSingleton<IAppInfoService, AppInfoService>();
|
||||
#if FDROID
|
||||
container.RegisterSingleton<IGoogleAnalyticsService, NoopGoogleAnalyticsService>();
|
||||
#else
|
||||
container.RegisterSingleton<IGoogleAnalyticsService, GoogleAnalyticsService>();
|
||||
#endif
|
||||
container.RegisterSingleton<IDeviceInfoService, DeviceInfoService>();
|
||||
container.RegisterSingleton<ILocalizeService, LocalizeService>();
|
||||
container.RegisterSingleton<ILogService, LogService>();
|
||||
container.RegisterSingleton<IHttpService, HttpService>();
|
||||
container.RegisterSingleton<ITokenService, TokenService>();
|
||||
container.RegisterSingleton<ISettingsService, SettingsService>();
|
||||
container.RegisterSingleton<IAppSettingsService, AppSettingsService>();
|
||||
|
||||
// Repositories
|
||||
container.RegisterSingleton<IFolderRepository, FolderRepository>();
|
||||
container.RegisterSingleton<IFolderApiRepository, FolderApiRepository>();
|
||||
container.RegisterSingleton<ICipherRepository, CipherRepository>();
|
||||
container.RegisterSingleton<IAttachmentRepository, AttachmentRepository>();
|
||||
container.RegisterSingleton<IConnectApiRepository, ConnectApiRepository>();
|
||||
container.RegisterSingleton<IDeviceApiRepository, DeviceApiRepository>();
|
||||
container.RegisterSingleton<IAccountsApiRepository, AccountsApiRepository>();
|
||||
container.RegisterSingleton<ICipherApiRepository, CipherApiRepository>();
|
||||
container.RegisterSingleton<ISettingsRepository, SettingsRepository>();
|
||||
container.RegisterSingleton<ISettingsApiRepository, SettingsApiRepository>();
|
||||
container.RegisterSingleton<ITwoFactorApiRepository, TwoFactorApiRepository>();
|
||||
container.RegisterSingleton<ISyncApiRepository, SyncApiRepository>();
|
||||
container.RegisterSingleton<ICollectionRepository, CollectionRepository>();
|
||||
container.RegisterSingleton<ICipherCollectionRepository, CipherCollectionRepository>();
|
||||
|
||||
// Other
|
||||
container.RegisterInstance(CrossSettings.Current);
|
||||
container.RegisterInstance(CrossConnectivity.Current);
|
||||
container.RegisterInstance(CrossFingerprint.Current);
|
||||
|
||||
// Push
|
||||
#if FDROID
|
||||
container.RegisterSingleton<IPushNotificationListener, NoopPushNotificationListener>();
|
||||
container.RegisterSingleton<IPushNotificationService, NoopPushNotificationService>();
|
||||
#else
|
||||
container.RegisterSingleton<IPushNotificationListener, PushNotificationListener>();
|
||||
container.RegisterSingleton<IPushNotificationService, AndroidPushNotificationService>();
|
||||
#endif
|
||||
|
||||
container.Verify();
|
||||
Resolver.SetResolver(new SimpleInjectorResolver(container));
|
||||
}
|
||||
|
||||
public void OnProviderInstallFailed(int errorCode, Intent recoveryIntent)
|
||||
{
|
||||
}
|
||||
|
||||
public void OnProviderInstalled()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
58
src/Android/MyVaultTileService.cs
Normal file
@@ -0,0 +1,58 @@
|
||||
using Android.App;
|
||||
using Android.Content;
|
||||
using Android.Service.QuickSettings;
|
||||
using Java.Lang;
|
||||
|
||||
namespace Bit.Android
|
||||
{
|
||||
[Service(Permission = global::Android.Manifest.Permission.BindQuickSettingsTile,
|
||||
Label = "@string/MyVault", Icon = "@drawable/shield")]
|
||||
[IntentFilter(new string[] { ActionQsTile })]
|
||||
public class MyVaultTileService : TileService
|
||||
{
|
||||
public override void OnTileAdded()
|
||||
{
|
||||
base.OnTileAdded();
|
||||
}
|
||||
|
||||
public override void OnStartListening()
|
||||
{
|
||||
base.OnStartListening();
|
||||
}
|
||||
|
||||
public override void OnStopListening()
|
||||
{
|
||||
base.OnStopListening();
|
||||
}
|
||||
|
||||
public override void OnTileRemoved()
|
||||
{
|
||||
base.OnTileRemoved();
|
||||
}
|
||||
|
||||
public override void OnClick()
|
||||
{
|
||||
base.OnClick();
|
||||
|
||||
if(IsLocked)
|
||||
{
|
||||
UnlockAndRun(new Runnable(() =>
|
||||
{
|
||||
LaunchMyVault();
|
||||
}));
|
||||
}
|
||||
else
|
||||
{
|
||||
LaunchMyVault();
|
||||
}
|
||||
}
|
||||
|
||||
private void LaunchMyVault()
|
||||
{
|
||||
var intent = new Intent(this, typeof(SplashActivity));
|
||||
intent.SetFlags(ActivityFlags.NewTask | ActivityFlags.SingleTop | ActivityFlags.ClearTop);
|
||||
intent.PutExtra("myVaultTile", true);
|
||||
StartActivityAndCollapse(intent);
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
src/Android/Naxam.Ittianyu.BottomNavExtension.dll
Normal file
23
src/Android/PackageReplacedReceiver.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using Android.App;
|
||||
using Android.Content;
|
||||
using Bit.App.Abstractions;
|
||||
using Bit.App.Utilities;
|
||||
using Plugin.Settings.Abstractions;
|
||||
using System;
|
||||
using XLabs.Ioc;
|
||||
|
||||
namespace Bit.Android
|
||||
{
|
||||
[BroadcastReceiver(Name = "com.x8bit.bitwarden.PackageReplacedReceiver", Exported = false)]
|
||||
[IntentFilter(new[] { Intent.ActionMyPackageReplaced })]
|
||||
public class PackageReplacedReceiver : BroadcastReceiver
|
||||
{
|
||||
public override void OnReceive(Context context, Intent intent)
|
||||
{
|
||||
Console.WriteLine("Bitwarden App Updated!!");
|
||||
Helpers.PerformUpdateTasks(Resolver.Resolve<ISettings>(),
|
||||
Resolver.Resolve<IAppInfoService>(), Resolver.Resolve<IDatabaseService>(),
|
||||
Resolver.Resolve<ISyncService>());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,14 +1,41 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.x8bit.bitwarden" android:versionName="1.4.4" android:installLocation="auto" android:versionCode="502">
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.x8bit.bitwarden" android:versionName="1.19.0" android:installLocation="auto" android:versionCode="502" xmlns:tools="http://schemas.android.com/tools">
|
||||
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="23" />
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.NFC" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
|
||||
<uses-permission android:name="com.samsung.android.providers.context.permission.WRITE_USE_APP_FEATURE_SURVEY" />
|
||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
|
||||
<uses-permission android:name="com.x8bit.bitwarden.permission.C2D_MESSAGE" />
|
||||
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
|
||||
<application android:label="bitwarden" android:theme="@style/BitwardenTheme">
|
||||
|
||||
<uses-feature android:name="android.hardware.camera" android:required="false" />
|
||||
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
|
||||
|
||||
<application android:label="Bitwarden" android:theme="@style/BitwardenTheme" android:allowBackup="false"
|
||||
android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round">
|
||||
<provider
|
||||
android:name="android.support.v4.content.FileProvider"
|
||||
android:authorities="com.x8bit.bitwarden.fileprovider"
|
||||
android:exported="false"
|
||||
android:grantUriPermissions="true">
|
||||
<meta-data
|
||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||
android:resource="@xml/filepaths" />
|
||||
</provider>
|
||||
|
||||
<receiver android:name="com.google.firebase.iid.FirebaseInstanceIdInternalReceiver"
|
||||
android:exported="false" />
|
||||
<receiver android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver"
|
||||
android:exported="true" android:permission="com.google.android.c2dm.permission.SEND">
|
||||
<intent-filter>
|
||||
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
|
||||
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
|
||||
<category android:name="com.x8bit.bitwarden" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<activity android:name="net.hockeyapp.android.UpdateActivity" android:exported="false" />
|
||||
<meta-data android:name="android.max_aspect" android:value="2.1" />
|
||||
</application>
|
||||
</manifest>
|
||||
</manifest>
|
||||
|
||||
@@ -10,7 +10,7 @@ using Android.App;
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("8bit Solutions LLC")]
|
||||
[assembly: AssemblyProduct("bitwarden")]
|
||||
[assembly: AssemblyProduct("Bitwarden")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2016")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
@@ -28,7 +28,3 @@ using Android.App;
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
|
||||
// Add some common permissions, these can be removed if not needed
|
||||
[assembly: UsesPermission(Android.Manifest.Permission.Internet)]
|
||||
[assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]
|
||||
10988
src/Android/Resources/Resource.Designer.cs
generated
BIN
src/Android/Resources/drawable-hdpi/android.png
Normal file
|
After Width: | Height: | Size: 530 B |
BIN
src/Android/Resources/drawable-hdpi/apple.png
Normal file
|
After Width: | Height: | Size: 625 B |
BIN
src/Android/Resources/drawable-hdpi/autofill_enable.png
Normal file
|
After Width: | Height: | Size: 9.7 KiB |
BIN
src/Android/Resources/drawable-hdpi/autofill_use.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
src/Android/Resources/drawable-hdpi/camera.png
Normal file
|
After Width: | Height: | Size: 664 B |
BIN
src/Android/Resources/drawable-hdpi/card.png
Normal file
|
After Width: | Height: | Size: 180 B |
BIN
src/Android/Resources/drawable-hdpi/clipboard.png
Normal file
|
After Width: | Height: | Size: 426 B |
BIN
src/Android/Resources/drawable-hdpi/cog.png
Normal file
|
After Width: | Height: | Size: 883 B |
BIN
src/Android/Resources/drawable-hdpi/cog_alt.png
Normal file
|
After Width: | Height: | Size: 738 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
BIN
src/Android/Resources/drawable-hdpi/cube.png
Normal file
|
After Width: | Height: | Size: 738 B |
BIN
src/Android/Resources/drawable-hdpi/download.png
Normal file
|
After Width: | Height: | Size: 467 B |
|
Before Width: | Height: | Size: 569 B |
|
Before Width: | Height: | Size: 434 B After Width: | Height: | Size: 431 B |
BIN
src/Android/Resources/drawable-hdpi/folder_o.png
Normal file
|
After Width: | Height: | Size: 482 B |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.3 KiB |
BIN
src/Android/Resources/drawable-hdpi/id.png
Normal file
|
After Width: | Height: | Size: 487 B |
BIN
src/Android/Resources/drawable-hdpi/launch.png
Normal file
|
After Width: | Height: | Size: 686 B |
BIN
src/Android/Resources/drawable-hdpi/login.png
Normal file
|
After Width: | Height: | Size: 904 B |
|
Before Width: | Height: | Size: 412 B After Width: | Height: | Size: 218 B |
BIN
src/Android/Resources/drawable-hdpi/note.png
Normal file
|
After Width: | Height: | Size: 344 B |
BIN
src/Android/Resources/drawable-hdpi/paperclip.png
Normal file
|
After Width: | Height: | Size: 658 B |
BIN
src/Android/Resources/drawable-hdpi/pencil.png
Normal file
|
After Width: | Height: | Size: 495 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 926 B |
BIN
src/Android/Resources/drawable-hdpi/refresh_alt.png
Normal file
|
After Width: | Height: | Size: 804 B |
BIN
src/Android/Resources/drawable-hdpi/share.png
Normal file
|
After Width: | Height: | Size: 403 B |
BIN
src/Android/Resources/drawable-hdpi/share_tools.png
Normal file
|
After Width: | Height: | Size: 1009 B |
|
Before Width: | Height: | Size: 703 B |
|
Before Width: | Height: | Size: 703 B |
|
Before Width: | Height: | Size: 585 B |
BIN
src/Android/Resources/drawable-hdpi/trash.png
Normal file
|
After Width: | Height: | Size: 452 B |
BIN
src/Android/Resources/drawable-hdpi/upload2.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
src/Android/Resources/drawable-hdpi/yubikey.png
Normal file
|
After Width: | Height: | Size: 108 KiB |
BIN
src/Android/Resources/drawable-xhdpi/android.png
Normal file
|
After Width: | Height: | Size: 659 B |
BIN
src/Android/Resources/drawable-xhdpi/apple.png
Normal file
|
After Width: | Height: | Size: 741 B |
BIN
src/Android/Resources/drawable-xhdpi/autofill_enable.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
src/Android/Resources/drawable-xhdpi/autofill_use.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
src/Android/Resources/drawable-xhdpi/camera.png
Normal file
|
After Width: | Height: | Size: 802 B |
BIN
src/Android/Resources/drawable-xhdpi/card.png
Normal file
|
After Width: | Height: | Size: 326 B |
BIN
src/Android/Resources/drawable-xhdpi/clipboard.png
Normal file
|
After Width: | Height: | Size: 487 B |
BIN
src/Android/Resources/drawable-xhdpi/cog.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
src/Android/Resources/drawable-xhdpi/cog_alt.png
Normal file
|
After Width: | Height: | Size: 1005 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
BIN
src/Android/Resources/drawable-xhdpi/cube.png
Normal file
|
After Width: | Height: | Size: 941 B |
BIN
src/Android/Resources/drawable-xhdpi/download.png
Normal file
|
After Width: | Height: | Size: 556 B |
|
Before Width: | Height: | Size: 680 B |
|
Before Width: | Height: | Size: 563 B After Width: | Height: | Size: 598 B |
BIN
src/Android/Resources/drawable-xhdpi/folder_o.png
Normal file
|
After Width: | Height: | Size: 686 B |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 1.7 KiB |
BIN
src/Android/Resources/drawable-xhdpi/id.png
Normal file
|
After Width: | Height: | Size: 545 B |
BIN
src/Android/Resources/drawable-xhdpi/launch.png
Normal file
|
After Width: | Height: | Size: 910 B |
BIN
src/Android/Resources/drawable-xhdpi/login.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 567 B After Width: | Height: | Size: 284 B |
BIN
src/Android/Resources/drawable-xhdpi/note.png
Normal file
|
After Width: | Height: | Size: 382 B |
BIN
src/Android/Resources/drawable-xhdpi/paperclip.png
Normal file
|
After Width: | Height: | Size: 802 B |