From efdedcdc159c0207bf075240aa74245ea5575fb4 Mon Sep 17 00:00:00 2001 From: sayakiitg Date: Wed, 12 Jan 2022 10:45:33 +0000 Subject: [PATCH] Revamp SD card UX Improve the SD card setup flow so that each formatting option is provided in a separate screen with clear description and illustration.Also make sure that guest users do not have any access to formatting options. Test: Manual testing on Pixel Device Screenshot1: https://screenshot.googleplex.com/WJwyxFkBtbSfZmN.png Screenshot2: https://screenshot.googleplex.com/3oBcrrgRsKTxNPC.png Bug: 201252175 Change-Id: I77df55c40fd99cabcfc6128084be035bb5b19531 Change-Id: I757abc6076fcc8f467d8faed9f090bcdd5774ff3 (cherry picked from commit 9b432d54a68abf49702db1d6dc2823307f0750ff) Merged-In: I757abc6076fcc8f467d8faed9f090bcdd5774ff3 --- AndroidManifest.xml | 32 ++-- res/drawable/ic_storage_wizard_external.xml | 146 ++++++++++-------- res/drawable/ic_storage_wizard_internal.xml | 99 ++++++------ res/drawable/ic_storage_wizard_ready.xml | 40 +++++ res/drawable/ic_swap_horiz.xml | 2 +- res/drawable/ic_test_tick.xml | 26 ++++ res/layout/storage_internal_format.xml | 38 ++--- res/layout/storage_wizard_generic.xml | 64 +++++--- res/layout/storage_wizard_init.xml | 140 +++-------------- res/layout/storage_wizard_init_external.xml | 35 +++++ res/layout/storage_wizard_init_internal.xml | 35 +++++ res/layout/storage_wizard_progress.xml | 80 +++++----- res/menu/storage_volume.xml | 4 +- res/values/dimens.xml | 2 + res/values/strings.xml | 81 +++++----- .../deviceinfo/PublicVolumeSettings.java | 67 ++++---- .../deviceinfo/StorageWizardBase.java | 53 ++++--- .../StorageWizardFormatConfirm.java | 16 +- .../deviceinfo/StorageWizardInit.java | 138 ++++++++++++----- .../deviceinfo/StorageWizardReady.java | 5 +- .../VolumeOptionMenuController.java | 35 +++-- .../VolumeOptionMenuControllerTest.java | 9 +- 22 files changed, 658 insertions(+), 489 deletions(-) create mode 100644 res/drawable/ic_storage_wizard_ready.xml create mode 100644 res/drawable/ic_test_tick.xml create mode 100644 res/layout/storage_wizard_init_external.xml create mode 100644 res/layout/storage_wizard_init_internal.xml diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 7c44a8ffded..e280b8394f9 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -2475,33 +2475,41 @@ + android:theme="@style/GlifTheme.Light" + android:exported="false" + android:configChanges="keyboardHidden|orientation|screenSize"/> + android:theme="@style/GlifTheme.Light" + android:exported="false" + android:configChanges="keyboardHidden|orientation|screenSize"/> + android:theme="@style/GlifTheme.Light" + android:exported="false" + android:configChanges="keyboardHidden|orientation|screenSize"/> + android:theme="@style/GlifTheme.Light" + android:exported="false" + android:configChanges="keyboardHidden|orientation|screenSize"/> diff --git a/res/drawable/ic_storage_wizard_external.xml b/res/drawable/ic_storage_wizard_external.xml index 99e2698633d..c6fefa1e99d 100644 --- a/res/drawable/ic_storage_wizard_external.xml +++ b/res/drawable/ic_storage_wizard_external.xml @@ -1,3 +1,4 @@ + + android:width="360dp" + android:height="262dp" + android:viewportWidth="360" + android:viewportHeight="262"> + + android:fillColor="@android:color/transparent" + android:pathData="M335.709 262H24.2913C10.9223 262 0 250.821 0 237.11V24.89C0 11.1787 10.9223 0 24.2913 0H335.796C349.078 0 360 11.1787 360 24.89V237.285C360 250.821 349.078 262 335.709 262Z" /> + android:fillColor="@android:color/transparent" + android:pathData="M153.786 66.0239H319.806C322.777 66.0239 325.223 68.4693 325.311 71.4386V183.575H148.282V71.4386C148.282 68.4693 150.728 66.0239 153.786 66.0239Z" + android:strokeWidth="5" + android:strokeColor="#E8EAED"/> + android:fillColor="#BDC1C6" + android:pathData="M182.272 180.605H171.961V183.4H182.272V180.605Z" /> + android:fillColor="#BDC1C6" + android:pathData="M195.204 180.605H184.893V183.4H195.204V180.605Z" /> - + android:pathData="M78.8155 104.538V100.521C78.8155 99.9967 78.3786 99.5601 77.8544 99.5601V78.6001C77.8544 75.8054 75.5825 73.6221 72.8738 73.6221H26.8252C24.0291 73.6221 21.8447 75.8054 21.8447 78.6001V174.492C21.8447 177.287 24.1165 179.47 26.8252 179.47H72.7864C75.5825 179.47 77.767 177.199 77.767 174.492V125.585C78.2913 125.585 78.7282 125.149 78.7282 124.625V114.581C78.7282 114.057 78.2913 113.621 77.767 113.621V105.586C78.3786 105.499 78.8155 105.062 78.8155 104.538ZM76.8058 174.492C76.8058 176.675 74.9709 178.509 72.7864 178.509H26.8252C24.6408 178.509 22.8058 176.675 22.8058 174.492V78.6001C22.8058 76.4167 24.5534 74.5827 26.8252 74.5827H72.7864C74.9709 74.5827 76.8058 76.3294 76.8058 78.6001V174.492Z" /> + android:fillColor="#81C995" + android:pathData="M35.2136 102.18H47.534V89.8658H35.2136V102.18ZM35.2136 103.926C34.2524 103.926 33.466 103.14 33.466 102.18V89.8658C33.466 88.9051 34.2524 88.1191 35.2136 88.1191H47.534C47.9709 88.1191 48.4077 88.2938 48.7573 88.6431C49.1068 88.9925 49.2815 89.4291 49.2815 89.8658V102.18C49.2815 103.14 48.4951 103.926 47.534 103.926H35.2136ZM36.0874 100.433H46.5728L43.2524 96.0665L40.6311 99.5598L38.6213 96.9398L36.0874 100.433ZM35.2136 89.8658V102.18V89.8658Z" /> + + + + + + + + + + android:pathData="M134.65 182.09H338.854V184.186C338.854 185.758 337.631 186.981 336.058 186.981H137.447C135.874 186.981 134.65 185.758 134.65 184.186V182.09Z" /> + android:fillColor="#81C995" + android:pathData="M177.204 129.69H193.456V113.446H177.204V129.69ZM177.204 132.048C175.893 132.048 174.845 131 174.845 129.69V113.446C174.845 112.136 175.893 111.088 177.204 111.088H193.456C194.767 111.088 195.816 112.136 195.816 113.446V129.69C195.816 131 194.767 132.048 193.456 132.048H177.204ZM178.34 127.332H192.32L187.951 121.481L184.456 126.109L181.835 122.616L178.34 127.332ZM177.204 113.359V129.69V113.359Z" /> + + + + + + + + + + android:pathData="M107.126 114.669H109.66V112.136H107.126V114.669ZM117.087 114.669H119.621V112.136H117.087V114.669ZM107.126 109.691H109.66V104.713H107.126V109.691ZM112.107 114.669H114.641V109.691H112.107V114.669ZM112.107 107.158H114.641V104.626H112.107V107.158ZM117.087 109.691H119.621V104.713H117.087V109.691ZM105.903 118.424C105.204 118.424 104.592 118.162 104.155 117.726C103.718 117.289 103.456 116.678 103.456 115.979V101.045L110.971 93.5342H120.932C121.631 93.5342 122.243 93.7962 122.68 94.2328C123.204 94.7568 123.379 95.2808 123.379 95.9795V115.892C123.379 116.59 123.116 117.202 122.68 117.638C122.155 118.162 121.631 118.337 120.932 118.337L105.903 118.424ZM105.903 115.892H120.845V95.9795H111.932L105.903 102.006V115.892ZM105.903 115.892V102.006L111.932 95.9795H120.845V115.892H105.903Z" /> + android:pathData="M96.7281 150.388L101.447 145.672L98.8252 143.052L89.7379 152.222L98.8252 161.305L101.447 158.772L96.7281 154.056H137.01V150.388H96.7281Z" /> - + android:fillColor="?android:attr/colorAccent" + android:pathData="M130.019 137.026L125.301 141.742L127.922 144.362L137.01 135.192L127.922 126.109L125.301 128.642L130.019 133.358H89.7379V137.026H130.019Z" /> + + \ No newline at end of file diff --git a/res/drawable/ic_storage_wizard_internal.xml b/res/drawable/ic_storage_wizard_internal.xml index 41768f7727d..70bafa944ce 100644 --- a/res/drawable/ic_storage_wizard_internal.xml +++ b/res/drawable/ic_storage_wizard_internal.xml @@ -1,3 +1,4 @@ + + android:width="360dp" + android:height="262dp" + android:viewportWidth="360" + android:viewportHeight="262"> + + android:fillColor="@android:color/transparent" + android:pathData="M335.691 262H24.3087C10.9485 262 0 250.795 0 237.127V24.9075C0 11.2049 10.9485 0 24.3087 0H335.787C349.051 0 360 11.2049 360 24.8725V237.224C360 250.795 349.051 262 335.691 262Z" /> + + + + + + + + + + + - - - - - - - - + android:pathData="M164.604 152.545H170.764V146.432H164.604V152.545ZM189.236 152.545H195.396V146.432H189.236V152.545ZM164.604 140.231H170.764V127.926H164.604V140.231ZM176.924 152.545H183.041V140.231H176.924V152.545ZM176.924 134.074H183.041V127.961H176.924V134.074ZM189.236 140.187H195.396V127.926H189.236V140.187ZM161.528 161.733C159.896 161.728 158.332 161.078 157.177 159.924C156.023 158.77 155.373 157.207 155.368 155.576V118.695L173.883 100.224H198.516C200.14 100.228 201.698 100.872 202.851 102.017C204.004 103.161 204.66 104.713 204.676 106.337V155.576C204.671 157.207 204.021 158.77 202.866 159.924C201.712 161.078 200.148 161.728 198.516 161.733H161.528ZM161.528 155.576H198.472V106.381H176.505L161.528 121.306V155.619V155.576ZM161.528 155.576V121.306L176.505 106.381H198.516V155.619H161.528V155.576Z" /> + \ No newline at end of file diff --git a/res/drawable/ic_storage_wizard_ready.xml b/res/drawable/ic_storage_wizard_ready.xml new file mode 100644 index 00000000000..c09c9ec5310 --- /dev/null +++ b/res/drawable/ic_storage_wizard_ready.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/res/drawable/ic_swap_horiz.xml b/res/drawable/ic_swap_horiz.xml index a38833becab..c41c9a34381 100644 --- a/res/drawable/ic_swap_horiz.xml +++ b/res/drawable/ic_swap_horiz.xml @@ -20,5 +20,5 @@ android:viewportHeight="24.0"> + android:fillColor="?android:attr/textColorPrimary"/> diff --git a/res/drawable/ic_test_tick.xml b/res/drawable/ic_test_tick.xml new file mode 100644 index 00000000000..9585806e985 --- /dev/null +++ b/res/drawable/ic_test_tick.xml @@ -0,0 +1,26 @@ + + + + + + \ No newline at end of file diff --git a/res/layout/storage_internal_format.xml b/res/layout/storage_internal_format.xml index 0b49d7e1660..f8224c4b6a4 100644 --- a/res/layout/storage_internal_format.xml +++ b/res/layout/storage_internal_format.xml @@ -14,16 +14,16 @@ limitations under the License. --> - + android:layout_height="wrap_content" + android:fillViewport="true"> - + android:layout_height="wrap_content" + android:orientation="vertical"> - - -