Merge pull request #2093 from open-keychain/key-status

Key Status Card
This commit is contained in:
Dominik Schürmann
2017-04-26 10:45:58 +03:00
committed by GitHub
29 changed files with 1700 additions and 196 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 694 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 495 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 860 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -0,0 +1,164 @@
<merge
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
style="@style/CardViewHeader"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Key Status" />
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/key_health_layout"
android:paddingTop="12dp"
android:paddingBottom="12dp"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:background="?selectableItemBackground"
>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:id="@+id/key_health_icon"
tools:src="@drawable/ic_check_white_24dp"
tools:tint="@color/android_green_light"
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
/>
<LinearLayout
android:orientation="vertical"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:id="@+id/key_health_title"
android:textAppearance="?android:attr/textAppearanceMedium"
tools:text="Healthy" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:id="@+id/key_health_subtitle"
tools:text="No key issues found." />
</LinearLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:id="@+id/key_health_expander"
android:src="@drawable/ic_expand_more_black_24dp"
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
android:visibility="gone"
tools:visibility="visible"
/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dip"
android:id="@+id/key_health_divider"
android:background="?android:attr/listDivider" />
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:id="@+id/key_insecure_layout"
android:visibility="gone"
tools:visibility="gone">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text="Security Problem"
android:textAppearance="@style/SectionHeader"
android:layout_marginBottom="4dp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:id="@+id/key_insecure_problem"
tools:text="@string/key_insecure_bitstrength_2048_problem" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text="Suggested Solution"
android:textAppearance="@style/SectionHeader"
android:layout_marginTop="8dp"
android:layout_marginBottom="4dp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:id="@+id/key_insecure_solution"
tools:text="@string/key_insecure_bitstrength_2048_solution" />
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:id="@+id/key_expiry_layout"
android:visibility="gone"
tools:visibility="visible">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:id="@+id/key_expiry_text"
android:textAppearance="?android:textAppearanceSmall"
tools:text="@string/key_expiry_text"
/>
</LinearLayout>
<org.sufficientlysecure.keychain.ui.widget.KeyStatusList
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/key_health_status_list"
android:paddingTop="12dp"
android:paddingBottom="12dp"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:visibility="gone"
/>
<!--tools:visibility="visible"-->
</LinearLayout>
</merge>

View File

@@ -13,5 +13,4 @@
android:name="org.sufficientlysecure.keychain.ui.LogDisplayFragment"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>

View File

@@ -0,0 +1,172 @@
<merge
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:showIn="@layout/tools_vertlin">
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:id="@+id/cap_certify">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:id="@+id/cap_cert_icon"
android:src="@drawable/ic_action_verified_cutout_24dp"
tools:tint="@color/android_green_light"
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
/>
<LinearLayout
android:orientation="vertical"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="?attr/colorHeaderText"
android:text="@string/cap_title_confirm" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:id="@+id/cap_cert_text"
tools:text="@string/cap_cert_ok" />
</LinearLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:id="@+id/cap_cert_security_token"
android:src="@drawable/yubi_icon_24dp"
android:layout_marginLeft="6dp"
android:layout_marginRight="6dp"
android:visibility="gone"
/>
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:id="@+id/cap_sign">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:id="@+id/cap_sign_icon"
android:src="@drawable/ic_mode_edit_white_24dp"
tools:tint="@color/android_green_light"
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
/>
<LinearLayout
android:orientation="vertical"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:id="@+id/cap_sign_caption"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="?attr/colorHeaderText"
android:text="@string/cap_title_sign" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:id="@+id/cap_sign_text"
tools:text="@string/cap_sign_divert" />
</LinearLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:id="@+id/cap_sign_security_token"
android:src="@drawable/yubi_icon_24dp"
android:layout_marginLeft="6dp"
android:layout_marginRight="6dp"
android:visibility="gone"
tools:visibility="visible"
/>
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:id="@+id/cap_decrypt">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:id="@+id/cap_decrypt_icon"
android:src="@drawable/ic_lock_white_24dp"
tools:tint="@color/android_red_light"
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
/>
<LinearLayout
android:orientation="vertical"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="?attr/colorHeaderText"
android:text="@string/cap_title_decrypt" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:id="@+id/cap_decrypt_text"
tools:textColor="@color/android_red_light"
tools:text="@string/cap_decrypt_unavailable" />
</LinearLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:id="@+id/cap_decrypt_security_token"
android:src="@drawable/yubi_icon_24dp"
android:layout_marginLeft="6dp"
android:layout_marginRight="6dp"
android:visibility="gone"
/>
</LinearLayout>
</merge>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<include layout="@layout/subkey_status_card_content" />
</LinearLayout>

View File

@@ -9,6 +9,19 @@
android:paddingRight="16dp"
android:paddingTop="16dp">
<org.sufficientlysecure.keychain.ui.widget.KeyHealthCardView
android:id="@+id/subkey_status_card"
android:layout_gravity="center"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
tools:visibility="visible"
card_view:cardBackgroundColor="?attr/colorCardViewBackground"
card_view:cardElevation="2dp"
card_view:cardUseCompatPadding="true"
card_view:cardCornerRadius="4dp"
/>
<android.support.v7.widget.CardView
android:id="@+id/card_linked_ids"
android:layout_width="match_parent"

View File

