Fix nullpointer in DecryptActivity
This commit is contained in:
@@ -79,7 +79,7 @@ public class DecryptActivity extends DrawerActivity {
|
|||||||
final String clipboardText =
|
final String clipboardText =
|
||||||
ClipboardReflection.getClipboardText(DecryptActivity.this).toString();
|
ClipboardReflection.getClipboardText(DecryptActivity.this).toString();
|
||||||
|
|
||||||
new AsyncTask<Void,Void,Boolean>() {
|
AsyncTask<Void, Void, Boolean> tadaTask = new AsyncTask<Void, Void, Boolean>() {
|
||||||
@Override
|
@Override
|
||||||
protected Boolean doInBackground(Void... params) {
|
protected Boolean doInBackground(Void... params) {
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@ public class DecryptActivity extends DrawerActivity {
|
|||||||
boolean animate = matcher.matches();
|
boolean animate = matcher.matches();
|
||||||
|
|
||||||
// see if it looks like another pgp thing
|
// see if it looks like another pgp thing
|
||||||
if(!animate) {
|
if (!animate) {
|
||||||
matcher = PgpHelper.PGP_CLEARTEXT_SIGNATURE.matcher(clipboardText);
|
matcher = PgpHelper.PGP_CLEARTEXT_SIGNATURE.matcher(clipboardText);
|
||||||
animate = matcher.matches();
|
animate = matcher.matches();
|
||||||
}
|
}
|
||||||
@@ -100,11 +100,15 @@ public class DecryptActivity extends DrawerActivity {
|
|||||||
super.onPostExecute(animate);
|
super.onPostExecute(animate);
|
||||||
|
|
||||||
// if so, animate the clipboard icon just a bit~
|
// if so, animate the clipboard icon just a bit~
|
||||||
if(animate) {
|
if (animate) {
|
||||||
SubtleAttentionSeeker.tada(findViewById(R.id.clipboard_icon), 1.5f).start();
|
SubtleAttentionSeeker.tada(findViewById(R.id.clipboard_icon), 1.5f).start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}.execute();
|
};
|
||||||
|
|
||||||
|
if (clipboardText != null) {
|
||||||
|
tadaTask.execute();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user