summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAleksandr Granin <aleksandr@mullvad.net>2021-04-14 11:00:38 +0200
committerAleksandr Granin <aleksandr@mullvad.net>2021-04-14 11:00:38 +0200
commiteb426cce41b51c1795d77f68af83a0e195d4519e (patch)
tree43aa3171674943e20e010e4a358ee8321b57de09
parenta4adcbb7dcfb1899a3a912ed41388d13710a0676 (diff)
parentc394c8dd536c614b9aa54afdb6897599d6b874ec (diff)
downloadmullvadvpn-eb426cce41b51c1795d77f68af83a0e195d4519e.tar.xz
mullvadvpn-eb426cce41b51c1795d77f68af83a0e195d4519e.zip
Merge branch 'add-adaptive-icons-for-android'
-rw-r--r--CHANGELOG.md3
-rw-r--r--android/src/main/res/drawable/ic_launcher_foreground.xml21
-rw-r--r--android/src/main/res/mipmap-anydpi-v26/ic_launcher.xml5
-rw-r--r--android/src/main/res/values/colors.xml1
-rw-r--r--graphics/README.md5
-rw-r--r--graphics/adaptive-icon-source.svg14
6 files changed, 49 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a18fae9af6..64bbc5ff0c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -51,6 +51,9 @@ This release is for desktop only.
#### Linux
- Always enable `src_valid_mark` config option when connecting to allow policty based routing.
+#### Android
+- Added support of adaptive icons (available only from Android 8).
+
### Changed
- Allow whitespace in account token in CLI.
- Read account token from standard input unless given as an argument in CLI.
diff --git a/android/src/main/res/drawable/ic_launcher_foreground.xml b/android/src/main/res/drawable/ic_launcher_foreground.xml
new file mode 100644
index 0000000000..a776994b25
--- /dev/null
+++ b/android/src/main/res/drawable/ic_launcher_foreground.xml
@@ -0,0 +1,21 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="108dp"
+ android:height="108dp"
+ android:viewportWidth="108"
+ android:viewportHeight="108">
+ <path android:pathData="M23.566,50.511L26.214,46.803C26.214,46.83 26.049,52.143 26.049,52.143L26.793,48.131C29,52.614 34.407,58.812 39.345,62.133C39.869,62.493 40.31,62.88 40.614,63.267C41.248,63.516 41.883,63.655 42.517,63.765C42.848,63.821 43.207,63.848 43.538,63.876C43.869,63.904 44.227,63.904 44.558,63.904C44.889,63.904 45.22,63.876 45.551,63.848C45.882,63.821 46.213,63.765 46.544,63.71C46.875,63.655 47.206,63.599 47.51,63.489C47.841,63.406 48.144,63.323 48.475,63.212C48.779,63.129 49.11,62.991 49.413,62.88C49.717,62.742 50.02,62.631 50.324,62.465C50.627,62.299 50.93,62.16 51.206,61.994C51.51,61.856 51.786,61.662 52.089,61.496C52.392,61.33 52.668,61.137 52.972,60.971C53.275,60.805 53.551,60.611 53.827,60.445C54.103,60.251 54.406,60.085 54.682,59.891C54.958,59.698 55.261,59.532 55.565,59.338L55.841,59.172L55.978,59.255L57.965,60.583L55.951,60.057C55.758,60.279 55.565,60.5 55.344,60.722C55.096,60.971 54.82,61.22 54.572,61.469C54.296,61.69 54.02,61.939 53.716,62.133C53.413,62.354 53.137,62.548 52.806,62.742C52.199,63.129 51.537,63.461 50.848,63.738C50.517,63.876 50.158,64.014 49.827,64.125C49.468,64.236 49.137,64.346 48.779,64.43C48.42,64.513 48.062,64.596 47.703,64.651C47.344,64.706 46.986,64.734 46.627,64.789C45.91,64.817 45.165,64.817 44.448,64.706C44.089,64.651 43.731,64.596 43.372,64.513C43.013,64.43 42.682,64.319 42.351,64.208C41.772,63.987 41.193,63.71 40.669,63.378C40.669,63.378 38.765,63.655 39.538,65.094C40.31,66.533 41.469,66.394 40.917,68.082C40.531,68.995 39.979,69.881 39.372,70.711C38.103,72.427 36.117,73.948 36.31,74.862C45.331,86.013 65.661,84.464 73.385,74.502C73.274,73.063 71.012,72.371 69.44,68.857C69.881,68.995 70.543,69.189 70.543,69.161C70.543,69.134 68.668,66.09 68.585,65.785L69.799,65.868C69.799,65.868 68.199,63.876 68.143,63.682L69.771,63.461C69.771,63.461 67.73,61.109 67.702,60.915L69.771,61.247L67.509,58.508L68.585,58.508L67.316,56.654C67.095,56.571 66.875,56.515 66.654,56.46C66.378,56.377 66.102,56.294 65.826,56.211C62.737,55.243 59.813,54.357 56.999,52.586C53.054,50.123 49.524,47.107 46.875,44.755L41.551,42.154C36.448,41.767 31.648,41.905 28.724,42.486L30.6,39.276L27.731,42.735C27.538,42.68 27.483,42.569 27.483,42.569L27.676,38.308L26.766,42.154C26.49,42.016 26.159,41.96 25.828,41.96C24.559,41.96 23.538,42.984 23.538,44.257C23.538,45.419 24.394,46.388 25.525,46.526L23.566,50.511L23.566,50.511L23.566,50.511L23.566,50.511Z"
+ android:fillColor="#D0933A"
+ android:fillType="evenOdd" />
+ <path android:pathData="M26.668,40.389C26.398,40.255 26.075,40.154 25.778,40.154C24.537,40.154 23.538,41.396 23.538,42.94C23.538,44.283 24.321,45.424 25.346,45.692C25.373,45.692 25.373,45.692 25.4,45.692C26.075,45.424 27.423,43.175 27.208,41.765C27.127,41.262 26.938,40.792 26.668,40.389L26.668,40.389L26.668,40.389L26.668,40.389Z"
+ android:fillColor="#FFCC86"
+ android:fillType="evenOdd" />
+ <path android:pathData="M46.765,39.239C46.34,38.031 46.454,36.469 47.048,34.996C47.896,32.963 49.508,31.608 51.036,31.608C51.347,31.608 51.63,31.667 51.912,31.785C52.789,30.96 53.808,30.282 54.939,29.811C61.19,27.218 70.326,31.844 72.673,38.237C73.805,41.331 73.465,44.719 72.503,47.813C71.711,50.346 68.826,54 69.901,56.769C69.477,56.651 60.539,53.764 58.05,52.114C54.062,49.521 50.47,46.339 47.783,43.864L47.698,43.776L38.619,39.298C38.506,39.239 38.393,39.18 38.308,39.121C39.609,39.121 44.559,39.74 46.765,39.239"
+ android:fillColor="#FDD321"
+ android:fillType="evenOdd" />
+ <path android:pathData="M50.184,37.688C49.907,37.688 49.661,37.641 49.476,37.569C48.984,37.402 48.615,37.093 48.369,36.616C47.938,35.806 48.061,34.687 48.646,33.639C49.415,32.281 50.861,31.328 52.184,31.328C52.43,31.328 52.676,31.376 52.923,31.447C53.569,31.661 54.03,32.162 54.184,32.876C54.369,33.639 54.215,34.52 53.723,35.354C52.953,36.712 51.476,37.688 50.184,37.688Z"
+ android:fillColor="#FFF"
+ android:fillType="nonZero" />
+ <path android:pathData="M52.153,31.709C52.338,31.709 52.523,31.733 52.707,31.804C53.2,31.971 53.569,32.4 53.692,32.972C53.846,33.662 53.723,34.472 53.261,35.235C52.584,36.45 51.261,37.331 50.153,37.331C49.969,37.331 49.784,37.307 49.63,37.259L49.63,37.259L49.63,37.259C49.169,37.117 48.923,36.783 48.8,36.521C48.43,35.806 48.523,34.758 49.046,33.805C49.753,32.59 51.046,31.709 52.153,31.709M52.153,30.994C50.676,30.994 49.046,32.043 48.184,33.543C47.538,34.663 47.446,35.878 47.907,36.807C48.184,37.355 48.646,37.736 49.23,37.95C49.507,38.046 49.815,38.093 50.153,38.093C51.63,38.093 53.261,37.045 54.092,35.544C54.615,34.639 54.769,33.686 54.584,32.853C54.4,32.019 53.846,31.423 53.046,31.161C52.8,31.042 52.492,30.994 52.153,30.994L52.153,30.994Z"
+ android:fillColor="#1D2A3A"
+ android:fillType="nonZero" />
+</vector>
diff --git a/android/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/android/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
new file mode 100644
index 0000000000..5ed0a2df70
--- /dev/null
+++ b/android/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
+ <background android:drawable="@color/ic_launcher_background"/>
+ <foreground android:drawable="@drawable/ic_launcher_foreground"/>
+</adaptive-icon>
diff --git a/android/src/main/res/values/colors.xml b/android/src/main/res/values/colors.xml
index 9fb5760781..8f53508029 100644
--- a/android/src/main/res/values/colors.xml
+++ b/android/src/main/res/values/colors.xml
@@ -23,6 +23,7 @@
<color name="red40">#66E34039</color>
<color name="yellow">#FFD323</color>
<color name="textInputBorder">#234161</color>
+ <color name="ic_launcher_background">@color/darkBlue</color>
<!-- Switch Colors -->
<color name="switch_thumb_fill_checked">@color/green</color>
<color name="switch_thumb_fill_unchecked">@color/red</color>
diff --git a/graphics/README.md b/graphics/README.md
index 8e3285d5d2..5fa171d69d 100644
--- a/graphics/README.md
+++ b/graphics/README.md
@@ -17,3 +17,8 @@ following command:
```
rsvg-convert ./icon-square.svg -w 512 -h 512 -o ../android/src/main/play/listings/en-US/graphics/icon/icon.png
```
+
+The icon `adaptive-icon-source.svg` is used for Android adaptive icon. The icon converted to
+Android Vector Drawable format and used as foreground layer for adaptive icon. For background layer is used
+solid color layer. Full documentation about adaptive icon available on link below:
+https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive
diff --git a/graphics/adaptive-icon-source.svg b/graphics/adaptive-icon-source.svg
new file mode 100644
index 0000000000..1dc6511844
--- /dev/null
+++ b/graphics/adaptive-icon-source.svg
@@ -0,0 +1,14 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="108" height="108" viewBox="0 0 108 108">
+ <g fill="none" fill-rule="evenodd">
+ <g transform="translate(18 18)">
+ <path fill="#D0933A" d="M5.56604657,32.5107851 L8.2142097,28.8028159 C8.2142097,28.8304873 8.0486995,34.1433984 8.0486995,34.1433984 L8.79349538,30.1310436 C11.000298,34.6138124 16.4069644,40.8122088 21.3446852,44.1327782 C21.8688008,44.4925066 22.3101613,44.8799063 22.6135967,45.2673061 C23.2480524,45.5163488 23.8825082,45.6547059 24.5169639,45.7653915 C24.8479843,45.8207344 25.2065898,45.8484058 25.5376101,45.8760772 C25.8686305,45.9037486 26.227236,45.9037486 26.5582564,45.9037486 C26.8892767,45.9037486 27.2202971,45.8760772 27.5513175,45.8484058 C27.8823379,45.8207344 28.2133583,45.7653915 28.5443787,45.7100487 C28.8753991,45.6547059 29.2064195,45.5993631 29.5098548,45.4886774 C29.8408752,45.4056632 30.1443106,45.3226489 30.475331,45.2119633 C30.7787663,45.1289491 31.1097867,44.990592 31.4132221,44.8799063 C31.7166574,44.7415493 32.0200928,44.6308636 32.3235282,44.4648352 C32.6269635,44.2988067 32.9303989,44.1604496 33.2062492,43.9944212 C33.5096846,43.8560641 33.7855349,43.6623642 34.0889702,43.4963357 C34.3924056,43.3303073 34.6682559,43.1366074 34.9716913,42.9705789 C35.2751266,42.8045504 35.550977,42.6108505 35.8268273,42.4448221 C36.1026776,42.2511222 36.406113,42.0850937 36.6819633,41.8913938 C36.9578136,41.6976939 37.261249,41.5316655 37.5646843,41.3379656 L37.8405347,41.1719371 L37.9784598,41.2549513 L39.9645822,42.5831791 L37.9508748,42.0574223 C37.7577796,42.2787936 37.5646843,42.5001649 37.3440041,42.7215362 C37.0957388,42.9705789 36.8198885,43.2196216 36.5716232,43.4686643 C36.2957728,43.6900356 36.0199225,43.9390783 35.7164872,44.1327782 C35.4130518,44.3541495 35.1372015,44.5478494 34.8061811,44.7415493 C34.1993104,45.1289491 33.5372696,45.461006 32.8476438,45.7377201 C32.5166234,45.8760772 32.158018,46.0144342 31.8269976,46.1251199 C31.4683922,46.2358055 31.1373718,46.3464912 30.7787663,46.4295054 C30.4201609,46.5125197 30.0615555,46.5955339 29.7029501,46.6508767 C29.3443446,46.7062196 28.9857392,46.733891 28.6271338,46.7892338 C27.9099229,46.8169052 27.1651271,46.8169052 26.4479162,46.7062196 C26.0893108,46.6508767 25.7307054,46.5955339 25.3721,46.5125197 C25.0134945,46.4295054 24.6824741,46.3188198 24.3514537,46.2081341 C23.7721681,45.9867628 23.1928824,45.7100487 22.6687668,45.3779918 C22.6687668,45.3779918 20.7653995,45.6547059 21.5377804,47.0936193 C22.3101613,48.5325328 23.4687327,48.3941757 22.9170321,50.0821318 C22.5308416,50.9952884 21.9791409,51.8807736 21.3722702,52.710916 C20.1033587,54.4265436 18.1172364,55.9484712 18.3103316,56.8616278 C27.3306373,68.013207 47.6608063,66.4636079 55.3846154,56.5018995 C55.2742753,55.062986 53.0123026,54.3712007 51.4399557,50.8569314 C51.8813162,50.9952884 52.543357,51.1889883 52.543357,51.1613169 C52.543357,51.1336455 50.6675748,48.0897902 50.5848197,47.7854046 L51.7985612,47.8684189 C51.7985612,47.8684189 50.1986293,45.8760772 50.1434592,45.6823773 L51.7709761,45.461006 C51.7709761,45.461006 49.7296837,43.108936 49.7020987,42.9152361 L51.7709761,43.247293 L49.5090034,40.5078232 L50.5848197,40.5078232 L49.3159082,38.6538386 C49.095228,38.5708244 48.8745477,38.5154815 48.6538674,38.4601387 C48.3780171,38.3771245 48.1021668,38.2941102 47.8263165,38.211096 C44.7367928,37.2425966 41.8127794,36.3571114 38.999106,34.586141 C35.0544464,32.1233853 31.5235622,29.1072014 28.8753991,26.7551314 L23.5514878,24.1540186 C18.4482568,23.7666188 13.6484611,23.9049759 10.7244477,24.4860756 L12.6002299,21.2761917 L9.73138649,24.7351183 C9.53829126,24.6797754 9.4831212,24.5690898 9.4831212,24.5690898 L9.67621642,20.3076923 L8.76591035,24.1540186 C8.49006002,24.0156615 8.15903963,23.9603187 7.82801924,23.9603187 C6.55910774,23.9603187 5.53846154,24.984161 5.53846154,26.2570459 C5.53846154,27.4192452 6.39359755,28.3877447 7.52458388,28.5261017 L5.56604657,32.5107851 L5.56604657,32.5107851 L5.56604657,32.5107851 L5.56604657,32.5107851 Z"/>
+ <path fill="#FFCC86" d="M8.66806053,22.3888112 C8.39826752,22.2545455 8.0745159,22.1538462 7.77774358,22.1538462 C6.5366957,22.1538462 5.53846154,23.3958042 5.53846154,24.9398601 C5.53846154,26.2825175 6.32086129,27.4237762 7.34607475,27.6923077 C7.37305405,27.6923077 7.37305405,27.6923077 7.40003335,27.6923077 C8.0745159,27.4237762 9.42348098,25.1748252 9.20764657,23.765035 C9.12670866,23.2615385 8.93785355,22.7916084 8.66806053,22.3888112 L8.66806053,22.3888112 L8.66806053,22.3888112 L8.66806053,22.3888112 Z"/>
+ <path fill="#FDD321" d="M28.7647068,21.238805 C28.3404418,20.0308261 28.4535791,18.4692924 29.0475501,16.9961473 C29.8960799,14.9632072 31.5082867,13.6079138 33.0356405,13.6079138 C33.3467681,13.6079138 33.6296114,13.6668396 33.9124547,13.7846912 C34.7892689,12.95973 35.8075047,12.2820833 36.9388779,11.8106769 C43.1897147,9.21794163 52.325553,13.843617 54.6731524,20.2370664 C55.8045255,23.3306709 55.4651136,26.7189045 54.5034464,29.812509 C53.7114852,32.3463185 50.8264836,35.9997181 51.9012881,38.7692308 C51.4770232,38.6513792 42.5391751,35.7640149 40.0501541,34.1140925 C36.0620637,31.5213573 32.4699539,28.339364 29.7829426,25.8644804 L29.6980896,25.7760917 L20.6188199,21.2977308 C20.5056826,21.238805 20.3925453,21.1798792 20.3076923,21.1209534 C21.6087715,21.1209534 26.5585291,21.7396743 28.7647068,21.238805"/>
+ <g fill-rule="nonzero" transform="translate(29.538 12.923)">
+ <path fill="#FFF" d="M2.64615385,6.76526055 C2.36923077,6.76526055 2.12307692,6.71761787 1.93846154,6.64615385 C1.44615385,6.47940447 1.07692308,6.16972705 0.830769231,5.69330025 C0.4,4.88337469 0.523076923,3.76377171 1.10769231,2.71563275 C1.87692308,1.35781638 3.32307692,0.404962779 4.64615385,0.404962779 C4.89230769,0.404962779 5.13846154,0.452605459 5.38461538,0.524069479 C6.03076923,0.738461538 6.49230769,1.23870968 6.64615385,1.95334988 C6.83076923,2.71563275 6.67692308,3.59702233 6.18461538,4.43076923 C5.41538462,5.78858561 3.93846154,6.76526055 2.64615385,6.76526055 Z"/>
+ <path fill="#1D2A3A" d="M4.61538462,0.786104218 C4.8,0.786104218 4.98461538,0.809925558 5.16923077,0.881389578 C5.66153846,1.04813896 6.03076923,1.47692308 6.15384615,2.04863524 C6.30769231,2.73945409 6.18461538,3.54937965 5.72307692,4.31166253 C5.04615385,5.52655087 3.72307692,6.40794045 2.61538462,6.40794045 C2.43076923,6.40794045 2.24615385,6.38411911 2.09230769,6.33647643 L2.09230769,6.33647643 L2.09230769,6.33647643 C1.63076923,6.19354839 1.38461538,5.86004963 1.26153846,5.59801489 C0.892307692,4.88337469 0.984615385,3.83523573 1.50769231,2.88238213 C2.21538462,1.6674938 3.50769231,0.786104218 4.61538462,0.786104218 M4.61538462,0.0714640199 C3.13846154,0.0714640199 1.50769231,1.11960298 0.646153846,2.62034739 C-1.2101431e-13,3.73995037 -0.0923076923,4.95483871 0.369230769,5.88387097 C0.646153846,6.43176179 1.10769231,6.81290323 1.69230769,7.02729529 C1.96923077,7.12258065 2.27692308,7.17022333 2.61538462,7.17022333 C4.09230769,7.17022333 5.72307692,6.12208437 6.55384615,4.62133995 C7.07692308,3.71612903 7.23076923,2.76327543 7.04615385,1.92952854 C6.86153846,1.09578164 6.30769231,0.500248139 5.50769231,0.2382134 C5.26153846,0.1191067 4.95384615,0.0714640199 4.61538462,0.0714640199 L4.61538462,0.0714640199 Z"/>
+ </g>
+ <circle cx="36" cy="36" r="36"/>
+ </g>
+ </g>
+</svg>