More CryptKeeper UI work.

* Implemented failure case.
* More pixel perfect
* Remove the animation
* Display the encroid on the blank screen
* Remove the back button.
* Fix portrait mode screens

Bug: 3384231
Bug: 3394103
Bug: 3388721
Bug: 3381450
Bug: 3406278
Bug: 3351832
Change-Id: Ib763c8b577198deb45255acc767bc6d5409efc0c
This commit is contained in:
Andy Stadler
2011-01-31 19:21:37 -08:00
parent ba681faf73
commit 13d62049f7
21 changed files with 218 additions and 115 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 187 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 248 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 KiB

View File

@@ -16,57 +16,67 @@
** limitations under the License.
*/
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="206dip"
>
<!-- left side: status -->
<include layout="@layout/crypt_keeper_status"
<ImageView android:id="@+id/encroid"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="102dip"
android:layout_marginTop="20dip"
android:gravity="left"
android:paddingTop="50dip"
android:layout_centerVertical="true"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="@drawable/encroid_resignin"
/>
<TextView android:id="@+id/passwordLabel"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_toRightOf="@+id/encroid"
android:layout_marginTop="37dip"
android:paddingRight="17dip"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="@string/crypt_keeper_enter_password"
/>
<!-- Password entry field -->
<EditText android:id="@+id/passwordEntry"
android:layout_height="wrap_content"
android:layout_width="450dip"
android:layout_marginRight="155dip"
android:layout_alignParentRight="true"
android:layout_width="320dip"
android:layout_toRightOf="@+id/passwordLabel"
android:layout_marginTop="26dip"
android:singleLine="true"
android:textStyle="normal"
android:inputType="textPassword"
android:gravity="center"
android:layout_gravity="center"
android:textSize="24sp"
android:layout_marginTop="120dip"
android:layout_marginBottom="5dip"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#ffffffff"
android:editable="false"
/>
<TextView android:id="@+id/status"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_toRightOf="@+id/passwordLabel"
android:layout_below="@+id/passwordEntry"
android:paddingTop="8dip"
android:singleLine="true"
android:textSize="17sp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:drawableLeft="@*android:drawable/ic_lock_idle_lock"
android:visibility="gone"
/>
</RelativeLayout>
<com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboard"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="#00000000"
android:keyBackground="@*android:drawable/btn_keyboard_key_fulltrans"
android:visibility="visible"
/>
</LinearLayout>
</RelativeLayout>

View File

@@ -16,42 +16,59 @@
** limitations under the License.
*/
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal"
>
<!-- left side: status -->
<include layout="@layout/crypt_keeper_status"
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="134dip"
android:paddingTop="50dip"
android:layout_alignParentTop="true"
android:layout_gravity="center_horizontal"
android:layout_centerHorizontal="true"
/>
android:layout_marginTop="318dip"
>
<ImageView android:id="@+id/encroid"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:src="@drawable/encroid_resignin"
/>
<!-- Password entry field -->
<EditText android:id="@+id/passwordEntry"
android:layout_above="@id/keyboard"
android:layout_height="wrap_content"
android:layout_width="450dip"
android:singleLine="true"
android:textStyle="normal"
android:inputType="textPassword"
android:gravity="center"
android:layout_gravity="center_horizontal"
android:layout_centerHorizontal="true"
android:textSize="24sp"
android:layout_marginTop="120dip"
android:layout_marginBottom="5dip"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#ffffffff"
android:editable="false"
/>
<TextView android:id="@+id/passwordLabel"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_toRightOf="@+id/encroid"
android:layout_marginTop="37dip"
android:paddingRight="17dip"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="@string/crypt_keeper_enter_password"
/>
<!-- Password entry field -->
<EditText android:id="@+id/passwordEntry"
android:layout_height="wrap_content"
android:layout_width="320dip"
android:layout_toRightOf="@+id/passwordLabel"
android:layout_marginTop="26dip"
android:singleLine="true"
android:inputType="textPassword"
android:textAppearance="?android:attr/textAppearanceMedium"
android:editable="false"
/>
<TextView android:id="@+id/status"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_toRightOf="@+id/passwordLabel"
android:layout_below="@+id/passwordEntry"
android:paddingTop="8dip"
android:singleLine="true"
android:textSize="17sp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:drawableLeft="@*android:drawable/ic_lock_idle_lock"
android:visibility="gone"
/>
</RelativeLayout>
<com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboard"
android:layout_width="match_parent"

View File

