Merge pull request #1148 from manojkhannakm/development

Fixed a ClassCastException
This commit is contained in:
Dominik Schürmann 2015-03-15 15:35:32 +01:00
commit 8a2bd80d40
2 changed files with 5 additions and 5 deletions

View File

@ -28,8 +28,8 @@ import android.widget.TextView;
import org.sufficientlysecure.keychain.Constants; import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.R; import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.operations.results.EditKeyResult;
import org.sufficientlysecure.keychain.operations.results.OperationResult; import org.sufficientlysecure.keychain.operations.results.OperationResult;
import org.sufficientlysecure.keychain.operations.results.SaveKeyringResult;
import org.sufficientlysecure.keychain.pgp.KeyRing; import org.sufficientlysecure.keychain.pgp.KeyRing;
import org.sufficientlysecure.keychain.remote.AccountSettings; import org.sufficientlysecure.keychain.remote.AccountSettings;
import org.sufficientlysecure.keychain.ui.CreateKeyActivity; import org.sufficientlysecure.keychain.ui.CreateKeyActivity;
@ -106,8 +106,8 @@ public class AccountSettingsFragment extends Fragment {
case REQUEST_CODE_CREATE_KEY: { case REQUEST_CODE_CREATE_KEY: {
if (resultCode == Activity.RESULT_OK) { if (resultCode == Activity.RESULT_OK) {
if (data != null && data.hasExtra(OperationResult.EXTRA_RESULT)) { if (data != null && data.hasExtra(OperationResult.EXTRA_RESULT)) {
SaveKeyringResult result = data.getParcelableExtra(OperationResult.EXTRA_RESULT); EditKeyResult result = data.getParcelableExtra(OperationResult.EXTRA_RESULT);
mSelectKeySpinner.setSelectedKeyId(result.mRingMasterKeyId); mSelectKeySpinner.setSelectedKeyId(result.mMasterKeyId);
} else { } else {
Log.e(Constants.TAG, "missing result!"); Log.e(Constants.TAG, "missing result!");
} }

View File

@ -127,9 +127,9 @@ public class SelectSignKeyIdActivity extends BaseActivity {
case REQUEST_CODE_CREATE_KEY: { case REQUEST_CODE_CREATE_KEY: {
if (resultCode == Activity.RESULT_OK) { if (resultCode == Activity.RESULT_OK) {
if (data != null && data.hasExtra(OperationResult.EXTRA_RESULT)) { if (data != null && data.hasExtra(OperationResult.EXTRA_RESULT)) {
// SaveKeyringResult result = data.getParcelableExtra(OperationResult.EXTRA_RESULT);
// TODO: select? // TODO: select?
// mSelectKeySpinner.setSelectedKeyId(result.mRingMasterKeyId); // EditKeyResult result = data.getParcelableExtra(OperationResult.EXTRA_RESULT);
// mSelectKeySpinner.setSelectedKeyId(result.mMasterKeyId);
} else { } else {
Log.e(Constants.TAG, "missing result!"); Log.e(Constants.TAG, "missing result!");
} }