mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-12-23 15:38:50 -05:00
Merge remote-tracking branch 'origin/master' into v/eventbus
This commit is contained in:
commit
9b6416943b
@ -263,7 +263,7 @@ public class ImportKeysActivity extends BaseNfcActivity {
|
||||
// However, if we're being restored from a previous state,
|
||||
// then we don't need to do anything and should return or else
|
||||
// we could end up with overlapping fragments.
|
||||
if (savedInstanceState != null) {
|
||||
if (mListFragment != null) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -283,7 +283,7 @@ public class ImportKeysActivity extends BaseNfcActivity {
|
||||
// However, if we're being restored from a previous state,
|
||||
// then we don't need to do anything and should return or else
|
||||
// we could end up with overlapping fragments.
|
||||
if (savedInstanceState != null) {
|
||||
if (mTopFragment != null) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -314,7 +314,7 @@ public class ImportKeysActivity extends BaseNfcActivity {
|
||||
// However, if we're being restored from a previous state,
|
||||
// then we don't need to do anything and should return or else
|
||||
// we could end up with overlapping fragments.
|
||||
if (savedInstanceState != null) {
|
||||
if (mTopFragment != null) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,7 @@ import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.support.v4.app.FragmentManager.OnBackStackChangedListener;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.view.View;
|
||||
@ -42,7 +43,7 @@ import org.sufficientlysecure.keychain.ui.base.BaseNfcActivity;
|
||||
import org.sufficientlysecure.keychain.util.FabContainer;
|
||||
import org.sufficientlysecure.keychain.util.Preferences;
|
||||
|
||||
public class MainActivity extends BaseNfcActivity implements FabContainer {
|
||||
public class MainActivity extends BaseNfcActivity implements FabContainer, OnBackStackChangedListener {
|
||||
|
||||
private static final int ID_KEYS = 1;
|
||||
private static final int ID_ENCRYPT_DECRYPT = 2;
|
||||
@ -121,6 +122,8 @@ public class MainActivity extends BaseNfcActivity implements FabContainer {
|
||||
return;
|
||||
}
|
||||
|
||||
getSupportFragmentManager().addOnBackStackChangedListener(this);
|
||||
|
||||
Intent data = getIntent();
|
||||
// If we got an EXTRA_RESULT in the intent, show the notification
|
||||
if (data != null && data.hasExtra(OperationResult.EXTRA_RESULT)) {
|
||||
@ -206,4 +209,25 @@ public class MainActivity extends BaseNfcActivity implements FabContainer {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onBackStackChanged() {
|
||||
FragmentManager fragmentManager = getSupportFragmentManager();
|
||||
if (fragmentManager == null) {
|
||||
return;
|
||||
}
|
||||
Fragment frag = fragmentManager.findFragmentById(R.id.main_fragment_container);
|
||||
if (frag == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
// make sure the selected icon is the one shown at this point
|
||||
if (frag instanceof KeyListFragment) {
|
||||
mDrawerResult.setSelection(mDrawerResult.getPositionFromIdentifier(ID_KEYS), false);
|
||||
} else if (frag instanceof EncryptDecryptOverviewFragment) {
|
||||
mDrawerResult.setSelection(mDrawerResult.getPositionFromIdentifier(ID_ENCRYPT_DECRYPT), false);
|
||||
} else if (frag instanceof AppsListFragment) {
|
||||
mDrawerResult.setSelection(mDrawerResult.getPositionFromIdentifier(ID_APPS), false);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -52,7 +52,10 @@ However, scanning a QR code, receiving a key via NFC, or exchanging keys via Saf
|
||||
## Can I mark public keys as trusted without certifying them with my own key?
|
||||
|
||||
No. You can, however, simply create a new key just for certification, which will essentially be the same thing.
|
||||
|
||||
|
||||
## I see no suitable option in the app selection menu when trying to open a local file, what's wrong?
|
||||
|
||||
You probably don't have any stand-alone file managers installed, like [OI File Manager](https://f-droid.org/repository/browse/?fdid=org.openintents.filemanager) or [Amaze](https://f-droid.org/repository/browse/?fdid=com.amaze.filemanager). OpenKeychain needs one in order to select files from local storage or SD card, such as for importing keys or encrypting/decrypting files.
|
||||
|
||||
# Avanced Questions
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user