aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java
diff options
context:
space:
mode:
authorDominik Schürmann <dominik@dominikschuermann.de>2015-03-03 00:26:36 +0100
committerDominik Schürmann <dominik@dominikschuermann.de>2015-03-03 00:26:36 +0100
commitd3f54d3ace1cc4d81a89df5b3c48a2af959b5119 (patch)
treeb370b4bab8ee906bf770b626213c2e77de534a11 /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java
parent363d41ed1d4910fa5b8651d3bd95d1c61bc0352c (diff)
downloadopen-keychain-d3f54d3ace1cc4d81a89df5b3c48a2af959b5119.tar.gz
open-keychain-d3f54d3ace1cc4d81a89df5b3c48a2af959b5119.tar.bz2
open-keychain-d3f54d3ace1cc4d81a89df5b3c48a2af959b5119.zip
Revert "rescale qr code bitmap in background"
size of view may not be available in background thread. This reverts commit 7e4c39c79d1adb58f3181c9674309b1faaecc864.
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java')
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java13
1 files changed, 7 insertions, 6 deletions
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 83e928ec6..0be6c26f6 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java
@@ -633,15 +633,16 @@ public class ViewKeyActivity extends BaseActivity implements
protected Bitmap doInBackground(Void... unused) {
String qrCodeContent = Constants.FINGERPRINT_SCHEME + ":" + fingerprint;
// render with minimal size
- Bitmap qrCode = QrCodeUtils.getQRCodeBitmap(qrCodeContent, 0);
- // scale the image up to our actual size. we do this in code rather
- // than let the ImageView do this because we don't require filtering.
- return Bitmap.createScaledBitmap(qrCode, mQrCode.getHeight(),
- mQrCode.getHeight(), false);
+ return QrCodeUtils.getQRCodeBitmap(qrCodeContent, 0);
}
protected void onPostExecute(Bitmap qrCode) {
- mQrCode.setImageBitmap(qrCode);
+ // scale the image up to our actual size. we do this in code rather
+ // than let the ImageView do this because we don't require filtering.
+ Bitmap scaled = Bitmap.createScaledBitmap(qrCode,
+ mQrCode.getHeight(), mQrCode.getHeight(),
+ false);
+ mQrCode.setImageBitmap(scaled);
// simple fade-in animation
AlphaAnimation anim = new AlphaAnimation(0.0f, 1.0f);