Compare commits

..

32 Commits

Author SHA1 Message Date
Sylvia van Os
435ad2cfb3 Fix comment 2020-10-24 15:35:25 +02:00
Sylvia van Os
ef675fe6e5 Merge branch 'master' of github.com:TheLastProject/loyalty-card-locker into feature/pkpass 2020-10-24 15:07:22 +02:00
Sylvia van Os
fe4dc868aa Fix bad merge 2020-02-22 15:00:58 +01:00
Sylvia van Os
52e32caca3 Fix merge typo 2020-02-21 16:25:24 +01:00
Sylvia van Os
d7ef204d0a Merge branch 'master' into feature/pkpass 2020-02-21 15:33:12 +01:00
Sylvia van Os
915e364454 Merge branch 'master' of ssh://github.com/brarcher/loyalty-card-locker into feature/pkpass 2020-01-12 22:50:29 +01:00
Sylvia van Os
da1d1d62e4 Merge branch 'master' of ssh://github.com/brarcher/loyalty-card-locker into feature/pkpass 2020-01-04 20:25:52 +01:00
Sylvia van Os
fd1b86b1cc Fix sharing loyalty card with icon 2019-12-18 13:26:12 +01:00
Sylvia van Os
3f4d0ab5df Grab highest quality icon 2019-12-18 12:18:32 +01:00
Sylvia van Os
1a6cad893d Load icon from Pkpass if exists 2019-12-18 12:15:32 +01:00
Sylvia van Os
2ef4d3f6e0 Fix findBugs performance warning 2019-12-16 17:03:33 +01:00
Sylvia van Os
43148cb12c Merge branch 'master' of ssh://github.com/brarcher/loyalty-card-locker into feature/pkpass 2019-12-16 16:51:25 +01:00
Sylvia van Os
80b45973ac More zip types 2019-12-16 16:45:45 +01:00
Sylvia van Os
ca8243de01 Always fall back to English and then untranslated 2019-12-16 16:34:39 +01:00
Sylvia van Os
b4a532d183 Fix tests 2019-12-16 16:09:56 +01:00
Sylvia van Os
a05f9f6ec9 Parsing fixes 2019-12-16 15:25:27 +01:00
Sylvia van Os
79bba52d93 Load translations (TODO: tests) 2019-12-15 19:10:34 +01:00
Sylvia van Os
04dcee6097 Fix some tests 2019-12-14 21:37:48 +01:00
Sylvia van Os
6cd7a3f5bf Parse extras 2019-12-14 21:00:35 +01:00
Sylvia van Os
09727038ce Don't crash if color is still not valid 2019-12-11 17:19:16 +01:00
Sylvia van Os
896da82b13 Use full .pkpass files for tests 2019-12-11 16:20:32 +01:00
Sylvia van Os
ca93f89e1b Add Eurowings support 2019-12-11 15:32:45 +01:00
Sylvia van Os
9291563cef Fix color parsing 2019-12-11 14:29:41 +01:00
Sylvia van Os
703db472fc Start implementing color parsing 2019-12-10 18:04:12 +01:00
Sylvia van Os
b043320af5 Only try to parse allowed barcode formats 2019-12-10 17:21:04 +01:00
Sylvia van Os
e1f25ed092 Don't crash on unsupported barcode 2019-12-09 19:49:04 +01:00
Sylvia van Os
05d38a0184 XZING uses uppercase typenames 2019-12-09 19:33:17 +01:00
Sylvia van Os
5a046b037e Make linter happy 2019-12-09 17:57:40 +01:00
Sylvia van Os
2f73d510e2 Unit test 2019-12-09 17:55:07 +01:00
Sylvia van Os
2c7cb4769a Parse barcodes if exists 2019-12-09 17:44:13 +01:00
Sylvia van Os
3d543dd23c Use description as note 2019-12-09 17:25:48 +01:00
Sylvia van Os
8637f8d2a1 Initial pkpass support 2019-12-09 17:08:56 +01:00
3981 changed files with 7877 additions and 49353 deletions

View File

@@ -1,4 +0,0 @@
VectorDrawable does not support all SVG features, such as shadows and masks.
Therefore the ic_launcher files are slightly different from the master files: no shadows, minor color tweaks, path optimisation.
Use ic_launcher_*.svg files to generate assets for the app icon
Use master_*.svg files to generate other assets (e.g. feature graphic, playstore icon) or to rework the icon design

View File

@@ -1,3 +0,0 @@
<svg width="108" height="108" viewBox="0 0 108 108" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="108" height="108" fill="#1F4262"/>
</svg>

Before

Width:  |  Height:  |  Size: 155 B

View File

@@ -1,18 +0,0 @@
<svg width="108" height="108" viewBox="0 0 108 108" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M45.5 30.5768L68.0526 22.3683C70.1285 21.6127 72.4239 22.6831 73.1795 24.759L75.9156 32.2765L49.6042 41.8531L45.5 30.5768Z" fill="#F5A3A3"/>
<path d="M70.3604 25.785C70.1715 25.2661 69.5977 24.9985 69.0787 25.1874L49.3451 32.3698L51.3973 38.008L72.0705 30.4835L70.3604 25.785ZM75.9156 32.2765L49.6042 41.8531L45.5 30.5768L68.0526 22.3683C70.1285 21.6127 72.4239 22.6831 73.1795 24.759L75.9156 32.2765Z" fill="#CF1717"/>
<path d="M58.4155 30.5767L35.8629 22.3682C33.787 21.6126 31.4916 22.683 30.7361 24.7589L27.9999 32.2764L54.3113 41.853L58.4155 30.5767Z" fill="#F5A3A3"/>
<path d="M33.5551 25.7849C33.744 25.2659 34.3179 24.9984 34.8368 25.1873L54.5704 32.3697L52.5183 38.0078L31.845 30.4834L33.5551 25.7849ZM27.9999 32.2764L54.3113 41.853L58.4155 30.5767L35.8629 22.3682C33.787 21.6126 31.4916 22.683 30.7361 24.7589L27.9999 32.2764Z" fill="#DD1818"/>
<path d="M28.6958 37.5992C29.0794 35.4236 31.1543 33.9709 33.3298 34.3545L80.6006 42.6897C82.7761 43.0734 84.2288 45.148 83.8452 47.3235L81.8157 58.8328C82.2998 59.0988 84.6663 60.1572 87.416 57.2288V57.229C87.9156 56.6942 88.4507 56.2283 89.0068 55.8575C91.764 54.0193 93.9993 55.2156 93.9993 58.5293C93.9992 61.343 92.3876 64.7782 90.2134 66.8763C86.626 70.5423 80.6933 70.5552 79.7524 70.5332L77.5938 82.7766C77.2101 84.9522 75.1355 86.4049 72.96 86.0213L25.6892 77.6861C25.6723 77.6831 25.6555 77.6797 25.6387 77.6765C23.4483 77.3198 22.0001 76.7026 22 76.0003C22 75.7175 22.2348 75.4485 22.6582 75.2046C22.3986 74.5429 22.3121 73.8036 22.4446 73.0523L28.6958 37.5992Z" fill="#B81414"/>
<path d="M90.6707 60.748C90.6707 61.8526 89.9257 63.2447 89.0066 63.8574C88.0876 64.4701 87.3425 64.0714 87.3425 62.9668C87.3425 61.8622 88.0876 60.4701 89.0066 59.8574C89.9257 59.2447 90.6707 59.6434 90.6707 60.748Z" fill="#E82E2E"/>
<path d="M78 30C80.2091 30 82 31.7909 82 34V70C82 72.2091 80.2091 74 78 74H30C25.5817 74 22 74.8954 22 76V32C22 30.8954 25.5817 30 30 30H78Z" fill="#E82E2E"/>
<path d="M51.2008 54.25C51.615 53.5325 52.5324 53.2867 53.2498 53.7009C53.9449 54.1022 54.1973 54.9757 53.8358 55.6822L53.762 55.8178C53.4005 56.5242 53.6529 57.3977 54.3479 57.799C55.043 58.2003 55.9256 57.9821 56.3567 57.3158L56.4372 57.1841C56.8683 56.5178 57.751 56.2997 58.446 56.7009C59.1634 57.1151 59.4092 58.0325 58.995 58.75C57.7524 60.9023 55.0002 61.6397 52.8479 60.3971C50.6956 59.1544 49.9582 56.4023 51.2008 54.25Z" fill="#8A0F0F"/>
<path d="M52.795 54.25C52.3808 53.5325 51.4634 53.2867 50.746 53.7009C50.051 54.1022 49.7986 54.9757 50.1601 55.6822L50.2339 55.8178C50.5954 56.5242 50.343 57.3977 49.6479 57.799C48.9529 58.2003 48.0702 57.9821 47.6392 57.3158L47.5586 57.1841C47.1276 56.5178 46.2449 56.2997 45.5499 56.7009C44.8324 57.1151 44.5866 58.0325 45.0008 58.75C46.2435 60.9023 48.9956 61.6397 51.1479 60.3971C53.3002 59.1544 54.0377 56.4023 52.795 54.25Z" fill="#8A0F0F"/>
<path d="M53.2989 56.75C52.7216 57.75 51.2782 57.75 50.7009 56.75L48.1028 52.25C47.5254 51.25 48.2471 50 49.4018 50L54.598 50C55.7527 50 56.4744 51.25 55.897 52.25L53.2989 56.75Z" fill="#8A0F0F"/>
<path d="M40.4999 40.5C43.7321 40.5 46.4561 42.6167 47.4233 45.5269C47.6845 46.313 47.2592 47.162 46.4731 47.4233C45.687 47.6846 44.8379 47.2592 44.5766 46.4731C43.9982 44.7328 42.3813 43.5 40.4999 43.5C38.6186 43.5 37.0016 44.7328 36.4233 46.4731C36.162 47.2592 35.3129 47.6846 34.5268 47.4233C33.7407 47.162 33.3153 46.313 33.5766 45.5269C34.5438 42.6167 37.2678 40.5 40.4999 40.5Z" fill="#8A0F0F"/>
<path d="M63.4999 40.5C66.7321 40.5 69.4561 42.6167 70.4233 45.5269C70.6845 46.313 70.2592 47.162 69.4731 47.4233C68.687 47.6846 67.8379 47.2592 67.5766 46.4731C66.9982 44.7328 65.3813 43.5 63.4999 43.5C61.6186 43.5 60.0016 44.7328 59.4233 46.4731C59.162 47.2592 58.3129 47.6846 57.5268 47.4233C56.7407 47.162 56.3153 46.313 56.5766 45.5269C57.5438 42.6167 60.2678 40.5 63.4999 40.5Z" fill="#8A0F0F"/>
<path d="M26 55C25.4477 55 25 54.5523 25 54C25 53.4477 25.4477 53 26 53H42C42.5523 53 43 53.4477 43 54C43 54.5523 42.5523 55 42 55H26Z" fill="#8A0F0F"/>
<path d="M26.3511 60.9363C25.834 61.1302 25.2576 60.8682 25.0637 60.3511C24.8698 59.834 25.1318 59.2575 25.6489 59.0636L41.6488 53.0637C42.1659 52.8698 42.7423 53.1318 42.9362 53.6489C43.1302 54.166 42.8681 54.7424 42.351 54.9363L26.3511 60.9363Z" fill="#8A0F0F"/>
<path d="M61.649 54.9364C61.1319 54.7425 60.8699 54.1661 61.0638 53.6489C61.2577 53.1318 61.8341 52.8698 62.3512 53.0637L78.3511 59.0637C78.8682 59.2576 79.1302 59.834 78.9363 60.3511C78.7424 60.8683 78.166 61.1303 77.6489 60.9364L61.649 54.9364Z" fill="#8A0F0F"/>
<path d="M78 55C78.5523 55 79 54.5523 79 54C79 53.4477 78.5523 53 78 53H62C61.4477 53 61 53.4477 61 54C61 54.5523 61.4477 55 62 55H78Z" fill="#8A0F0F"/>
</svg>

