Merge branch 'master' of github.com:open-keychain/open-keychain

This commit is contained in:
Vincent Breitmoser
2014-09-30 00:51:58 +02:00
13 changed files with 28 additions and 82 deletions

View File

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

View File

@@ -112,11 +112,11 @@ public class DecryptTextActivity extends ActionBarActivity {
}
if (Intent.ACTION_SEND.equals(action) && type != null) {
// Android action
Log.logDebugBundle(extras, "extras");
// When sending to Keychain Decrypt via share menu
if ("text/plain".equals(type)) {
String sharedText = intent.getStringExtra(Intent.EXTRA_TEXT);
String sharedText = extras.getString(Intent.EXTRA_TEXT);
sharedText = getPgpContent(sharedText);
if (sharedText != null) {

View File

@@ -309,7 +309,7 @@ public class EncryptFilesActivity extends EncryptActivity implements EncryptActi
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.encrypt_file_activity);
setContentView(R.layout.encrypt_files_activity);
// if called with an intent action, do not init drawer navigation
if (ACTION_ENCRYPT_DATA.equals(getIntent().getAction())) {

View File

@@ -76,7 +76,7 @@ public class EncryptFilesFragment extends Fragment implements EncryptActivityInt
*/
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.encrypt_file_fragment, container, false);
View view = inflater.inflate(R.layout.encrypt_files_fragment, container, false);
View vEncryptFile = view.findViewById(R.id.action_encrypt_file);
vEncryptFile.setOnClickListener(new View.OnClickListener() {

View File

@@ -302,7 +302,6 @@ public class EncryptTextActivity extends EncryptActivity implements EncryptActiv
// Handle intent actions
handleActions(getIntent());
updateModeFragment();
}
@Override
@@ -359,9 +358,11 @@ public class EncryptTextActivity extends EncryptActivity implements EncryptActiv
// When sending to OpenKeychain Encrypt via share menu
if (Intent.ACTION_SEND.equals(action) && type != null) {
Log.logDebugBundle(extras, "extras");
// When sending to OpenKeychain Encrypt via share menu
if ("text/plain".equals(type)) {
String sharedText = intent.getStringExtra(Intent.EXTRA_TEXT);
String sharedText = extras.getString(Intent.EXTRA_TEXT);
if (sharedText != null) {
// handle like normal text encryption, override action and extras to later
// executeServiceMethod ACTION_ENCRYPT_TEXT in main actions