@@ -121,6 +121,7 @@
<string name="menu_help">"Help"</string>
<string name="menu_export_key">"Backup key"</string>
<string name="menu_delete_key">"Delete key"</string>
<string name="menu_status">"View key status"</string>
<string name="menu_manage_keys">"Manage my keys"</string>
<string name="menu_search">"Search"</string>
<string name="menu_open">"Open"</string>
@@ -815,10 +816,6 @@
<string name="create_key_yubi_key_algorithm_auth_text">Authentication key</string>
<!-- View key -->
<string name="view_key_revoked">"Revoked: Key must not be used anymore!"</string>
<string name="view_key_insecure">"Insecure: Key must not be used anymore!"</string>
<string name="view_key_expired">"Expired: The contact needs to extend the key's validity!"</string>
<string name="view_key_expired_secret">"Expired: You can extend the keys validity by editing it!"</string>
<string name="view_key_my_key">"My Key"</string>
<string name="view_key_verified">"Confirmed Key"</string>
<string name="view_key_unverified">"Unconfirmed: Scan QR Code to confirm key!"</string>
@@ -1798,4 +1795,62 @@
<string name="requested_key_label">Requested key:</string>
<string name="error_preselect_sign_key">Error selecting key %s for signing!</string>
<string name="error_preselect_encrypt_key">Error selecting key %s for encryption!</string>
<string name="title_key_status">"Key Status"</string>
<string name="caption_secret_status">This key is yours. You can use it to:</string>
<string name="cap_title_confirm">Confirm other keys</string>
<string name="cap_cert_ok">"This key can confirm other keys."</string>
<string name="cap_cert_divert">"This key can confirm other keys, using a Security Token."</string>
<string name="cap_cert_stripped">"This key is stripped, it can NOT confirm other keys."</string>
<string name="cap_cert_unavailable">"This key is not configured to confirm keys!"</string>
<string name="cap_title_sign">Sign messages</string>
<string name="cap_sign_ok">"This key can sign/send messages."</string>
<string name="cap_sign_divert">"This key can sign/send messages, using a Security Token."</string>
<string name="cap_sign_expired">"This key can't sign/send messages, because it is expired."</string>
<string name="cap_sign_revoked">"This key can't sign/send messages, because it is revoked."</string>
<string name="cap_sign_stripped">"This key can\'t sign/send messages on this device!"</string>
<string name="cap_sign_unavailable">"This key is not configured to sign/send messages!"</string>
<string name="cap_sign_insecure">"This key can sign/send messages, but not securely!"</string>
<string name="cap_title_decrypt">Decrypt messages</string>
<string name="cap_decrypt_ok">"This key can decrypt/receive messages."</string>
<string name="cap_decrypt_divert">"This key can decrypt/receive messages, using a Security Token."</string>
<string name="cap_decrypt_expired">"This key can decrypt/receive messages, but is expired."</string>
<string name="cap_decrypt_revoked">"This key can decrypt/receive messages, but is revoked."</string>
<string name="cap_decrypt_stripped">"This key can\'t decrypt/receive messages on this device."</string>
<string name="cap_decrypt_unavailable">"This key is not configured to decrypt/receive messages!"</string>
<string name="cap_decrypt_insecure">"This key can decrypt/receive messages, but not securely!"</string>
<string name="key_health_ok_title">"Healthy"</string>
<string name="key_health_ok_subtitle">"No key issues found."</string>
<string name="key_health_divert_title">"Healthy (Security Token)"</string>
<string name="key_health_divert_subtitle">"No key issues found."</string>
<string name="key_health_expired_title">"Expired"</string>
<string name="key_health_expired_subtitle">"This key should not be used anymore."</string>
<string name="key_health_revoked_title">"Revoked"</string>
<string name="key_health_revoked_subtitle">"This key can\'t be used anymore."</string>
<string name="key_health_insecure_title">"Insecure"</string>
<string name="key_health_insecure_subtitle">"This key is not secure!"</string>
<string name="key_health_broken_title">"Defective"</string>
<string name="key_health_broken_subtitle">"Click for details"</string>
<string name="key_health_sign_only_title">"Healthy (Signing Key)"</string>
<string name="key_health_sign_only_subtitle">"Click for details"</string>
<string name="key_health_stripped_title">"Healthy (Stripped)"</string>
<string name="key_health_stripped_subtitle">"Click for details"</string>
<string name="key_health_partial_stripped_title">"Healthy (Partially Stripped)"</string>
<string name="key_health_partial_stripped_subtitle">"Click for details"</string>
<string name="key_insecure_bitstrength_2048_problem">"This key uses the <b>%1$s</b> algorithm with a strength of <b>%2$s bits</b>. A secure key should have a strength of 2048 bits."</string>
<string name="key_insecure_bitstrength_2048_solution">"This key can\'t be upgraded. For secure communication, the owner must generate a new key."</string>
<string name="key_insecure_unknown_curve_problem">"This key uses the <b>%1$s</b> algorithm, which is not whitelisted."</string>
<string name="key_insecure_unknown_curve_solution">"This key can\'t be upgraded. For secure communication, the owner must generate a new key."</string>
<string name="key_insecure_unidentified_problem">"There is an unidentified problem with this key."</string>
<string name="key_insecure_unidentified_solution">"Please submit a bug report."</string>
<string name="key_expiry_text">"This key expired on <b>%1$s</b>."</string>
</resources>