Before

Width:  |  Height:  |  Size: 4.7 KiB

View File

@@ -1,10 +0,0 @@
<svg width="108" height="108" viewBox="0 0 108 108" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M75 31.0001C78.3137 31.0001 81 33.6864 81 37.0001V44.4339C81.8278 45.6739 82.1977 47.2224 81.9185 48.8065L81 54.0147V55.8692C81.2385 55.7207 81.5023 55.5135 81.7856 55.2232L81.864 55.1412C82.3815 54.5878 82.9573 54.0824 83.5825 53.6656L83.7239 53.5736C85.1958 52.6378 87.0298 52.1726 88.6753 53.0533C90.3738 53.9624 90.9907 55.8341 90.9907 57.6305L90.9895 57.7735C90.9384 60.7815 89.2885 64.1632 87.1213 66.2555L87.1211 66.2552C85.2162 68.1795 82.7376 69.0841 80.7588 69.5221C80.6417 69.548 80.5255 69.572 80.4106 69.5951C79.8487 70.7645 78.9192 71.7235 77.7715 72.3223L76.709 78.3509C76.1335 81.6141 73.0215 83.7931 69.7583 83.2179L30.3657 76.2718C30.328 76.2652 30.292 76.2576 30.2576 76.2508C29.124 76.0893 28.0601 75.8434 27.2224 75.4942C26.8046 75.32 26.3313 75.075 25.9299 74.7176C25.538 74.3686 25.0098 73.7183 25.0005 72.7752C25.0005 72.7766 25.0007 72.778 25.0007 72.7794C25.0006 72.7696 25 72.7599 25 72.7501V34.5001C25 33.8368 25.3232 33.2494 25.8203 32.8856C26.2266 32.4885 26.6978 32.2406 27.0352 32.0872C27.6048 31.8283 28.2727 31.6301 28.9683 31.4781C29.7466 31.308 30.6353 31.1794 31.5925 31.0987C31.5854 31.0993 31.5784 31.0998 31.5713 31.1004L32.6726 28.0748L32.7275 27.93C33.9136 24.9114 37.2979 23.3732 40.363 24.4888L52.8337 29.0277L65.3047 24.4888C68.4185 23.3555 71.8617 24.9609 72.9951 28.0748L74.0598 31.0001H75ZM34.8474 73.0001L70.4529 79.2784C71.5406 79.4701 72.5777 78.7437 72.7695 77.6561L73.5906 73.0001H34.8474ZM34 35.0001C32.3461 35.0001 30.8829 35.1543 29.8225 35.3861C29.4849 35.4599 29.2118 35.5362 29 35.6082V69.4718C30.4021 69.1686 32.1493 69.0001 34 69.0001H75L75.103 68.9974C76.1256 68.9455 76.9454 68.1256 76.9973 67.1031L77 67.0001V37.0001C77 35.8955 76.1046 35.0001 75 35.0001H34ZM86.782 56.5904C86.6812 56.5851 86.3996 56.6115 85.8818 56.9412L85.8013 56.9937C85.4702 57.2144 85.1253 57.5101 84.7834 57.8761C84.7824 57.8772 84.7811 57.8783 84.78 57.8795L84.6406 58.025C83.4435 59.2483 82.1848 59.8799 81 60.1214V65.3201C82.1999 64.9382 83.3456 64.358 84.219 63.5015L84.343 63.3775C85.8843 61.8895 86.9907 59.4316 86.9907 57.6305L86.9897 57.5343C86.9769 56.9198 86.8422 56.671 86.782 56.5904ZM46.5574 31.0001L38.9949 28.2476C37.9893 27.8817 36.8807 28.3724 36.469 29.347L36.4314 29.4429L35.8645 31.0001H46.5574ZM69.803 31.0001L69.2363 29.4429C68.8586 28.4051 67.7109 27.8698 66.6729 28.2476L59.1104 31.0001H69.803Z" fill="black"/>
<path d="M55.165 51C56.3197 51.0001 57.0412 52.25 56.4639 53.25L54.6943 56.3145C54.5983 56.7617 54.7947 57.2387 55.2122 57.4797C55.7303 57.7788 56.3927 57.6015 56.6919 57.0835C57.1061 56.3661 58.0235 56.1202 58.741 56.5344C59.4584 56.9487 59.7042 57.8661 59.29 58.5835C58.1625 60.5364 55.6651 61.2054 53.7122 60.0779C53.4495 59.9262 53.2103 59.7495 52.9954 59.553C52.7804 59.7495 52.5414 59.9263 52.2788 60.0779C50.3258 61.2055 47.8283 60.5365 46.7007 58.5835C46.2865 57.8661 46.5324 56.9487 47.2498 56.5344C47.9672 56.1202 48.8846 56.3661 49.2988 57.0835C49.598 57.6016 50.2607 57.7789 50.7788 57.4797C51.2042 57.2341 51.3997 56.7436 51.2905 56.2891L49.5359 53.25C48.9586 52.25 49.6801 51.0001 50.8347 51H55.165Z" fill="black"/>
<path d="M43.2499 42.5C46.0011 42.5 48.4844 44.0694 49.4008 46.4639C49.6968 47.2376 49.3097 48.1048 48.536 48.4009C47.7623 48.697 46.8951 48.3098 46.599 47.5361C46.1806 46.4427 44.9148 45.5 43.2499 45.5C41.5849 45.5 40.3192 46.4427 39.9008 47.5361C39.6047 48.3098 38.7374 48.697 37.9637 48.4009C37.1901 48.1048 36.8029 47.2376 37.099 46.4639C38.0153 44.0694 40.4987 42.5 43.2499 42.5Z" fill="black"/>
<path d="M62.7499 42.5C65.5011 42.5 67.9844 44.0694 68.9008 46.4639C69.1968 47.2376 68.8097 48.1048 68.036 48.4009C67.2623 48.697 66.3951 48.3098 66.099 47.5361C65.6806 46.4427 64.4148 45.5 62.7499 45.5C61.0849 45.5 59.8192 46.4427 59.4008 47.5361C59.1047 48.3098 58.2374 48.697 57.4637 48.4009C56.6901 48.1048 56.3029 47.2376 56.599 46.4639C57.5153 44.0694 59.9987 42.5 62.7499 42.5Z" fill="black"/>
<path d="M33 55C32.1716 55 31.5 54.3284 31.5 53.5C31.5 52.6716 32.1716 52 33 52H44.25C45.0784 52 45.75 52.6716 45.75 53.5C45.75 54.3284 45.0784 55 44.25 55H33Z" fill="black"/>
<path d="M33.6106 59.8701C32.8538 60.2073 31.9671 59.8671 31.6299 59.1104C31.2928 58.3537 31.6329 57.467 32.3896 57.1298L43.6118 52.1298C44.3685 51.7926 45.2553 52.1328 45.5924 52.8895C45.9296 53.6462 45.5894 54.533 44.8327 54.8701L33.6106 59.8701Z" fill="black"/>
<path d="M60.8488 54.8768C60.0885 54.5478 59.7389 53.6647 60.0678 52.9044C60.3968 52.1441 61.2798 51.7945 62.0401 52.1234L73.5957 57.1233C74.356 57.4523 74.7056 58.3353 74.3767 59.0956C74.0477 59.8559 73.1647 60.2056 72.4043 59.8766L60.8488 54.8768Z" fill="black"/>
<path d="M73 52C73.8284 52 74.5 52.6716 74.5 53.5C74.5 54.3284 73.8284 55 73 55H61.5C60.6716 55 60 54.3284 60 53.5C60 52.6716 60.6716 52 61.5 52H73Z" fill="black"/>
</svg>

Before

Width:  |  Height:  |  Size: 4.8 KiB

View File

@@ -1,69 +0,0 @@
<svg width="432" height="432" viewBox="0 0 432 432" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="432" height="432" fill="#1F4262"/>
<g filter="url(#filter0_d_39_7)">
<path d="M182 122.308L272.21 89.4737C280.514 86.4514 289.696 90.7328 292.718 99.0364L303.663 129.107L198.417 167.413L182 122.308Z" fill="#F5A3A3"/>
<path d="M274.263 95.1118C279.452 93.2229 285.191 95.8988 287.08 101.089L295.972 125.521L202.003 159.723L189.69 125.894L274.263 95.1118Z" stroke="#E82E2E" stroke-width="12"/>
</g>
<g filter="url(#filter1_d_39_7)">
<path d="M233.662 122.307L143.452 89.4727C135.148 86.4504 125.966 90.7318 122.944 99.0355L112 129.106L217.245 167.412L233.662 122.307Z" fill="#F5A3A3"/>
<path d="M141.399 95.1109C136.21 93.2219 130.471 95.8978 128.582 101.088L119.69 125.52L213.659 159.722L225.972 125.893L141.399 95.1109Z" stroke="#E82E2E" stroke-width="12"/>
</g>
<g filter="url(#filter2_d_39_7)">
<path d="M114.783 150.397C116.318 141.695 124.617 135.884 133.319 137.419L322.402 170.759C331.104 172.293 336.915 180.592 335.381 189.294L327.263 235.331C329.199 236.395 338.665 240.629 349.664 228.915V228.916C351.663 226.777 353.803 224.913 356.027 223.43C367.056 216.077 375.997 220.862 375.997 234.117C375.997 245.372 369.551 259.113 360.854 267.505C346.504 282.169 322.773 282.222 319.01 282.134L310.375 331.106C308.841 339.809 300.542 345.619 291.84 344.085L102.757 310.745C102.684 310.732 102.611 310.717 102.538 310.703C93.7855 309.276 88 306.809 88 304.001C88 302.87 88.9396 301.794 90.6338 300.818C89.5953 298.172 89.2485 295.215 89.7783 292.21L114.783 150.397Z" fill="#B81414"/>
</g>
<circle cx="8" cy="8" r="8" transform="matrix(0.83205 -0.5547 0 1 349.37 243.867)" fill="#E82E2E"/>
<g filter="url(#filter3_d_39_7)">
<path d="M312 120C320.837 120 328 127.163 328 136V280C328 288.837 320.837 296 312 296H120C102.327 296 88 299.582 88 304V128C88 123.582 102.327 120 120 120H312Z" fill="#E82E2E"/>
</g>
<path d="M230.785 232C227.471 237.74 220.132 239.706 214.392 236.392C208.653 233.079 206.686 225.74 210 220" stroke="#8A0F0F" stroke-width="12" stroke-linecap="round"/>
<path d="M185.2 232C188.513 237.74 195.853 239.706 201.592 236.392C207.332 233.079 209.298 225.74 205.984 220" stroke="#8A0F0F" stroke-width="12" stroke-linecap="round"/>
<path d="M213.196 227C210.887 231 205.113 231 202.804 227L192.412 209C190.102 205 192.989 200 197.608 200L218.392 200C223.011 200 225.898 205 223.588 209L213.196 227Z" fill="#8A0F0F"/>
<path d="M184 184C180.909 174.699 172.227 168 162 168C151.773 168 143.091 174.699 140 184" stroke="#8A0F0F" stroke-width="12" stroke-linecap="round"/>
<path d="M276 184C272.909 174.699 264.227 168 254 168C243.773 168 235.091 174.699 232 184" stroke="#8A0F0F" stroke-width="12" stroke-linecap="round"/>
<path d="M168 216H104" stroke="#8A0F0F" stroke-width="8" stroke-linecap="round"/>
<path d="M168 216L104 240" stroke="#8A0F0F" stroke-width="8" stroke-linecap="round"/>
<path d="M312 240L248 216" stroke="#8A0F0F" stroke-width="8" stroke-linecap="round"/>
<path d="M248 216H312" stroke="#8A0F0F" stroke-width="8" stroke-linecap="round"/>
<defs>
<filter id="filter0_d_39_7" x="166" y="72.5049" width="153.663" height="110.908" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset/>
<feGaussianBlur stdDeviation="8"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_39_7"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_39_7" result="shape"/>
</filter>
<filter id="filter1_d_39_7" x="95.9995" y="72.5039" width="153.663" height="110.908" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset/>
<feGaussianBlur stdDeviation="8"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_39_7"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_39_7" result="shape"/>
</filter>
<filter id="filter2_d_39_7" x="72" y="121.173" width="319.997" height="239.158" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset/>
<feGaussianBlur stdDeviation="8"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_39_7"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_39_7" result="shape"/>
</filter>
<filter id="filter3_d_39_7" x="72" y="104" width="272" height="216" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset/>
<feGaussianBlur stdDeviation="8"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_39_7"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_39_7" result="shape"/>
</filter>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 5.7 KiB

