mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-27 11:12:15 -05:00
better onActivityResult handling for qr code import, remove unimplemented import button
This commit is contained in:
parent
f3638d5b44
commit
1c5acc9721
@ -37,13 +37,13 @@
|
||||
bootstrapbutton:bb_icon_left="fa-download"
|
||||
bootstrapbutton:bb_type="info" />
|
||||
|
||||
<com.beardedhen.androidbootstrap.BootstrapButton
|
||||
android:id="@+id/import_sign_and_upload"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:padding="4dp"
|
||||
android:text="@string/import_sign_and_upload"
|
||||
bootstrapbutton:bb_type="info" />
|
||||
<!-- <com.beardedhen.androidbootstrap.BootstrapButton -->
|
||||
<!-- android:id="@+id/import_sign_and_upload" -->
|
||||
<!-- android:layout_width="match_parent" -->
|
||||
<!-- android:layout_height="60dp" -->
|
||||
<!-- android:padding="4dp" -->
|
||||
<!-- android:text="@string/import_sign_and_upload" -->
|
||||
<!-- bootstrapbutton:bb_type="info" /> -->
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
|
@ -79,7 +79,8 @@ public class ImportKeysActivity extends DrawerActivity implements OnNavigationLi
|
||||
Fragment mCurrentFragment;
|
||||
|
||||
BootstrapButton mImportButton;
|
||||
BootstrapButton mImportSignUploadButton;
|
||||
|
||||
// BootstrapButton mImportSignUploadButton;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@ -94,13 +95,13 @@ public class ImportKeysActivity extends DrawerActivity implements OnNavigationLi
|
||||
importKeys();
|
||||
}
|
||||
});
|
||||
mImportSignUploadButton = (BootstrapButton) findViewById(R.id.import_sign_and_upload);
|
||||
mImportSignUploadButton.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
signAndUploadOnClick();
|
||||
}
|
||||
});
|
||||
// mImportSignUploadButton = (BootstrapButton) findViewById(R.id.import_sign_and_upload);
|
||||
// mImportSignUploadButton.setOnClickListener(new OnClickListener() {
|
||||
// @Override
|
||||
// public void onClick(View v) {
|
||||
// signAndUploadOnClick();
|
||||
// }
|
||||
// });
|
||||
|
||||
getSupportActionBar().setDisplayShowTitleEnabled(false);
|
||||
|
||||
@ -300,15 +301,6 @@ public class ImportKeysActivity extends DrawerActivity implements OnNavigationLi
|
||||
// }
|
||||
// }
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
// required for qr code scanning
|
||||
if (mCurrentFragment != null) {
|
||||
mCurrentFragment.onActivityResult(requestCode, resultCode, data);
|
||||
}
|
||||
// super.onActivityResult(requestCode, resultCode, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Import keys with mImportData
|
||||
*/
|
||||
@ -419,14 +411,14 @@ public class ImportKeysActivity extends DrawerActivity implements OnNavigationLi
|
||||
importKeys();
|
||||
}
|
||||
|
||||
public void signAndUploadOnClick() {
|
||||
// first, import!
|
||||
// importOnClick(view);
|
||||
|
||||
// TODO: implement sign and upload!
|
||||
Toast.makeText(ImportKeysActivity.this, "Not implemented right now!", Toast.LENGTH_SHORT)
|
||||
.show();
|
||||
}
|
||||
// public void signAndUploadOnClick() {
|
||||
// // first, import!
|
||||
// // importOnClick(view);
|
||||
//
|
||||
// // TODO: implement sign and upload!
|
||||
// Toast.makeText(ImportKeysActivity.this, "Not implemented right now!", Toast.LENGTH_SHORT)
|
||||
// .show();
|
||||
// }
|
||||
|
||||
/**
|
||||
* NFC
|
||||
|
@ -91,7 +91,7 @@ public class ImportKeysQrCodeFragment extends Fragment {
|
||||
|
||||
@Override
|
||||
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
switch (requestCode) {
|
||||
switch (requestCode & 0xFFFF) {
|
||||
case IntentIntegrator.REQUEST_CODE: {
|
||||
IntentResult scanResult = IntentIntegrator.parseActivityResult(requestCode, resultCode,
|
||||
data);
|
||||
|
Loading…
Reference in New Issue
Block a user