diff options
Diffstat (limited to 'OpenKeychain')
15 files changed, 52 insertions, 36 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/keyimport/FileImportCache.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/keyimport/FileImportCache.java index ff391af1a..08b8afae7 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/keyimport/FileImportCache.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/keyimport/FileImportCache.java @@ -21,13 +21,10 @@ import android.content.Context; import android.os.Bundle; import android.os.Parcel; -import org.sufficientlysecure.keychain.Constants; import org.sufficientlysecure.keychain.KeychainApplication; -import org.sufficientlysecure.keychain.util.Log; import java.io.File; import java.io.FileInputStream; -import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.util.ArrayList; @@ -80,7 +77,6 @@ public class FileImportCache { File tempFile = new File(cacheDir, FILENAME); try { - FileInputStream fis = new FileInputStream(tempFile); byte[] array = new byte[(int) fis.getChannel().size()]; fis.read(array, 0, array.length); diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptFragment.java index 6b8358538..d4235b82b 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptFragment.java @@ -132,7 +132,7 @@ public class DecryptFragment extends Fragment { mResultText.setText(R.string.decrypt_result_decrypted_and_signature_certified); } - mResultLayout.setBackgroundColor(getResources().getColor(R.color.result_green)); + mResultLayout.setBackgroundColor(getResources().getColor(R.color.android_green_light)); mSignatureStatusImage.setImageResource(R.drawable.overlay_ok); mSignatureLayout.setVisibility(View.VISIBLE); mLookupKey.setVisibility(View.GONE); @@ -146,7 +146,7 @@ public class DecryptFragment extends Fragment { mResultText.setText(R.string.decrypt_result_decrypted_and_signature_uncertified); } - mResultLayout.setBackgroundColor(getResources().getColor(R.color.result_orange)); + mResultLayout.setBackgroundColor(getResources().getColor(R.color.android_orange_light)); mSignatureStatusImage.setImageResource(R.drawable.overlay_ok); mSignatureLayout.setVisibility(View.VISIBLE); mLookupKey.setVisibility(View.GONE); @@ -160,7 +160,7 @@ public class DecryptFragment extends Fragment { mResultText.setText(R.string.decrypt_result_decrypted_unknown_pub_key); } - mResultLayout.setBackgroundColor(getResources().getColor(R.color.result_orange)); + mResultLayout.setBackgroundColor(getResources().getColor(R.color.android_orange_light)); mSignatureStatusImage.setImageResource(R.drawable.overlay_error); mSignatureLayout.setVisibility(View.VISIBLE); mLookupKey.setVisibility(View.VISIBLE); @@ -170,7 +170,7 @@ public class DecryptFragment extends Fragment { case OpenPgpSignatureResult.SIGNATURE_ERROR: { mResultText.setText(R.string.decrypt_result_invalid_signature); - mResultLayout.setBackgroundColor(getResources().getColor(R.color.result_red)); + mResultLayout.setBackgroundColor(getResources().getColor(R.color.android_red_light)); mSignatureStatusImage.setImageResource(R.drawable.overlay_error); mSignatureLayout.setVisibility(View.GONE); mLookupKey.setVisibility(View.GONE); @@ -180,7 +180,7 @@ public class DecryptFragment extends Fragment { default: { mResultText.setText(R.string.error); - mResultLayout.setBackgroundColor(getResources().getColor(R.color.result_red)); + mResultLayout.setBackgroundColor(getResources().getColor(R.color.android_red_light)); mSignatureStatusImage.setImageResource(R.drawable.overlay_error); mSignatureLayout.setVisibility(View.GONE); mLookupKey.setVisibility(View.GONE); @@ -192,7 +192,7 @@ public class DecryptFragment extends Fragment { mLookupKey.setVisibility(View.GONE); // successful decryption-only - mResultLayout.setBackgroundColor(getResources().getColor(R.color.result_purple)); + mResultLayout.setBackgroundColor(getResources().getColor(R.color.android_purple_light)); mResultText.setText(R.string.decrypt_result_decrypted); } } diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListFragment.java index 9f1ac0cdd..b0caaa10c 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListFragment.java @@ -47,7 +47,6 @@ import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.AbsListView.MultiChoiceModeListener; import android.widget.AdapterView; -import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.ListView; import android.widget.TextView; @@ -493,19 +492,19 @@ public class KeyListFragment extends LoaderFragment if (isRevoked) { h.mStatus.setImageDrawable( getResources().getDrawable(R.drawable.status_signature_revoked_cutout)); - h.mStatus.setColorFilter(getResources().getColor(R.color.result_red), + h.mStatus.setColorFilter(getResources().getColor(R.color.android_red_light), PorterDuff.Mode.SRC_ATOP); h.mStatus.setVisibility(View.VISIBLE); } else if (isExpired) { h.mStatus.setImageDrawable( getResources().getDrawable(R.drawable.status_signature_expired_cutout)); - h.mStatus.setColorFilter(getResources().getColor(R.color.result_orange), + h.mStatus.setColorFilter(getResources().getColor(R.color.android_orange_light), PorterDuff.Mode.SRC_ATOP); h.mStatus.setVisibility(View.VISIBLE); } else if (isVerified) { h.mStatus.setImageDrawable( getResources().getDrawable(R.drawable.status_signature_verified_cutout)); - h.mStatus.setColorFilter(getResources().getColor(R.color.result_green), + h.mStatus.setColorFilter(getResources().getColor(R.color.android_green_light), PorterDuff.Mode.SRC_ATOP); h.mStatus.setVisibility(View.VISIBLE); } else { diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewCertActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewCertActivity.java index 37c583920..5201b5df8 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewCertActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewCertActivity.java @@ -152,7 +152,7 @@ public class ViewCertActivity extends ActionBarActivity sig.init(signerRing.getPublicKey()); if (sig.verifySignature(signeeRing.getPublicKey(), signeeUid)) { mStatus.setText(R.string.cert_verify_ok); - mStatus.setTextColor(getResources().getColor(R.color.result_green)); + mStatus.setTextColor(getResources().getColor(R.color.android_green_light)); } else { mStatus.setText(R.string.cert_verify_failed); mStatus.setTextColor(getResources().getColor(R.color.alert)); diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java index 7a833026b..03e446723 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java @@ -516,19 +516,19 @@ public class ViewKeyActivity extends ActionBarActivity implements // Note: order is important if (isRevoked) { mStatusText.setText(R.string.view_key_revoked); - mStatusText.setTextColor(getResources().getColor(R.color.result_red)); + mStatusText.setTextColor(getResources().getColor(R.color.android_red_light)); mStatusImage.setImageDrawable( getResources().getDrawable(R.drawable.status_signature_revoked_cutout)); - mStatusImage.setColorFilter(getResources().getColor(R.color.result_red), + mStatusImage.setColorFilter(getResources().getColor(R.color.android_red_light), PorterDuff.Mode.SRC_ATOP); mStatusDivider.setVisibility(View.VISIBLE); mStatusLayout.setVisibility(View.VISIBLE); } else if (isExpired) { mStatusText.setText(R.string.view_key_expired); - mStatusText.setTextColor(getResources().getColor(R.color.result_orange)); + mStatusText.setTextColor(getResources().getColor(R.color.android_orange_light)); mStatusImage.setImageDrawable( getResources().getDrawable(R.drawable.status_signature_expired_cutout)); - mStatusImage.setColorFilter(getResources().getColor(R.color.result_orange), + mStatusImage.setColorFilter(getResources().getColor(R.color.android_orange_light), PorterDuff.Mode.SRC_ATOP); mStatusDivider.setVisibility(View.VISIBLE); mStatusLayout.setVisibility(View.VISIBLE); diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/UserIdsAdapter.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/UserIdsAdapter.java index 6519915fa..c8b74da2e 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/UserIdsAdapter.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/UserIdsAdapter.java @@ -188,7 +188,7 @@ public class UserIdsAdapter extends CursorAdapter implements AdapterView.OnItemC case Certs.VERIFIED_SECRET: vVerified.setImageResource(R.drawable.status_signature_verified_cutout); vVerified.setColorFilter( - mContext.getResources().getColor(R.color.result_green), + mContext.getResources().getColor(R.color.android_green_light), PorterDuff.Mode.SRC_IN); break; case Certs.VERIFIED_SELF: @@ -200,7 +200,7 @@ public class UserIdsAdapter extends CursorAdapter implements AdapterView.OnItemC default: vVerified.setImageResource(R.drawable.status_signature_invalid_cutout); vVerified.setColorFilter( - mContext.getResources().getColor(R.color.result_red), + mContext.getResources().getColor(R.color.android_red_light), PorterDuff.Mode.SRC_IN); break; } diff --git a/OpenKeychain/src/main/res/drawable-hdpi/create_key_robot.png b/OpenKeychain/src/main/res/drawable-hdpi/create_key_robot.png Binary files differnew file mode 100644 index 000000000..acc198fc3 --- /dev/null +++ b/OpenKeychain/src/main/res/drawable-hdpi/create_key_robot.png diff --git a/OpenKeychain/src/main/res/drawable-mdpi/create_key_robot.png b/OpenKeychain/src/main/res/drawable-mdpi/create_key_robot.png Binary files differnew file mode 100644 index 000000000..58476bfc9 --- /dev/null +++ b/OpenKeychain/src/main/res/drawable-mdpi/create_key_robot.png diff --git a/OpenKeychain/src/main/res/drawable-xhdpi/create_key_robot.png b/OpenKeychain/src/main/res/drawable-xhdpi/create_key_robot.png Binary files differnew file mode 100644 index 000000000..022f2dd2e --- /dev/null +++ b/OpenKeychain/src/main/res/drawable-xhdpi/create_key_robot.png diff --git a/OpenKeychain/src/main/res/drawable-xxhdpi/create_key_robot.png b/OpenKeychain/src/main/res/drawable-xxhdpi/create_key_robot.png Binary files differnew file mode 100644 index 000000000..5392deafd --- /dev/null +++ b/OpenKeychain/src/main/res/drawable-xxhdpi/create_key_robot.png diff --git a/OpenKeychain/src/main/res/layout/create_key_final_fragment.xml b/OpenKeychain/src/main/res/layout/create_key_final_fragment.xml index cc152a323..74231142a 100644 --- a/OpenKeychain/src/main/res/layout/create_key_final_fragment.xml +++ b/OpenKeychain/src/main/res/layout/create_key_final_fragment.xml @@ -76,15 +76,30 @@ android:layout_height="1dip" android:background="?android:attr/listDivider" /> - <TextView - android:layout_width="wrap_content" + <LinearLayout + android:layout_width="match_parent" android:layout_height="wrap_content" - android:paddingTop="16dp" - android:paddingBottom="8dp" - android:text="Creating the key can take up to 3 Minutes, be patient!\n(3 subkeys, RSA, 4096 bit)" - android:textColor="@color/result_red" - android:textAppearance="?android:attr/textAppearanceMedium" - android:id="@+id/textView" /> + android:layout_marginTop="16dp" + android:layout_marginBottom="8dp" + android:orientation="horizontal"> + + <ImageView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:id="@+id/imageView" + android:src="@drawable/create_key_robot" + android:layout_gravity="center_vertical" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginLeft="8dp" + android:text="Creating a key may take a while, have a cup of coffee in the meantime…\n(3 subkeys, RSA, 4096 bit)" + android:textColor="@color/android_green_dark" + android:textAppearance="?android:attr/textAppearanceMedium" + android:id="@+id/textView" /> + + </LinearLayout> </LinearLayout> </ScrollView> diff --git a/OpenKeychain/src/main/res/layout/decrypt_result_include.xml b/OpenKeychain/src/main/res/layout/decrypt_result_include.xml index 05877656b..fcad91df3 100644 --- a/OpenKeychain/src/main/res/layout/decrypt_result_include.xml +++ b/OpenKeychain/src/main/res/layout/decrypt_result_include.xml @@ -8,7 +8,7 @@ android:paddingRight="16dp" android:paddingTop="4dp" android:paddingBottom="4dp" - android:background="@color/result_purple"> + android:background="@color/android_purple_light"> <View android:layout_width="match_parent" diff --git a/OpenKeychain/src/main/res/layout/edit_key_subkey_added_item.xml b/OpenKeychain/src/main/res/layout/edit_key_subkey_added_item.xml index 856bef36a..a4258b998 100644 --- a/OpenKeychain/src/main/res/layout/edit_key_subkey_added_item.xml +++ b/OpenKeychain/src/main/res/layout/edit_key_subkey_added_item.xml @@ -9,7 +9,7 @@ android:layout_width="wrap_content" android:layout_height="match_parent" android:minWidth="10dp" - android:background="@color/result_green" /> + android:background="@color/android_green_light" /> <TableLayout android:layout_width="0dp" diff --git a/OpenKeychain/src/main/res/layout/edit_key_user_id_added_item.xml b/OpenKeychain/src/main/res/layout/edit_key_user_id_added_item.xml index e69452db1..ef0e2626e 100644 --- a/OpenKeychain/src/main/res/layout/edit_key_user_id_added_item.xml +++ b/OpenKeychain/src/main/res/layout/edit_key_user_id_added_item.xml @@ -10,7 +10,7 @@ android:layout_width="wrap_content" android:layout_height="match_parent" android:minWidth="10dp" - android:background="@color/result_green" /> + android:background="@color/android_green_light" /> <LinearLayout android:orientation="vertical" diff --git a/OpenKeychain/src/main/res/values/colors.xml b/OpenKeychain/src/main/res/values/colors.xml index 449a09003..a21f949d1 100644 --- a/OpenKeychain/src/main/res/values/colors.xml +++ b/OpenKeychain/src/main/res/values/colors.xml @@ -10,8 +10,14 @@ <color name="holo_gray_light">#33999999</color> <color name="holo_gray_bright">#33CCCCCC</color> - <color name="result_red">#ffff4444</color> - <color name="result_orange">#ffffbb33</color> - <color name="result_green">#ff99cc00</color> - <color name="result_purple">#aa66cc</color> + <!-- http://developer.android.com/design/style/color.html --> + <color name="android_red_light">#ffff4444</color> + <color name="android_red_dark">#ffCC0000</color> + <color name="android_orange_light">#ffffbb33</color> + <color name="android_orange_dark">#ffFF8800</color> + <color name="android_green_light">#ff99cc00</color> + <color name="android_green_dark">#ff669900</color> + <color name="android_purple_light">#ffaa66cc</color> + <color name="android_purple_dark">#ff9933CC</color> + </resources> |