View File

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 9.5 KiB

View File

@@ -1,30 +0,0 @@
version: 2
updates:
- package-ecosystem: "gradle"
directory: "/"
registries:
- google
- gradlePluginPortal
- jitpack
- mavenCentral
schedule:
interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
# Workaround for https://github.com/dependabot/dependabot-core/issues/6888
registries:
google:
type: maven-repository
url: "https://dl.google.com/dl/android/maven2/"
gradlePluginPortal:
type: maven-repository
url: "https://plugins.gradle.org/m2/"
jitpack:
type: maven-repository
url: "https://jitpack.io/"
mavenCentral:
type: maven-repository
url: "https://repo1.maven.org/maven2/"

View File

@@ -1,70 +1,27 @@
name: Android CI
on:
workflow_dispatch:
push:
branches:
- main
- staging
- trying
branches: [ master ]
pull_request:
branches:
- main
permissions:
actions: none
checks: none
contents: read
deployments: none
discussions: none
id-token: none
issues: none
packages: none
pages: none
pull-requests: none
repository-projects: none
security-events: none
statuses: none
env:
JAVA_HOME: /usr/lib/jvm/java-21-openjdk-amd64
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
flavor: [Foss, Gplay]
steps:
- uses: actions/checkout@v6
- uses: gradle/actions/wrapper-validation@v5
- name: set up OpenJDK 21
run: |
sudo apt-get update
sudo apt-get install -y openjdk-21-jdk-headless
sudo update-alternatives --auto java
- name: Build
run: ./gradlew assemble${{ matrix.flavor }}Release
- name: Check lint
run: ./gradlew lint${{ matrix.flavor }}Release
- name: Run unit tests
run: timeout 5m ./gradlew test${{ matrix.flavor }}ReleaseUnitTest || { ./gradlew --stop && timeout 5m ./gradlew test${{ matrix.flavor }}ReleaseUnitTest; }
- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Run instrumented tests (API 21)
uses: ReactiveCircus/android-emulator-runner@v2
with:
api-level: 21
arch: x86_64
script: ./gradlew connected${{ matrix.flavor }}DebugAndroidTest
- name: Run instrumented tests (API 35)
uses: ReactiveCircus/android-emulator-runner@v2
with:
api-level: 35
arch: x86_64
script: ./gradlew connected${{ matrix.flavor }}DebugAndroidTest
- name: Archive test results
if: always()
uses: actions/upload-artifact@v5.0.0
with:
name: test-results-flavor${{ matrix.flavor }}
path: app/build/reports
- uses: actions/checkout@v2
- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build
run: ./gradlew assembleRelease
- name: Check lint
run: ./gradlew lintRelease
- name: Run unit tests
run: ./gradlew testReleaseUnitTest
- name: FindBugs
run: ./gradlew findbugs

View File

@@ -1,34 +0,0 @@
name: Convert CHANGELOG to Fastlane
on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'CHANGELOG.md'
permissions:
contents: write
pull-requests: write
jobs:
convert_changelog_to_fastlane:
runs-on: ubuntu-latest
name: Convert CHANGELOG to Fastlane
steps:
- name: Checkout repo
id: checkout
uses: actions/checkout@v6
- name: Setup Python
uses: actions/setup-python@v6.1.0
with:
python-version: '3.x'
- name: Run converter script
run: python .scripts/changelog_to_fastlane.py
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7.0.11
with:
title: "Update Fastlane changelogs"
commit-message: "Update Fastlane changelogs"
branch-suffix: timestamp

View File

@@ -1,32 +0,0 @@
name: Write contributors to file
on:
workflow_dispatch:
schedule:
- cron: '3 4 * * 0'
permissions:
contents: write
pull-requests: write
jobs:
contributors_to_file:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
name: Write contributors to file
steps:
- name: Checkout repo
id: checkout
uses: actions/checkout@v6
- name: Update contributors
id: update_contributors
uses: TheLastProject/contributors-to-file-action@v3.2.0
with:
file_in_repo: app/src/main/res/raw/contributors.txt
min_commit_count: 5
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7.0.11
with:
title: "Update contributors"
commit-message: "Update contributors"
branch-suffix: timestamp

View File

@@ -1,38 +0,0 @@
name: Generate feature graphic
on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'fastlane/**/title.txt'
- '.scripts/generate_feature_graphic/**'
permissions:
contents: write
pull-requests: write
jobs:
generate-feature-graphic:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install requirements
run: |
sudo apt-get update
sudo apt-get install inkscape mat2 optipng xvfb
# Install 200 weight versions of relevant Noto (to use for languages not supported by Lexend Deca)
sudo apt-get install fonts-noto-extra fonts-noto-cjk-extra
# Custom fonts
mkdir "$HOME/.fonts"
find .scripts/generate_feature_graphic/fonts -name '*.ttf' -exec cp {} "$HOME/.fonts" \;
fc-cache
- name: Generate featureGraphic.png for each language
run: .scripts/generate_feature_graphic/generate_feature_graphic.sh
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7.0.11
with:
title: "Update feature graphic"
commit-message: "Update feature graphic"
branch-suffix: timestamp

View File

@@ -1,34 +0,0 @@
name: i18n check
on:
workflow_dispatch:
push:
branches:
- main
- staging
- trying
pull_request:
branches:
- main
permissions:
actions: none
checks: none
contents: read
deployments: none
discussions: none
id-token: none
issues: none
packages: none
pages: none
pull-requests: none
repository-projects: none
security-events: none
statuses: none
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Fail on bad translations
run: if grep -ri "&lt;xliff" app/src/main/res/values*/strings.xml; then echo "Invalidly escaped translations found"; exit 1; fi
- name: Check app_name consistency
run: bash .scripts/check_app_name.sh

View File

@@ -1,19 +0,0 @@
name: Update Gradle Wrapper
on:
schedule:
- cron: "0 0 * * *"
permissions:
contents: write
pull-requests: write
jobs:
update-gradle-wrapper:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Update Gradle Wrapper
uses: gradle-update/update-gradle-wrapper-action@v2

View File

@@ -1,30 +0,0 @@
name: Update locales
on:
workflow_dispatch:
push:
branches:
- main
paths:
- app/src/main/res/values-*/strings.xml
- app/src/main/res/values/settings.xml
permissions:
contents: write
pull-requests: write
jobs:
update-locales:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Add new locales
run: .scripts/new-locales.py
- name: Update locales
run: .scripts/locales.py
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7.0.11
with:
title: "Update locales"
commit-message: "Update locales"
branch-suffix: timestamp

26
.gitignore vendored
View File