@@ -14,24 +14,33 @@
limitations under the License.
-->
<LinearLayout
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="154dip"
android:paddingLeft="128dip"
android:paddingRight="128dip"
android:paddingBottom="0dip"
android:orientation="vertical"
android:background="@drawable/encryption_bg_waiting"
android:paddingBottom="16dip"
>
<ImageView
android:id="@+id/encroid"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:paddingRight="65dip"
android:src="@drawable/encroid_waiting"
/>
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minHeight="48dip"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginLeft="16dip"
android:textSize="30dip"
android:textColor="#ff99cc00"
@@ -44,6 +53,7 @@
android:id="@+id/top_divider"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/title"
>
<ProgressBar
android:id="@+id/progress_bar"
@@ -52,17 +62,41 @@
style="?android:attr/progressBarStyleHorizontal"
/>
</RelativeLayout>
<TextView
android:id="@+id/status"
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_below="@+id/top_divider"
android:paddingLeft="152dip"
android:paddingTop="21dip"
android:textSize="18dip"
android:textColor="#ffffffff"
android:text="@string/crypt_keeper_setup_description"
android:textAppearance="?android:attr/textAppearanceMedium"
/>
</LinearLayout>
<!-- Divider -->
<RelativeLayout
android:id="@+id/bottom_divider"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="152dip"
android:layout_above="@+id/factory_reset"
android:visibility="gone"
>
<ProgressBar
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?android:attr/progressBarStyleHorizontal"
/>
</RelativeLayout>
<Button
android:id="@+id/factory_reset"
android:layout_width="208dip"
android:layout_height="48dip"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_marginBottom="80dip"
android:text="@string/master_clear_button_text"
android:visibility="gone"
/>
</RelativeLayout>

View File

@@ -5,29 +5,28 @@
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
-->
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/accelerate_interpolator"
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center_vertical"
>
<scale
android:fromXScale="1.0"
android:toXScale="0.0"
android:fromYScale="1.0"
android:toYScale="0.0"
android:pivotX="50%"
android:pivotY="50%"
android:fillAfter="false"
android:duration="500"
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/encroid_progress"
/>
</set>
</LinearLayout>

View File

@@ -111,7 +111,6 @@
<!-- Title for a notification shown. -->
<string name="sdcard_setting" product="default">SD card</string>
<!-- Battery Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
<string name="battery_info_status_label">Battery status:</string>
<!-- Battery Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
@@ -141,7 +140,6 @@
<!-- Battery Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
<string name="battery_info_screen_on">Screen ON time:</string>
<!-- Battery Info screen. Value for a status item. Used for diagnostic info screens, precise translation isn't needed -->
<string name="battery_info_status_unknown">Unknown</string>
<!-- Battery Info screen. Value for a status item. Used for diagnostic info screens, precise translation isn't needed -->
@@ -493,7 +491,6 @@
<!-- Main Settings screen settings summary text for the "Wireless controls" setting -->
<string name="radio_controls_summary">Manage Wi-Fi, Bluetooth, airplane mode, mobile networks, &amp; VPNs</string>
<!-- mobile network settings screen, setting check box title -->
<string name="roaming">Data roaming</string>
<!-- mobile network settings screen, setting option summary text when check box is selected -->
@@ -619,7 +616,7 @@
an hour or more. You must start with a charged battery and keep your phone plugged in
until encryption is complete. If you interrupt the encryption process, you will lose
some or all of your data.</string>
<!-- Button text to start encryption process -->
<string name="crypt_keeper_button_text" product="tablet">Encrypt tablet</string>
<!-- Button text to start encryption process -->
@@ -659,9 +656,29 @@
<string name="crypt_keeper_setup_description" product="default">Please wait while your phone
is being encrypted. ^1% complete.</string>
<!-- Informational text on the progress screen when encrypting the device has a problem -->
<!-- Informational text on the password entry screen when password entry fails-->
<string name="crypt_keeper_cooldown">Try again in ^1 seconds.</string>
<!-- Informational text on the password entry screen prompting the user for their password -->
<string name="crypt_keeper_enter_password">Enter your password</string>
<!-- Title of the encryption screen when encrypting the device failed -->
<string name="crypt_keeper_failed_title">Encryption failed</string>
<!-- Informational text when encryption fails -->
<string name="crypt_keeper_failed_summary" product="tablet">
Encryption was interrupted and can\'t complete. You must perform a factory data reset (erasing
all your data) before you can resume using your tablet. You can try encrypting your tablet
again after the reset is complete.
</string>
<!-- Informational text when encryption fails -->
<string name="crypt_keeper_failed_summary" product="default">
Encryption was interrupted and can\'t complete. You must perform a factory data reset (erasing
all your data) before you can resume using your phone. You can try encrypting your phone
again after the reset is complete.
</string>
<!-- Unlock Picker Settings --><skip />
<!-- Security Picker --><skip />
@@ -1160,7 +1177,6 @@
<!-- Default access point SSID used for tethering -->
<string name="wifi_tether_configure_ssid_default">AndroidHotspot</string>
<!-- Do not translate. Used for diagnostic screens, precise translation is not necessary
Wi-Fi Testing on the diagnostic screen-->
<string name="testing_wifi_info" translatable="false">Wifi information</string>

View File

@@ -121,18 +121,10 @@
<item name="android:windowIsFloating">true</item>
</style>
<style name="CryptKeeperTheme" parent="@android:style/Theme.Holo.NoActionBar">
<item name="android:windowAnimationStyle">@style/CryptKeeperAnimation</item>
</style>
<style name="CryptKeeperBlankTheme" parent="@android:style/Theme.Holo.NoActionBar">
<item name="android:background">#ff000000</item>
</style>
<style name="CryptKeeperAnimation">
<item name="android:windowExitAnimation">@anim/crypt_keeper_exit</item>
</style>
<style name="SecurityPreferenceButtonContainer" parent="@android:style/Holo.SegmentedButton">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>