diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-04-06 11:55:41 +0200 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-04-06 11:55:41 +0200 |
commit | d3d36485d5ac9fa9c9826b9595a37d9f316ef224 (patch) | |
tree | 40551f119c80fe5a7fff632f8a0c0e8553b6e4d5 /OpenPGP-Keychain | |
parent | 56cd3ab9c7fadc194b261e3d580f500c0e5020d8 (diff) | |
download | open-keychain-d3d36485d5ac9fa9c9826b9595a37d9f316ef224.tar.gz open-keychain-d3d36485d5ac9fa9c9826b9595a37d9f316ef224.tar.bz2 open-keychain-d3d36485d5ac9fa9c9826b9595a37d9f316ef224.zip |
Optimize comments, remove dead code
Diffstat (limited to 'OpenPGP-Keychain')
6 files changed, 5 insertions, 47 deletions
diff --git a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AccountSettingsActivity.java b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AccountSettingsActivity.java index 671a3e0aa..123ed526f 100644 --- a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AccountSettingsActivity.java +++ b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AccountSettingsActivity.java @@ -65,7 +65,7 @@ public class AccountSettingsActivity extends ActionBarActivity { return; } else { Log.d(Constants.TAG, "uri: " + mAccountUri); - loadData(savedInstanceState, mAccountUri); + loadData(mAccountUri); } } @@ -89,8 +89,7 @@ public class AccountSettingsActivity extends ActionBarActivity { return super.onOptionsItemSelected(item); } - private void loadData(Bundle savedInstanceState, Uri accountUri) { - // TODO: load this also like other fragment with newInstance arguments? + private void loadData(Uri accountUri) { AccountSettings settings = ProviderHelper.getApiAccountSettings(this, accountUri); mAccountSettingsFragment.setAccSettings(settings); } @@ -104,7 +103,6 @@ public class AccountSettingsActivity extends ActionBarActivity { private void save() { ProviderHelper.updateApiAccount(this, mAccountSettingsFragment.getAccSettings(), mAccountUri); - finish(); } diff --git a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AccountSettingsFragment.java b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AccountSettingsFragment.java index 992aa7c95..0a3ec3c3b 100644 --- a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AccountSettingsFragment.java +++ b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AccountSettingsFragment.java @@ -166,7 +166,7 @@ public class AccountSettingsFragment extends Fragment implements Intent intent = new Intent(getActivity(), EditKeyActivity.class); intent.setAction(EditKeyActivity.ACTION_CREATE_KEY); intent.putExtra(EditKeyActivity.EXTRA_GENERATE_DEFAULT_KEYS, true); - // set default user id to account name TODO: not working currently in EditKey + // set default user id to account name intent.putExtra(EditKeyActivity.EXTRA_USER_IDS, mAccSettings.getAccountName()); startActivityForResult(intent, REQUEST_CODE_CREATE_KEY); } diff --git a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AccountsListFragment.java b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AccountsListFragment.java index cfc9c92ad..4d99e1923 100644 --- a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AccountsListFragment.java +++ b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AccountsListFragment.java @@ -164,7 +164,7 @@ public class AccountsListFragment extends ListFragment implements /** * Similar to CursorAdapter.getItemId(). - * Required to build Uris for api app view, which is not based on row ids + * Required to build Uris for api accounts, which are not based on row ids * * @param position * @return diff --git a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AppSettingsActivity.java b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AppSettingsActivity.java index f6f9631cb..818c296c1 100644 --- a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AppSettingsActivity.java +++ b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AppSettingsActivity.java @@ -85,7 +85,6 @@ public class AppSettingsActivity extends ActionBarActivity { } private void loadData(Bundle savedInstanceState, Uri appUri) { - // TODO: load this also like other fragment with newInstance arguments? AppSettings settings = ProviderHelper.getApiAppSettings(this, appUri); mSettingsFragment.setAppSettings(settings); diff --git a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AppsListFragment.java b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AppsListFragment.java index 22082e913..9d0e6d3ef 100644 --- a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AppsListFragment.java +++ b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AppsListFragment.java @@ -124,7 +124,7 @@ public class AppsListFragment extends ListFragment implements /** * Similar to CursorAdapter.getItemId(). - * Required to build Uris for api app view, which is not based on row ids + * Required to build Uris for api apps, which are not based on row ids * * @param position * @return diff --git a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/RemoteServiceActivity.java b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/RemoteServiceActivity.java index 307c9c61a..ab95f2691 100644 --- a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/RemoteServiceActivity.java +++ b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/RemoteServiceActivity.java @@ -21,7 +21,6 @@ import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.os.Message; -import android.os.Messenger; import android.support.v7.app.ActionBarActivity; import android.view.View; @@ -31,7 +30,6 @@ import org.sufficientlysecure.keychain.Constants; import org.sufficientlysecure.keychain.Id; import org.sufficientlysecure.keychain.R; import org.sufficientlysecure.keychain.helper.ActionBarHelper; -import org.sufficientlysecure.keychain.pgp.exception.PgpGeneralException; import org.sufficientlysecure.keychain.provider.KeychainContract; import org.sufficientlysecure.keychain.provider.ProviderHelper; import org.sufficientlysecure.keychain.remote.AccountSettings; @@ -302,41 +300,4 @@ public class RemoteServiceActivity extends ActionBarActivity { finish(); } } - - /** - * Shows passphrase dialog to cache a new passphrase the user enters for using it later for - * encryption. Based on mSecretKeyId it asks for a passphrase to open a private key or it asks - * for a symmetric passphrase - */ - private void showPassphraseDialog(final Intent data, long secretKeyId) { - // Message is received after passphrase is cached - Handler returnHandler = new Handler() { - @Override - public void handleMessage(Message message) { - if (message.what == PassphraseDialogFragment.MESSAGE_OKAY) { - // return given params again, for calling the service method again - RemoteServiceActivity.this.setResult(RESULT_OK, data); - } else { - RemoteServiceActivity.this.setResult(RESULT_CANCELED); - } - - RemoteServiceActivity.this.finish(); - } - }; - - // Create a new Messenger for the communication back - Messenger messenger = new Messenger(returnHandler); - - try { - PassphraseDialogFragment passphraseDialog = PassphraseDialogFragment.newInstance(this, - messenger, secretKeyId); - - passphraseDialog.show(getSupportFragmentManager(), "passphraseDialog"); - } catch (PgpGeneralException e) { - Log.d(Constants.TAG, "No passphrase for this secret key, do pgp operation directly!"); - // return given params again, for calling the service method again - setResult(RESULT_OK, data); - finish(); - } - } } |