@@ -1,30 +1,8 @@
# Android Studio generated (superseded/unused rules commented out)
*.iml
.gradle
/local.properties
#/.idea/caches
#/.idea/libraries
#/.idea/modules.xml
#/.idea/workspace.xml
#/.idea/navEditor.xml
#/.idea/assetWizardSettings.xml
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
#local.properties
# Android extras
/app/*.log
/app/build
/app/release
/.idea
# Bundle
/.bundle/
/vendor/bundle
/lib/bundler/man/
# Catima-specific
SHA256SUMS

View File

@@ -1,33 +0,0 @@
#!/usr/bin/python3
import os
import re
changelogs = {}
with open('CHANGELOG.md') as changelog:
version_code = None
text = []
for line in changelog:
if line.startswith("## "):
if version_code != None:
changelogs[version_code] = text
text = []
match = re.match("## \S* - (\d*).*", line)
if not match:
raise ValueError(f"Invalid version line: {line}")
version_code = match.group(1)
elif line:
# Turn Markdown [links](to_url) into links (to_url)
text.append(re.sub(r'\[(.*?)\]\((.*?)\)', r'\1 (\2)', line))
for version, description in changelogs.items():
description = "".join(description).strip()
if not description:
continue
with open(os.path.join("fastlane", "metadata", "android", "en-US", "changelogs", f"{version}.txt"), "w") as fastlane_file:
fastlane_file.write(description)

View File

@@ -1,71 +0,0 @@
#!/bin/bash
set -e
shopt -s lastpipe # Run last command in a pipeline in the current shell.
# Colors
LIGHTCYAN='\033[1;36m'
GREEN='\033[0;32m'
RED='\033[0;31m'
NC='\033[0m' # No Color
# Vars
SUCCESS=1
CANONICAL_TITLE="Catima"
ALLOWLIST=("ar" "bn" "fa" "fa-IR" "he-IL" "hi" "hi-IN" "kn" "kn-IN" "ml" "mr" "ta" "ta-IN" "zh-rTW" "zh-TW") # TODO: Link values and fastlane with different codes together
function get_lang() {
LANG_DIRNAME=$(dirname "$FILE" | xargs basename)
LANG=${LANG_DIRNAME#values-} # Fetch lang name
LANG=${LANG#values} # Handle "app/src/main/res/values"
LANG=${LANG:-en} # Default to en
}
# FIXME: This function should use its own variables and return a success/fail status, instead of working on global variables
function check() {
# FIXME: This allows inconsistency between values and fastlane if the app name is not Catima
# When the app name is not Catima, it should still check if title.txt and strings.xml use the same app name (or start)
if echo "${ALLOWLIST[*]}" | grep -w -q "${LANG}" || [[ -z ${APP_NAME} ]]; then
return 0
fi
if [[ ${FILE} == *"title.txt" ]]; then
if [[ ! ${APP_NAME} =~ ^${CANONICAL_TITLE} ]]; then
echo -e "${RED}Error: ${LIGHTCYAN}title in $FILE ($LANG) is ${RED}'$APP_NAME'${LIGHTCYAN}, expected to start with ${GREEN}'$CANONICAL_TITLE'. ${NC}"
SUCCESS=0
fi
else
if [[ ${APP_NAME} != "${CANONICAL_TITLE}" ]]; then
echo -e "${RED}Error: ${LIGHTCYAN}app_name in $FILE ($LANG) is ${RED}'$APP_NAME'${LIGHTCYAN}, expected ${GREEN}'$CANONICAL_TITLE'. ${NC}"
SUCCESS=0
fi
fi
}
# FIXME: This checks all title.txt and strings.xml files separately, but it needs to check if the title.txt and strings.xml match for a language as well
echo -e "${LIGHTCYAN}Checking title.txt's. ${NC}"
find fastlane/metadata/android/* -maxdepth 1 -type f -name "title.txt" | while read -r FILE; do
APP_NAME=$(head -n 1 "$FILE")
get_lang
check
done
echo -e "${LIGHTCYAN}Checking string.xml's. ${NC}"
find app/src/main/res/values* -maxdepth 1 -type f -name "strings.xml" | while read -r FILE; do
# FIXME: This only checks app_name, but there are more strings with Catima inside it
# It should check the original English text for all strings that contain Catima and ensure they use the correct app_name for consistency
APP_NAME=$(grep -oP '<string name="app_name">\K[^<]+' "$FILE" | head -n1)
get_lang
check
done
if [[ $SUCCESS -eq 1 ]]; then
echo -e "\n${GREEN}Success!! All app_name values match the canonical title. ${NC}"
else
echo -e "\n${RED}Unsuccessful!! Some app_name values did not match the canonical titles. ${NC}"
exit 1
fi

View File

@@ -1,76 +0,0 @@
<svg width="1024" height="500" viewBox="0 0 1024 500" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_78_203)">
<path d="M1024 0H0V500H1024V0Z" fill="#1F4262"/>
<text fill="white" xml:space="preserve" style="white-space: pre" font-family="Lexend" font-size="35" letter-spacing="0em"><tspan x="481" y="325">Loyalty Card Wallet</tspan></text>
<text fill="white" xml:space="preserve" style="white-space: pre" font-family="Lobster" font-size="150" letter-spacing="0em"><tspan x="469" y="270">Catima</tspan></text>
<g filter="url(#filter0_d_78_203)">
<path d="M218 156.307L308.21 123.473C316.514 120.45 325.696 124.732 328.718 133.035L339.663 163.106L234.417 201.412L218 156.307Z" fill="#F5A3A3"/>
<path d="M310.263 129.111C315.452 127.222 321.191 129.898 323.08 135.088L331.972 159.52L238.003 193.722L225.69 159.893L310.263 129.111Z" stroke="#E82E2E" stroke-width="12"/>
</g>
<g filter="url(#filter1_d_78_203)">
<path d="M269.662 156.307L179.452 123.473C171.148 120.45 161.966 124.732 158.944 133.035L148 163.106L253.245 201.412L269.662 156.307Z" fill="#F5A3A3"/>
<path d="M177.399 129.111C172.21 127.222 166.471 129.898 164.582 135.088L155.69 159.52L249.659 193.722L261.972 159.893L177.399 129.111Z" stroke="#E82E2E" stroke-width="12"/>
</g>
<g filter="url(#filter2_d_78_203)">
<path d="M150.783 184.396C152.318 175.694 160.617 169.884 169.319 171.418L358.402 204.759C367.104 206.293 372.915 214.592 371.381 223.294L363.263 269.331C365.199 270.395 374.665 274.629 385.664 262.915V262.916C387.662 260.777 389.802 258.913 392.027 257.43C403.056 250.077 411.997 254.862 411.997 268.117C411.997 279.372 405.55 293.113 396.853 301.505C382.504 316.169 358.773 316.221 355.01 316.133L346.375 365.106C344.84 373.809 336.542 379.619 327.84 378.085L138.757 344.744C138.689 344.732 138.622 344.719 138.555 344.706C129.793 343.279 124 340.81 124 338.001C124 336.87 124.939 335.794 126.633 334.818C125.594 332.171 125.248 329.214 125.778 326.209L150.783 184.396Z" fill="#B81414"/>
</g>
<circle cx="8" cy="8" r="8" transform="matrix(0.83205 -0.5547 0 1 385.37 277.867)" fill="#E82E2E"/>
<g filter="url(#filter3_d_78_203)">
<path d="M348 154C356.837 154 364 161.163 364 170V314C364 322.837 356.837 330 348 330H156C138.327 330 124 333.582 124 338V162C124 157.582 138.327 154 156 154H348Z" fill="#E82E2E"/>
</g>
<path d="M266.784 266C263.471 271.74 256.132 273.706 250.392 270.392C244.653 267.079 242.686 259.74 246 254" stroke="#8A0F0F" stroke-width="12" stroke-linecap="round"/>
<path d="M221.2 266C224.514 271.74 231.853 273.706 237.592 270.392C243.332 267.079 245.298 259.74 241.984 254" stroke="#8A0F0F" stroke-width="12" stroke-linecap="round"/>
<path d="M249.196 261C246.887 265 241.113 265 238.804 261L228.412 243C226.102 239 228.989 234 233.608 234L254.392 234C259.011 234 261.898 239 259.588 243L249.196 261Z" fill="#8A0F0F"/>
<path d="M220 218C216.909 208.699 208.227 202 198 202C187.773 202 179.091 208.699 176 218" stroke="#8A0F0F" stroke-width="12" stroke-linecap="round"/>
<path d="M312 218C308.909 208.699 300.227 202 290 202C279.773 202 271.091 208.699 268 218" stroke="#8A0F0F" stroke-width="12" stroke-linecap="round"/>
<path d="M204 250H140" stroke="#8A0F0F" stroke-width="8" stroke-linecap="round"/>
<path d="M204 250L140 274" stroke="#8A0F0F" stroke-width="8" stroke-linecap="round"/>
<path d="M348 274L284 250" stroke="#8A0F0F" stroke-width="8" stroke-linecap="round"/>
<path d="M284 250H348" stroke="#8A0F0F" stroke-width="8" stroke-linecap="round"/>
</g>
<defs>
<filter id="filter0_d_78_203" x="202" y="106.504" width="153.663" height="110.908" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset/>
<feGaussianBlur stdDeviation="8"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_78_203"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_78_203" result="shape"/>
</filter>
<filter id="filter1_d_78_203" x="132" y="106.504" width="153.663" height="110.908" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset/>
<feGaussianBlur stdDeviation="8"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_78_203"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_78_203" result="shape"/>
</filter>
<filter id="filter2_d_78_203" x="108" y="155.172" width="319.997" height="239.159" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset/>
<feGaussianBlur stdDeviation="8"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_78_203"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_78_203" result="shape"/>
</filter>
<filter id="filter3_d_78_203" x="108" y="138" width="272" height="216" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset/>
<feGaussianBlur stdDeviation="8"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_78_203"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_78_203" result="shape"/>
</filter>
<clipPath id="clip0_78_203">
<rect width="1024" height="500" fill="white"/>
</clipPath>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 6.2 KiB

View File

@@ -1,93 +0,0 @@
Copyright 2018 The Lexend Project Authors (https://github.com/googlefonts/lexend), with Reserved Font Name “RevReading Lexend”.
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
https://openfontlicense.org
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

View File

@@ -1,93 +0,0 @@
Copyright 2010 The Lobster Project Authors (https://github.com/impallari/The-Lobster-Font), with Reserved Font Name "Lobster".
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
https://openfontlicense.org
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

View File

@@ -1,63 +0,0 @@
#!/bin/bash
set -euo pipefail
script_location="$(dirname "$(readlink -f "$0")")"
for lang in "$script_location/../../fastlane/metadata/android/"*; do
# Skip languages without title.txt
if [ ! -f "$lang/title.txt" ]; then
continue
fi
pushd "$lang"
# Place temporary copy for editing if needed
cp "$script_location/featureGraphic.svg" featureGraphic.svg
if grep -q — title.txt; then
# Try splitting title.txt on — (em dash)
IFS='—' read -r appname subtext < title.txt
elif grep -q title.txt; then
# No result, try splitting title.txt on (en dash)
IFS='' read -r appname subtext < title.txt
elif grep -q - title.txt; then
# No result, try splitting on - (dash)
IFS='-' read -r appname subtext < title.txt
else
# No result, use the full title as app name and default subtext
appname=$(< title.txt)
subtext="Loyalty Card Wallet"
fi
export appname=${appname%% }
export subtext=${subtext## }
# If the appname isn't Catima or there is subtext, change the .svg accordingly
if [ "$appname" != "Catima" ] || [ -n "$subtext" ]; then
perl -pi -e 's/Catima/$ENV{appname}/' featureGraphic.svg
perl -pi -e 's/Loyalty Card Wallet/$ENV{subtext}/' featureGraphic.svg
# Set correct font or font size for language if needed
# (Lobster and Lexend have limited language support)
case "$(basename "$lang")" in
bg|el-GR|ru-RU|uk) sed -i "s/Lexend/Noto Sans/" featureGraphic.svg ;;
ar|fa-IR) sed -i -e 's/svg direction="ltr"/svg direction="rtl"/' -e "s/Lobster/Noto Sans Arabic/" -e "s/Lexend/Noto Sans Arabic/" featureGraphic.svg ;;
he-IL) sed -i -e "s/Lobster/Noto Sans Hebrew/" -e "s/Lexend/Noto Sans Hebrew/" featureGraphic.svg ;;
hi-IN) sed -i -e "s/Lobster/Noto Sans Devanagari/" -e "s/Lexend/Noto Sans Devanagari/" featureGraphic.svg ;;
ja-JP) sed -i "s/Lexend/Noto Sans CJK JP/" featureGraphic.svg ;;
kn-IN) sed -i -e 's/font-size="150"/font-size="125"/' -e 's/\(<tspan x="469" \)y="270"/\1y="240"/' -e "s/Lobster/Noto Sans Kannada/" -e "s/Lexend/Noto Sans Kannada/" featureGraphic.svg ;;
ko) sed -i "s/Lexend/Noto Sans CJK KR/" featureGraphic.svg ;;
ta-IN) sed -i -e 's/font-size="150"/font-size="125"/' -e 's/\(<tspan x="469" \)y="270"/\1y="240"/' featureGraphic.svg ;;
zh-CN) sed -i "s/Lexend/Noto Sans CJK SC/" featureGraphic.svg ;;
zh-TW) sed -i -e "s/Lobster/Noto Sans CJK TC/" -e "s/Lexend/Noto Sans CJK TC/" featureGraphic.svg ;;
*) ;;
esac
fi
# Ensure images directory exists
mkdir -p images
# Generate .png (we use Inkscape because ImageMagick ignores RTL)
xvfb-run inkscape --export-filename=images/featureGraphic.png featureGraphic.svg
# Optimize .png
optipng images/featureGraphic.png
# Remove metadata (timestamps) from .png
mat2 --inplace images/featureGraphic.png
# Remove temporary .svg
rm featureGraphic.svg
popd
done

View File

@@ -1,36 +0,0 @@
#!/usr/bin/python3
import subprocess
import xml.etree.ElementTree as ET
root = ET.parse("app/src/main/res/values/settings.xml").getroot()
for e in root.findall("string-array"):
if e.get("name") == "locale_values":
locales = [x.text for x in e if x.text]
break
locales = [
# e.g. de or es-rAR (not es-AR)
loc.replace("-", "-r") if "-" in loc and loc[loc.index("-") + 1] != "r" else loc
for loc in locales
]
res = ", ".join(f'"{loc}"' for loc in locales)
sed = [
"sed",
"-i",
f"s/resourceConfigurations .*/resourceConfigurations += listOf({res})/",
"app/build.gradle.kts"
]
subprocess.run(sed, check=True)
with open("app/src/main/res/xml/locales_config.xml", "w", encoding="utf-8") as fh:
fh.write('<?xml version="1.0" encoding="utf-8"?>\n')
fh.write('<locale-config xmlns:android="http://schemas.android.com/apk/res/android">\n')
fh.write(' <locale android:name="en-US" />\n')
for loc in locales:
if loc != "en":
# e.g. de or en-AR (not es-rAR)
loc = loc.replace("-r", "-")
fh.write(f' <locale android:name="{loc}" />\n')
fh.write('</locale-config>\n')

View File

@@ -1,133 +0,0 @@
#!/usr/bin/python3
import glob
import re
from typing import Iterator, List, Tuple
import requests
MIN_PERCENT = 90
NOT_LANGS = ("night", "w600dp")
REPLACE_CODES = {
"el": "el-rGR",
"he": "iw",
"id": "in-rID",
"ro": "ro-rRO",
"zh_Hans": "zh-rCN",
"zh_Hant": "zh-rTW",
}
STATS_URL = "https://hosted.weblate.org/api/components/catima/catima/statistics/"
class Error(Exception):
pass
def get_weblate_langs() -> List[Tuple[str, int]]:
url = STATS_URL
results = []
for _ in range(16): # avoid endless loops just in case
r = requests.get(url, timeout=5)
r.raise_for_status()
data = r.json()
for lang in data["results"]:
if lang["code"] != "en":
code = REPLACE_CODES.get(lang["code"], lang["code"]).replace("_", "-r")
results.append((code, round(lang["translated_percent"])))
url = data["next"]
if not url:
return sorted(results)
if not url.split("?")[0] == STATS_URL:
raise Error(f"Unexpected next URL: {url}")
raise Error("Too many pages")
def get_dir_langs() -> List[str]:
results = []
for d in glob.glob("app/src/main/res/values-*"):
code = d.split("-", 1)[1]
if code not in NOT_LANGS:
results.append(code)
return sorted(results)
def get_xml_langs() -> List[Tuple[str, bool]]:
results = []
in_section = False
with open("app/src/main/res/values/settings.xml", encoding="utf-8") as fh:
for line in fh:
if not in_section and 'name="locale_values"' in line:
in_section = True
elif in_section:
if "string-array" in line:
break
disabled = "<!--" in line
if m := re.search(r">(.*)<", line):
if m[1] != "en":
results.append((m[1], disabled))
return sorted(results)
def update_xml_langs(langs: List[Tuple[str, bool]]) -> None:
lines: List[str] = []
in_section = False
with open("app/src/main/res/values/settings.xml", encoding="utf-8") as fh:
for line in fh:
if not in_section and 'name="locale_values"' in line:
in_section = True
elif in_section:
if "string-array" in line:
in_section = False
lines.extend(_lang_lines(langs))
else:
continue
lines.append(line)
with open("app/src/main/res/values/settings.xml", "w", encoding="utf-8") as fh:
for line in lines:
fh.write(line)
def _lang_lines(langs: List[Tuple[str, bool]]) -> Iterator[str]:
yield " <item />\n"
for lang, disabled in sorted(langs + [("en", False)]):
if disabled:
yield f" <!-- <item>{lang}</item> -->\n"
else:
yield f" <item>{lang}</item>\n"
def main() -> None:
web_langs = get_weblate_langs()
dir_langs = get_dir_langs()
xml_langs = get_xml_langs()
web_codes = set(code for code, _ in web_langs)
dir_codes = set(dir_langs)
xml_codes = set(code for code, _ in xml_langs)
if diff := web_codes - dir_codes:
print(f"WARNING: Weblate codes w/o dir: {diff}")
if diff := xml_codes - dir_codes:
print(f"WARNING: XML codes w/o dir: {diff}")
percentages = dict(web_langs)
all_langs = xml_langs[:]
# add new langs as disabled
for code in dir_codes - xml_codes:
all_langs.append((code, True))
# enable disabled langs if they are at least MIN_PERCENT translated now
updated_langs = sorted(
(code, percentages[code] < MIN_PERCENT if disabled else disabled)
for code, disabled in all_langs
)
if updated_langs != xml_langs:
print("Updating...")
update_xml_langs(updated_langs)
if __name__ == "__main__":
main()

10
.tx/config Normal file
View File

@@ -0,0 +1,10 @@
[main]
host = https://www.transifex.com
[loyalty-card-locker.stringsxml]
file_filter = app/src/main/res/values-<lang>/strings.xml
minimum_perc = 0
source_file = app/src/main/res/values/strings.xml
source_lang = en
type = ANDROID

View File

File diff suppressed because it is too large Load Diff

View File

@@ -1,128 +0,0 @@
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
catima.g9ex3@hackerchick.me.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.

View File

@@ -1,53 +1,14 @@
# How to Submit Patches to the Catima Project
How to Submit Patches to the Loyalty Card Keychain Project
===============================================================================
https://github.com/brarcher/budget-watch
This document is intended to act as a guide to help you contribute to the
Catima project. It is not perfect, and there will always be exceptions
Loyalty Card Keychain project. It is not perfect, and there will always be exceptions
to the rules described here, but by following the instructions below you
should have a much easier time getting your work merged with the upstream
project.
When contributing, you certify that you agree to and have the rights to submit
your contribution under the project's license and understand that git will
store your name and email address in project history indefinitely.
## Translation Changes
Translation changes are managed through [Weblate](https://hosted.weblate.org/projects/catima/).
Please do not supply translation updates directly through GitHub.
Weblate requires an account to translate changes, so please log in before
you start translating.
While using Weblate, please do not ignore any of its warnings. They exist
for good reason.
## Code Changes
Note: submitting LLM ("AI") generated code is strongly discouraged, as such
code is often (subtly) incorrect or overcomplicated (for example: unnecessarily
pulling in extra libraries for functionality already covered by existing
libraries). It also often makes unrelated changes that increase the risk of
introducing new issues and complicates reviewing. Even when it doesn't do any
of the before mentioned things, it will often not fit the coding style and flow
of existing code, requiring excessive refactoring.
While we cannot ever control or be sure if LLMs were used to generate the
submitted code, it is your responsibility to ensure that whatever code you
submit is correct and fits within the design of existing code. It is never
acceptable to defend a change by stating a LLM suggested it.
This is a personal plea more than anything: please understand that writing code
is the easy part. The hard part is making sure the code fits the design of the
rest of the application and is maintainable. Reviewing is a very time-consuming
task for this reason. Please do not use LLMs to quickly generate a "fix" and
moving the cost of labor to me as a reviewer. If you do use LLMs to generate
part of your code, please be open about this, explain what was generated how
and how you confirmed and refactored the code to fit the project and minimized
risk.
Please never submit LLM-generated code as-is.
### Test Your Code
## Test Your Code
There are four possible tests you can run to verify your code. The first
is unit tests, which check the basic functionality of the application, and
@@ -60,17 +21,21 @@ These are the Android lint checker, run using:
# ./gradlew lintRelease
and FindBugs, run using:
# ./gradlew findbugs
The final check is by testing the application on a live device and verifying
the basic functionality works as expected.
### Make Sure Your Code is Tested
## Make Sure Your Code is Tested
The Catima code uses a fair number of unit tests to verify that
The Loyalty Card Keychain code uses a fair number of unit tests to verify that
the basic functionality is working. Submissions which add functionality
or significantly change the existing code should include additional tests
to verify the proper operation of the proposed changes.
### Explain Your Work
## Explain Your Work
At the top of every patch you should include a description of the problem you
are trying to solve, how you solved it, and why you chose the solution you
@@ -79,10 +44,48 @@ if you can describe/include a reproducer for the problem in the description as
well as instructions on how to test for the bug and verify that it has been
fixed.
### Submit Patch(es) for Review
## Sign Your Work
The sign-off is a simple line at the end of the patch description, which
certifies that you wrote it or otherwise have the right to pass it on as an
open-source patch. The "Developer's Certificate of Origin" pledge is taken
from the Linux Kernel and the rules are pretty simple:
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
... then you just add a line to the bottom of your patch description, with
your real name, saying:
Signed-off-by: Random J Developer <random@developer.example.org>
## Submit Patch(es) for Review
Finally, you will need to submit your patches so that they can be reviewed
and potentially merged into the main Catima repository. The preferred
way to do this is to submit a Pull Request to the Catima project.
Changes need to apply cleanly onto the main branch and pass all
and potentially merged into the main Loyalty Card Keychain repository. The preferred
way to do this is to submit a Pull Request to the Loyalty Card Keychain project.
Changes need to apply cleanly onto the master branch and pass all
unit tests and produce no errors during static analysis.

View File

@@ -1,3 +0,0 @@
github: TheLastProject
custom:
- "https://paypal.me/sylviavanos"

View File

@@ -1,8 +0,0 @@
source "https://rubygems.org"
gem "fastlane"
# https://github.com/fastlane/fastlane/issues/29183
gem "abbrev"
gem "mutex_m"
gem "ostruct"

View File

@@ -1,231 +0,0 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.7)
base64
nkf
rexml
abbrev (0.1.2)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.4.0)
aws-partitions (1.1117.0)
aws-sdk-core (3.226.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.992.0)
aws-sigv4 (~> 1.9)
base64
jmespath (~> 1, >= 1.6.1)
logger
aws-sdk-kms (1.105.0)
aws-sdk-core (~> 3, >= 3.225.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.189.1)
aws-sdk-core (~> 3, >= 3.225.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
aws-sigv4 (1.12.1)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
base64 (0.3.0)
claide (1.1.0)
colored (1.2)
colored2 (3.1.2)
commander (4.6.0)
highline (~> 2.0.0)
declarative (0.0.20)
digest-crc (0.7.0)
rake (>= 12.0.0, < 14.0.0)
domain_name (0.6.20240107)
dotenv (2.8.1)
emoji_regex (3.2.3)
excon (0.112.0)
faraday (1.10.4)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0)
faraday-multipart (~> 1.0)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.0)
faraday-patron (~> 1.0)
faraday-rack (~> 1.0)
faraday-retry (~> 1.0)
ruby2_keywords (>= 0.0.4)
faraday-cookie_jar (0.0.7)
faraday (>= 0.8.0)
http-cookie (~> 1.0.0)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.1)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-multipart (1.1.1)
multipart-post (~> 2.0)
faraday-net_http (1.0.2)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.3)
faraday_middleware (1.2.1)
faraday (~> 1.0)
fastimage (2.4.0)
fastlane (2.228.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
aws-sdk-s3 (~> 1.0)
babosa (>= 1.0.3, < 2.0.0)
bundler (>= 1.12.0, < 3.0.0)
colored (~> 1.2)
commander (~> 4.6)
dotenv (>= 2.1.1, < 3.0.0)
emoji_regex (>= 0.1, < 4.0)
excon (>= 0.71.0, < 1.0.0)
faraday (~> 1.0)
faraday-cookie_jar (~> 0.0.6)
faraday_middleware (~> 1.0)
fastimage (>= 2.1.0, < 3.0.0)
fastlane-sirp (>= 1.0.0)
gh_inspector (>= 1.1.2, < 2.0.0)
google-apis-androidpublisher_v3 (~> 0.3)
google-apis-playcustomapp_v1 (~> 0.1)
google-cloud-env (>= 1.6.0, < 2.0.0)
google-cloud-storage (~> 1.31)
highline (~> 2.0)
http-cookie (~> 1.0.5)
json (< 3.0.0)
jwt (>= 2.1.0, < 3)
mini_magick (>= 4.9.4, < 5.0.0)
multipart-post (>= 2.0.0, < 3.0.0)
naturally (~> 2.2)
optparse (>= 0.1.1, < 1.0.0)
plist (>= 3.1.0, < 4.0.0)
rubyzip (>= 2.0.0, < 3.0.0)
security (= 0.1.5)
simctl (~> 1.6.3)
terminal-notifier (>= 2.0.0, < 3.0.0)
terminal-table (~> 3)
tty-screen (>= 0.6.3, < 1.0.0)
tty-spinner (>= 0.8.0, < 1.0.0)
word_wrap (~> 1.0.0)
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.4.1)
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
fastlane-sirp (1.0.0)
sysrandom (~> 1.0)
gh_inspector (1.1.3)
google-apis-androidpublisher_v3 (0.54.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-core (0.11.3)
addressable (~> 2.5, >= 2.5.1)
googleauth (>= 0.16.2, < 2.a)
httpclient (>= 2.8.1, < 3.a)
mini_mime (~> 1.0)
representable (~> 3.0)
retriable (>= 2.0, < 4.a)
rexml
google-apis-iamcredentials_v1 (0.17.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-playcustomapp_v1 (0.13.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-storage_v1 (0.31.0)
google-apis-core (>= 0.11.0, < 2.a)
google-cloud-core (1.8.0)
google-cloud-env (>= 1.0, < 3.a)
google-cloud-errors (~> 1.0)
google-cloud-env (1.6.0)
faraday (>= 0.17.3, < 3.0)
google-cloud-errors (1.5.0)
google-cloud-storage (1.47.0)
addressable (~> 2.8)
digest-crc (~> 0.4)
google-apis-iamcredentials_v1 (~> 0.1)
google-apis-storage_v1 (~> 0.31.0)
google-cloud-core (~> 1.6)
googleauth (>= 0.16.2, < 2.a)
mini_mime (~> 1.0)
googleauth (1.8.1)
faraday (>= 0.17.3, < 3.a)
jwt (>= 1.4, < 3.0)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (>= 0.16, < 2.a)
highline (2.0.3)
http-cookie (1.0.8)
domain_name (~> 0.5)
httpclient (2.9.0)
mutex_m
jmespath (1.6.2)
json (2.12.2)
jwt (2.10.1)
base64
logger (1.7.0)
mini_magick (4.13.2)
mini_mime (1.1.5)
multi_json (1.15.0)
multipart-post (2.4.1)
mutex_m (0.3.0)
nanaimo (0.4.0)
naturally (2.3.0)
nkf (0.2.0)
optparse (0.6.0)
os (1.1.4)
ostruct (0.6.1)
plist (3.7.2)
public_suffix (6.0.2)
rake (13.3.0)
representable (3.2.0)
declarative (< 0.1.0)
trailblazer-option (>= 0.1.1, < 0.2.0)
uber (< 0.2.0)
retriable (3.1.2)
rexml (3.4.1)
rouge (3.28.0)
ruby2_keywords (0.0.5)
rubyzip (2.4.1)
security (0.1.5)
signet (0.20.0)
addressable (~> 2.8)
faraday (>= 0.17.5, < 3.a)
jwt (>= 1.5, < 3.0)
multi_json (~> 1.10)
simctl (1.6.10)
CFPropertyList
naturally
sysrandom (1.0.5)
terminal-notifier (2.0.0)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
trailblazer-option (0.1.2)
tty-cursor (0.7.1)
tty-screen (0.8.2)
tty-spinner (0.9.3)
tty-cursor (~> 0.7)
uber (0.1.0)
unicode-display_width (2.6.0)
word_wrap (1.0.0)
xcodeproj (1.27.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.4.0)
rexml (>= 3.3.6, < 4.0)
xcpretty (0.4.1)
rouge (~> 3.28.0)
xcpretty-travis-formatter (1.0.1)
xcpretty (~> 0.2, >= 0.0.7)
PLATFORMS
ruby
DEPENDENCIES
abbrev
fastlane
mutex_m
ostruct
BUNDLED WITH
2.5.22

View File

@@ -1,24 +0,0 @@
**Last updated**
September 30 2025
# Privacy Policy
Catima does not collect or transmit any personal information.
To ensure correct app functionality, we require access to the following:
- Camera: We need access to your camera to be able to scan barcodes. The app can still be used when camera access is denied, but you will have to manually type the barcode information.
- Storage (Android 5 and 6 only): We need access to your device storage to create or import backups. The app can still be used when storage access is denied, but you will not be able to create or import backups.
Catima offers a feature to share cards with other users. All the relevant data is in the generated shareable URLs and never transmitted to our servers. When viewed through catima.app, the data in the URL is rendered using client-side Javascript to further ensure no data is ever transmitted to us.
## Crash reporting privacy
In the FOSS version of Catima (the version used on IzzyOnDroid, F-Droid and GitHub), the open source crash reporter ACRA is used for crash reporting. When a crash is detected, Catima will ask the user if they are willing to report the crash. If they choose to do so, the user's mail client is opened so they can review the data that would be sent. Crash reporting data is only sent when the user explicitly chooses to do so, it is **never** sent automatically. Crash reporting data is only used to solve crashes and no (potentially) sensitive information is ever shared. Users who do not want to be asked to report crashes can disable the "Ask to send crash reports" setting in Catima settings.
For the Google Play version of Catima, crash reporting is [managed by Google](https://support.google.com/googleplay/android-developer/answer/9859174?hl=en). Users can opt in or out of crash reporting through the Google app under the "Usage and diagnostics" setting.
# Changes
This Privacy Policy may be updated from time to time for any reason. We will notify you of any changes to our Privacy Policy by posting the new Privacy Policy to https://catima.app/privacy-policy/. A snapshot of the Privacy Policy is available within the Catima app, though it may be outdated. When the Privacy Policy on the website and in the app differ, the website should be considered leading. You are advised to consult the Privacy Policy regularly for any changes, as continued use is deemed approval of all changes.
# Contact us
If you have any questions regarding privacy while using the Application, or have questions about our practices, please contact us via email at catima.g9ex3@hackerchick.me.

View File

@@ -1,13 +0,0 @@
# Security Policy
Catima is designed to use as little permissions as possible to limit both the attack surface as well as the damage that can be done when abusing a security flaw.
## Supported Versions
Only the most recent stable release is supported.
## Reporting a Vulnerability
Security vulnerabilities can be reported through [GitHub Security Advisories](https://github.com/CatimaLoyalty/Android/security/advisories) or [the contact info written on my personal website](https://sylviavanos.nl/#contact). Currently, Matrix is the only end-to-end encrypted option.
Please note that only security vulnerabilities in Catima should be reported as stated above. For other issues, including antivirus false positives and malicious applications trying to trick people into granting them Catima's "Read Cards" permission, please use [regular issues](https://github.com/CatimaLoyalty/Android/issues).

1
app/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/build

84
app/build.gradle Normal file
View File

@@ -0,0 +1,84 @@
apply plugin: 'com.android.application'
apply plugin: 'findbugs'
findbugs {
sourceSets = []
ignoreFailures = false
}
android {
compileSdkVersion 29
defaultConfig {
applicationId "me.hackerchick.catima"
minSdkVersion 16
targetSdkVersion 29
versionCode 39
versionName "0.28"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
applicationIdSuffix ".debug"
}
}
lintOptions {
disable "GoogleAppIndexingWarning"
disable "ButtonStyle"
disable "AlwaysShowAction"
disable "MissingTranslation"
disable "MissingPrefix"
}
sourceSets {
test {
resources.srcDirs += ['src/test/resources']
}
}
// Starting with Android Studio 3 Robolectric is unable to find resources.
// The following allows it to find the resources.
testOptions {
unitTests {
includeAndroidResources = true
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'androidx.appcompat:appcompat:1.2.0'
compile 'com.google.android.material:material:1.2.0-alpha03'
compile 'androidx.legacy:legacy-support-v4:1.0.0'
compile 'com.journeyapps:zxing-android-embedded:3.5.0@aar'
compile 'com.google.zxing:core:3.3.0'
compile 'org.apache.commons:commons-csv:1.5'
compile 'androidx.constraintlayout:constraintlayout:1.1.3'
compile 'com.jaredrummler:colorpicker:1.0.2'
compile group: 'com.google.guava', name: 'guava', version: '20.0'
compile 'com.github.apl-devs:appintro:v4.2.0'
compile "com.vanniktech:vntnumberpickerpreference:1.0.0"
testCompile 'junit:junit:4.12'
testCompile "org.robolectric:robolectric:4.0.2"
}
task findbugs(type: FindBugs, dependsOn: 'assembleDebug') {
description 'Run findbugs'
group 'verification'
classes = fileTree('build/intermediates/javac/debug/compileDebugJavaWithJavac/classes')
source = fileTree('src/main/java')
classpath = files()
effort = 'max'
excludeFilter = file("./config/findbugs/exclude.xml")
reports {
xml.enabled = false
html.enabled = true
}
}

View File

@@ -1,165 +0,0 @@
import com.android.build.gradle.internal.tasks.factory.dependsOn
plugins {
alias(libs.plugins.com.android.application)
alias(libs.plugins.org.jetbrains.kotlin.android)
}
kotlin {
jvmToolchain(21)
}
android {
namespace = "protect.card_locker"
compileSdk = 36
defaultConfig {
applicationId = "me.hackerchick.catima"
minSdk = 21
targetSdk = 36
versionCode = 156
versionName = "2.40.0"
vectorDrawables.useSupportLibrary = true
multiDexEnabled = true
resourceConfigurations += listOf("ar", "be", "bg", "bn", "bn-rIN", "bs", "cs", "da", "de", "el-rGR", "en", "eo", "es", "es-rAR", "et", "fa", "fi", "fr", "gl", "he-rIL", "hi", "hr", "hu", "in-rID", "is", "it", "ja", "ko", "lt", "lv", "nb-rNO", "nl", "oc", "pl", "pt", "pt-rBR", "pt-rPT", "ro-rRO", "ru", "sk", "sl", "sr", "sv", "ta", "tr", "uk", "vi", "zh-rCN", "zh-rTW")
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
buildConfigField("boolean", "showDonate", "true")
buildConfigField("boolean", "showRateOnGooglePlay", "false")
buildConfigField("boolean", "useAcraCrashReporter", "true")
}
buildTypes {
release {
isMinifyEnabled = true
proguardFiles(
getDefaultProguardFile("proguard-android.txt"),
"proguard-rules.pro"
)
}
debug {
applicationIdSuffix = ".debug"
}
}
buildFeatures {
buildConfig = true
viewBinding = true
}
flavorDimensions.add("type")
productFlavors {
create("foss") {
dimension = "type"
isDefault = true
}
create("gplay") {
dimension = "type"
// Google doesn't allow donation links
buildConfigField("boolean", "showDonate", "false")
buildConfigField("boolean", "showRateOnGooglePlay", "true")
// Google Play already sends crashes to the Google Play Console
buildConfigField("boolean", "useAcraCrashReporter", "false")
}
}
bundle {
language {
enableSplit = false
}
}
compileOptions {
encoding = "UTF-8"
// Flag to enable support for the new language APIs
isCoreLibraryDesugaringEnabled = true
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
sourceSets {
getByName("test") {
resources.srcDirs("src/test/res")
}
}
// Starting with Android Studio 3 Robolectric is unable to find resources.
// The following allows it to find the resources.
testOptions.unitTests.isIncludeAndroidResources = true
tasks.withType<Test>().configureEach {
testLogging {
events("started", "passed", "skipped", "failed")
}
}
lint {
lintConfig = file("lint.xml")
}
kotlinOptions {
jvmTarget = "21"
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
}
dependencies {
// AndroidX
implementation(libs.androidx.appcompat.appcompat)
implementation(libs.androidx.constraintlayout.constraintlayout)
implementation(libs.androidx.core.core.ktx)
implementation(libs.androidx.core.core.remoteviews)
implementation(libs.androidx.core.core.splashscreen)
implementation(libs.androidx.exifinterface.exifinterface)
implementation(libs.androidx.palette.palette)
implementation(libs.androidx.preference.preference)
implementation(libs.com.google.android.material.material)
coreLibraryDesugaring(libs.com.android.tools.desugar.jdk.libs)
// Third-party
implementation(libs.com.journeyapps.zxing.android.embedded)
implementation(libs.com.github.yalantis.ucrop)
implementation(libs.com.google.zxing.core)
implementation(libs.org.apache.commons.commons.csv)
implementation(libs.com.jaredrummler.colorpicker)
implementation(libs.net.lingala.zip4j.zip4j)
// Crash reporting
implementation(libs.bundles.acra)
// Testing
testImplementation(libs.androidx.test.core)
testImplementation(libs.junit.junit)
testImplementation(libs.org.robolectric.robolectric)
androidTestImplementation(libs.bundles.androidx.test)
androidTestImplementation(libs.junit.junit)
androidTestImplementation(libs.androidx.test.ext.junit)
androidTestImplementation(libs.androidx.test.uiautomator.uiautomator)
androidTestImplementation(libs.androidx.test.espresso.espresso.core)
}
tasks.register("copyRawResFiles", Copy::class) {
from(
layout.projectDirectory.file("../CHANGELOG.md"),
layout.projectDirectory.file("../PRIVACY.md")
)
into(layout.projectDirectory.dir("src/main/res/raw"))
rename { it.lowercase() }
}.also {
tasks.preBuild.dependsOn(it)
tasks.getByName<Delete>("clean") {
val filesNamesToDelete = listOf("CHANGELOG", "PRIVACY")
filesNamesToDelete.forEach { fileName ->
delete(layout.projectDirectory.file("src/main/res/raw/${fileName.lowercase()}.md"))
}
}
}

View File

@@ -6,8 +6,5 @@
<Match>
<Class name="~.*Manifest\$.*"/>
</Match>
<Match>
<Class name="~.*Binding" />
</Match>
</FindBugsFilter>

View File

@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<lint>
<issue id="AlwaysShowAction" severity="ignore" />
<issue id="ButtonStyle" severity="ignore" />
<issue id="GoogleAppIndexingWarning" severity="ignore" />
<issue id="MissingTranslation" severity="ignore" />
<issue id="MissingPrefix" severity="ignore" />
</lint>

View File

@@ -2,7 +2,7 @@
# By default, the flags in this file are appended to flags specified
# in /Users/brarcher/Library/Android/sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.kts.
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
@@ -21,19 +21,4 @@
-keepattributes SourceFile,LineNumberTable
# This keep the class and method names the same, for debugging stack traces
-dontobfuscate
# Required for uCrop 2.2.11
# This is generated automatically by the Android Gradle plugin.
-dontwarn javax.annotation.processing.AbstractProcessor
-dontwarn javax.annotation.processing.SupportedOptions
-dontwarn okhttp3.Call
-dontwarn okhttp3.Dispatcher
-dontwarn okhttp3.OkHttpClient
-dontwarn okhttp3.Request$Builder
-dontwarn okhttp3.Request
-dontwarn okhttp3.Response
-dontwarn okhttp3.ResponseBody
-dontwarn okio.BufferedSource
-dontwarn okio.Okio
-dontwarn okio.Sink
-dontobfuscate

View File

@@ -0,0 +1,15 @@
package protect.card_locker;
import android.app.Application;
import android.test.ApplicationTestCase;
/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application>
{
public ApplicationTest()
{
super(Application.class);
}
}

View File

@@ -1,67 +0,0 @@
package protect.card_locker;
import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.action.ViewActions.click;
import static androidx.test.espresso.action.ViewActions.typeText;
import static androidx.test.espresso.assertion.ViewAssertions.matches;
import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed;
import static androidx.test.espresso.matcher.ViewMatchers.withChild;
import static androidx.test.espresso.matcher.ViewMatchers.withId;
import static androidx.test.espresso.matcher.ViewMatchers.withText;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.not;
import static org.junit.Assert.assertEquals;
import androidx.appcompat.widget.Toolbar;
import androidx.test.core.app.ActivityScenario;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.uiautomator.UiDevice;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(AndroidJUnit4.class)
public class MainActivitySearchViewTest {
@Test
public void whenSearchViewIsExpandedAndBackIsPressedThenMenuItemShouldNotBeCollapsed() {
String query = "random arbitrary text";
try (ActivityScenario<MainActivity> mainActivityScenario = ActivityScenario.launch(MainActivity.class)) {
mainActivityScenario.onActivity(this::makeSearchMenuItemVisible);
onView(withId(R.id.action_search)).perform(click());
onView(withId(androidx.appcompat.R.id.search_src_text)).perform(typeText(query));
pressBack();
onView(withId(androidx.appcompat.R.id.search_src_text)).check(matches(withText(query)));
mainActivityScenario.onActivity(activity -> assertEquals(query, activity.mFilter));
}
}
@Test
public void whenSearchViewIsExpandedThenItShouldOnlyBeCollapsedWhenBackIsPressedTwice() {
try (ActivityScenario<MainActivity> mainActivityScenario = ActivityScenario.launch(MainActivity.class)) {
mainActivityScenario.onActivity(this::makeSearchMenuItemVisible);
onView(withId(R.id.action_search)).perform(click());
pressBack();
onView(withId(androidx.appcompat.R.id.search_src_text)).check(matches(isDisplayed()));
pressBack();
onView(withId(android.R.id.content)).check(matches(is(not(withChild(withId(androidx.appcompat.R.id.search_src_text))))));
}
}
private void makeSearchMenuItemVisible(MainActivity activity) {
Toolbar toolbar = activity.findViewById(R.id.toolbar);
toolbar.getMenu().findItem(R.id.action_search).setVisible(true);
}
private void pressBack() {
UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()).pressBack();
}
}

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">تصحيح Catima</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Catima Fehlersuche</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Отстраняване на грешки в Catima</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">ক্যাটিমা ডিবাগ</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">ক্যাটিমা ডিবাগ</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Catima Otklanjanje Grešaka</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Debugar Catima</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Catima Ladění</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Catima Datfygio</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Catima Fejlfinding</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Catima Debug</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Αποσφαλμάτωση Catima</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Catima Debug</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Catima Depuración</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Depuración de Catima</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Catima Debug</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">عیب‌یابی کاتیما</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Catima-vianmääritys</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Débogage de Catima</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Depuración de Catima</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">קטימה ניפוי באגים</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">कैटिमा डीबग</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Catima Debug</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Catima Debug</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Catima Debug</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Catima Villuleit</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Catima Debug</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Catimaデバーグ</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">ಕ್ಯಾಟಿಮಾ ಡೀಬಗ್</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Catima 디버그</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Catima Feelerkorrektur</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Catima Klaidų Taisymas</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Catima atkļūdošana</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">കാറ്റിമ ഡീബഗ്</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">कॅटिमा डीबग</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Catima-avlusing</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Catima-foutopsporing</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Catima Correcion d\'Errors</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Catima Debug</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Depuração do Catima</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Depuração Catima</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Depanare Catima</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Отладка Catima</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Catima Debug</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Catima Odpravljanje Napak</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Catima Debug</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">கேட்டிமா Debug</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Catima Hata Ayıklama</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">ⴽⴰⵜⵉⵎⴰ ⴰⵙⵔⴰⵡ</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Catima Debug</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Gỡ lỗi Catima</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Catima 调试</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">卡提碼除錯版</string>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="app_name">Catima Debug</string>
</resources>

View File

@@ -1,22 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<manifest package="protect.card_locker"
xmlns:android="http://schemas.android.com/apk/res/android">
<permission
android:description="@string/permissionReadCardsDescription"
android:icon="@drawable/ic_launcher_monochrome"
android:label="@string/permissionReadCardsLabel"
android:name="${applicationId}.READ_CARDS"
android:protectionLevel="dangerous" />
<uses-sdk tools:overrideLibrary="com.google.zxing.client.android" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="23" />
<uses-permission
android:name="android.permission.CAMERA"/>
<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
android:required="true" />
<uses-feature
android:name="android.hardware.camera.autofocus"
android:required="false" />
@@ -24,200 +19,92 @@
<application
android:name=".LoyaltyCardLockerApplication"
android:allowBackup="true"
android:enableOnBackInvokedCallback="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:localeConfig="@xml/locales_config">
<receiver
android:name=".ListWidget"
android:label="@string/card_list_widget_name"
android:exported="false">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/list_widget_info" />
</receiver>
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:exported="true"
android:theme="@style/Theme.App.Starting">
android:name="protect.card_locker.MainActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="content"/>
<data android:host="*"/>
<data android:mimeType="image/*" />
<data android:mimeType="application/pdf" />
<data android:mimeType="application/vnd.apple.pkpass" />
<data android:mimeType="application/vnd-com.apple.pkpass" />
<data android:mimeType="application/vnd.espass-espass" />
<data android:mimeType="application/vnd.apple.pkpasses" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
<data android:mimeType="image/*" />
<data android:mimeType="application/pdf" />
<data android:mimeType="application/vnd.apple.pkpass" />
<data android:mimeType="application/vnd-com.apple.pkpass" />
<data android:mimeType="application/vnd.espass-espass" />
<data android:mimeType="application/vnd.apple.pkpasses" />
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity
android:name=".AboutActivity"
android:label="@string/about"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".ManageGroupsActivity"
android:label="@string/groups"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".ManageGroupActivity"
android:label="@string/group_edit"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="adjustResize"/>
<activity
android:name=".LoyaltyCardViewActivity"
android:exported="true"
android:theme="@style/AppTheme.NoActionBar" />
android:theme="@style/AppTheme.NoActionBar"
android:label=""
android:windowSoftInputMode="stateHidden"
android:exported="true"/>
<activity
android:name=".LoyaltyCardEditActivity"
android:exported="true"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="adjustResize">
<intent-filter
android:autoVerify="true"
android:label="@string/app_name">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- Main card sharing URIs -->
<data android:scheme="http" />
<data android:scheme="https" />
<data
android:host="@string/intent_import_card_from_url_host_catima_app"
android:pathPrefix="@string/intent_import_card_from_url_path_prefix_catima_app" />
</intent-filter>
android:configChanges="orientation|screenSize"
android:windowSoftInputMode="stateHidden"
android:exported="true">
<intent-filter android:label="@string/app_name">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- Old card sharing URIs -->
<data android:scheme="http" />
<data android:scheme="https" />
<data
android:host="@string/intent_import_card_from_url_host_thelastproject"
android:pathPrefix="@string/intent_import_card_from_url_path_prefix_thelastproject" />
<data
android:host="@string/intent_import_card_from_url_host_brarcher"
android:pathPrefix="@string/intent_import_card_from_url_path_prefix_brarcher" />
<!-- Accepts URIs that begin with "https://thelastproject.github.io/Catima/share" or "https://brarcher.github.io/loyalty-card-locker/share” -->
<data android:scheme="https"
android:host="@string/intent_import_card_from_url_host"
android:pathPrefix="@string/intent_import_card_from_url_path_prefix" />
<data android:scheme="https"
android:host="@string/intent_import_card_from_url_host_old"
android:pathPrefix="@string/intent_import_card_from_url_path_prefix_old" />
</intent-filter>
<intent-filter android:label="@string/app_name">
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<!-- Accept pkpass files -->
<data android:scheme="content" android:mimeType="application/octet-stream"/>
<data android:scheme="content" android:mimeType="application/x-compressed"/>
<data android:scheme="content" android:mimeType="application/x-zip-compressed"/>
<data android:scheme="content" android:mimeType="application/zip"/>
<data android:scheme="content" android:mimeType="application/vnd.apple.pkpass"/>
<data android:scheme="content" android:mimeType="application/pkpass"/>
<data android:scheme="content" android:mimeType="application/vndapplepkpass"/>
<data android:scheme="content" android:mimeType="application/vnd-com.apple.pkpass"/>
</intent-filter>
</activity>
<activity
android:name=".ScanActivity"
android:label="@string/scanCardBarcode"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".BarcodeSelectorActivity"
android:label="@string/selectBarcodeTitle"
android:theme="@style/AppTheme.NoActionBar" />
android:theme="@style/AppTheme.NoActionBar"
android:configChanges="orientation|screenSize"
android:windowSoftInputMode="stateHidden"/>
<activity
android:name=".preferences.SettingsActivity"
android:label="@string/settings"
android:theme="@style/AppTheme.NoActionBar" />
<!-- FIXME: ImportExportActivity cancels import on rotation -->
android:configChanges="orientation|screenSize"/>
<activity
android:name=".ImportExportActivity"
android:label="@string/importExport"
android:exported="true"
android:theme="@style/AppTheme.NoActionBar">
<!-- ZIP Intent Filter -->
<intent-filter
android:label="@string/importCards">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="application/zip" />
<data android:scheme="content"/>
<data android:host="*"/>
</intent-filter>
<!-- JSON Intent Filter -->
<intent-filter
android:label="@string/importCards">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="application/json" />
<data android:scheme="content"/>
<data android:host="*"/>
</intent-filter>
<!-- CSV Intent Filter -->
<intent-filter
android:label="@string/importCards">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="content"/>
<data android:host="*" />
<data android:mimeType="text/comma-separated-values" />
</intent-filter>
</activity>
android:configChanges="orientation|screenSize"
android:theme="@style/AppTheme.NoActionBar"/>
<activity
android:name=".CardShortcutConfigure"
android:exported="true"
android:label="@string/cardShortcut"
android:configChanges="orientation|screenSize"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.CREATE_SHORTCUT" />
<category android:name="android.intent.category.DEFAULT" />
<action android:name="android.intent.action.CREATE_SHORTCUT"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<activity
android:name=".UCropWrapper"
android:theme="@style/AppTheme.NoActionBar" />
<provider
android:name=".contentprovider.CardsContentProvider"
android:authorities="${applicationId}.contentprovider.cards"
android:exported="true"
android:readPermission="${applicationId}.READ_CARDS"/>
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}"
android:grantUriPermissions="true"
android:exported="false"
android:grantUriPermissions="true">
android:authorities="${applicationId}">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_provider_paths" />
android:resource="@xml/file_provider_paths"/>
</provider>
<service android:name=".CardsOnPowerScreenService" android:label="@string/app_name"
android:permission="android.permission.BIND_CONTROLS" android:exported="true"
tools:targetApi="r">
<intent-filter>
<action android:name="android.service.controls.ControlsProviderService" />
</intent-filter>
</service>
</application>
</manifest>

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

View File

@@ -1,149 +0,0 @@
package protect.card_locker
import android.os.Bundle
import android.text.Spanned
import android.view.MenuItem
import android.view.View
import android.widget.ScrollView
import android.widget.TextView
import androidx.annotation.StringRes
import androidx.core.view.isVisible
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import protect.card_locker.databinding.AboutActivityBinding
class AboutActivity : CatimaAppCompatActivity() {
private companion object {
private const val TAG = "Catima"
}
private lateinit var binding: AboutActivityBinding
private lateinit var content: AboutContent
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
binding = AboutActivityBinding.inflate(layoutInflater)
content = AboutContent(this)
title = content.pageTitle
setContentView(binding.root)
setSupportActionBar(binding.toolbar)
enableToolbarBackButton()
binding.apply {
creditsSub.text = content.copyrightShort
versionHistorySub.text = content.versionHistory
versionHistory.tag = "https://catima.app/changelog/"
translate.tag = "https://hosted.weblate.org/engage/catima/"
license.tag = "https://github.com/CatimaLoyalty/Android/blob/main/LICENSE"
repo.tag = "https://github.com/CatimaLoyalty/Android/"
privacy.tag = "https://catima.app/privacy-policy/"
reportError.tag = "https://github.com/CatimaLoyalty/Android/issues"
rate.tag = "https://play.google.com/store/apps/details?id=me.hackerchick.catima"
donate.tag = "https://catima.app/donate"
// Hide Google Play rate button if not on Google Play
rate.isVisible = BuildConfig.showRateOnGooglePlay
// Hide donate button on Google Play (Google Play doesn't allow donation links)
donate.isVisible = BuildConfig.showDonate
}
bindClickListeners()
}
override fun onOptionsItemSelected(item: MenuItem): Boolean {
return when (item.itemId) {
android.R.id.home -> {
finish()
true
}
else -> super.onOptionsItemSelected(item)
}
}
override fun onDestroy() {
super.onDestroy()
content.destroy()
clearClickListeners()
}
private fun bindClickListeners() {
binding.apply {
versionHistory.setOnClickListener { showHistory(it) }
translate.setOnClickListener { openExternalBrowser(it) }
license.setOnClickListener { showLicense(it) }
repo.setOnClickListener { openExternalBrowser(it) }
privacy.setOnClickListener { showPrivacy(it) }
reportError.setOnClickListener { openExternalBrowser(it) }
rate.setOnClickListener { openExternalBrowser(it) }
donate.setOnClickListener { openExternalBrowser(it) }
credits.setOnClickListener { showCredits() }
}
}
private fun clearClickListeners() {
binding.apply {
versionHistory.setOnClickListener(null)
translate.setOnClickListener(null)
license.setOnClickListener(null)
repo.setOnClickListener(null)
privacy.setOnClickListener(null)
reportError.setOnClickListener(null)
rate.setOnClickListener(null)
donate.setOnClickListener(null)
credits.setOnClickListener(null)
}
}
private fun showCredits() {
showHTML(R.string.credits, content.contributorInfo, null)
}
private fun showHistory(view: View) {
showHTML(R.string.version_history, content.historyInfo, view)
}
private fun showLicense(view: View) {
showHTML(R.string.license, content.licenseInfo, view)
}
private fun showPrivacy(view: View) {
showHTML(R.string.privacy_policy, content.privacyInfo, view)
}
private fun showHTML(@StringRes title: Int, text: Spanned, view: View?) {
val dialogContentPadding = resources.getDimensionPixelSize(R.dimen.alert_dialog_content_padding)
val textView = TextView(this).apply {
setText(text)
Utils.makeTextViewLinksClickable(this, text)
}
val scrollView = ScrollView(this).apply {
addView(textView)
setPadding(dialogContentPadding, dialogContentPadding / 2, dialogContentPadding, 0)
}
MaterialAlertDialogBuilder(this).apply {
setTitle(title)
setView(scrollView)
setPositiveButton(R.string.ok, null)
// Add View online button if an URL is linked to this view
view?.tag?.let {
setNeutralButton(R.string.view_online) { _, _ -> openExternalBrowser(view) }
}
show()
}
}
private fun openExternalBrowser(view: View) {
val tag = view.tag
if (tag is String && tag.startsWith("https://")) {
OpenWebLinkHandler().openBrowser(this, tag)
}
}
}

View File

@@ -1,162 +0,0 @@
package protect.card_locker;
import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.text.Spanned;
import android.util.Log;
import androidx.core.text.HtmlCompat;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
public class AboutContent {
public static final String TAG = "Catima";
public Context context;
public AboutContent(Context context) {
this.context = context;
}
public void destroy() {
this.context = null;
}
public String getPageTitle() {
return String.format(context.getString(R.string.about_title_fmt), context.getString(R.string.app_name));
}
public String getAppVersion() {
String version = "?";
try {
PackageInfo pi = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
version = pi.versionName;
} catch (PackageManager.NameNotFoundException e) {
Log.w(TAG, "Package name not found", e);
}
return version;
}
public int getCurrentYear() {
return Calendar.getInstance().get(Calendar.YEAR);
}
public String getCopyright() {
return String.format(context.getString(R.string.app_copyright_fmt), getCurrentYear());
}
public String getCopyrightShort() {
return context.getString(R.string.app_copyright_short);
}
public String getContributors() {
String contributors;
try {
contributors = "<br/>" + Utils.readTextFile(context, R.raw.contributors);
} catch (IOException ignored) {
return "";
}
return contributors.replace("\n", "<br />");
}
public String getHistory() {
String versionHistory;
try {
versionHistory = Utils.readTextFile(context, R.raw.changelog)
.replace("# Changelog\n\n", "");
} catch (IOException ignored) {
return "";
}
return Utils.linkify(Utils.basicMDToHTML(versionHistory))
.replace("\n", "<br />");
}
public String getLicense() {
try {
return Utils.readTextFile(context, R.raw.license);
} catch (IOException ignored) {
return "";
}
}
public String getPrivacy() {
String privacyPolicy;
try {
privacyPolicy = Utils.readTextFile(context, R.raw.privacy)
.replace("# Privacy Policy\n", "");
} catch (IOException ignored) {
return "";
}
return Utils.linkify(Utils.basicMDToHTML(privacyPolicy))
.replace("\n", "<br />");
}
public String getThirdPartyLibraries() {
final List<ThirdPartyInfo> usedLibraries = new ArrayList<>();
usedLibraries.add(new ThirdPartyInfo("ACRA", "https://github.com/ACRA/acra", "Apache 2.0"));
usedLibraries.add(new ThirdPartyInfo("Color Picker", "https://github.com/jaredrummler/ColorPicker", "Apache 2.0"));
usedLibraries.add(new ThirdPartyInfo("Commons CSV", "https://commons.apache.org/proper/commons-csv/", "Apache 2.0"));
usedLibraries.add(new ThirdPartyInfo("uCrop", "https://github.com/Yalantis/uCrop", "Apache 2.0"));
usedLibraries.add(new ThirdPartyInfo("Zip4j", "https://github.com/srikanth-lingala/zip4j", "Apache 2.0"));
usedLibraries.add(new ThirdPartyInfo("ZXing", "https://github.com/zxing/zxing", "Apache 2.0"));
usedLibraries.add(new ThirdPartyInfo("ZXing Android Embedded", "https://github.com/journeyapps/zxing-android-embedded", "Apache 2.0"));
StringBuilder result = new StringBuilder("<br/>");
for (ThirdPartyInfo entry : usedLibraries) {
result.append("<br/>")
.append(entry.toHtml());
}
return result.toString();
}
public String getUsedThirdPartyAssets() {
final List<ThirdPartyInfo> usedAssets = new ArrayList<>();
usedAssets.add(new ThirdPartyInfo("Android icons", "https://fonts.google.com/icons?selected=Material+Icons", "Apache 2.0"));
StringBuilder result = new StringBuilder().append("<br/>");
for (ThirdPartyInfo entry : usedAssets) {
result.append("<br/>")
.append(entry.toHtml());
}
return result.toString();
}
public Spanned getContributorInfo() {
StringBuilder contributorInfo = new StringBuilder();
contributorInfo.append(getCopyright());
contributorInfo.append("<br/><br/>");
contributorInfo.append(context.getString(R.string.app_copyright_old));
contributorInfo.append("<br/><br/>");
contributorInfo.append(String.format(context.getString(R.string.app_contributors), getContributors()));
contributorInfo.append("<br/><br/>");
contributorInfo.append(String.format(context.getString(R.string.app_libraries), getThirdPartyLibraries()));
contributorInfo.append("<br/><br/>");
contributorInfo.append(String.format(context.getString(R.string.app_resources), getUsedThirdPartyAssets()));
return HtmlCompat.fromHtml(contributorInfo.toString(), HtmlCompat.FROM_HTML_MODE_COMPACT);
}
public Spanned getHistoryInfo() {
return HtmlCompat.fromHtml(getHistory(), HtmlCompat.FROM_HTML_MODE_COMPACT);
}
public Spanned getLicenseInfo() {
return HtmlCompat.fromHtml(getLicense(), HtmlCompat.FROM_HTML_MODE_LEGACY);
}
public Spanned getPrivacyInfo() {
return HtmlCompat.fromHtml(getPrivacy(), HtmlCompat.FROM_HTML_MODE_COMPACT);
}
public String getVersionHistory() {
return String.format(context.getString(R.string.debug_version_fmt), getAppVersion());
}
}

Some files were not shown because too many files have changed in this diff Show More