aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain/src/main
diff options
context:
space:
mode:
authorAdithya Abraham Philip <adithyaphilip@gmail.com>2015-06-11 05:42:10 +0530
committerAdithya Abraham Philip <adithyaphilip@gmail.com>2015-07-03 20:46:15 +0530
commit389fd7d46dcf9e2496fddfd785665a7381ecfca5 (patch)
tree74e4ab6bd6356b9bd82c48dbdeab5a6047760707 /OpenKeychain/src/main
parent79fc0f97eafd6a70bd40bb8cddd50de52ef84f7c (diff)
downloadopen-keychain-389fd7d46dcf9e2496fddfd785665a7381ecfca5.tar.gz
open-keychain-389fd7d46dcf9e2496fddfd785665a7381ecfca5.tar.bz2
open-keychain-389fd7d46dcf9e2496fddfd785665a7381ecfca5.zip
modify ImportKeysActivity to match new pattern
Diffstat (limited to 'OpenKeychain/src/main')
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java22
1 files changed, 4 insertions, 18 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java
index b41ca58b4..4b6af6072 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java
@@ -357,30 +357,16 @@ public class ImportKeysActivity extends BaseNfcActivity
if (loaderState instanceof ImportKeysListFragment.CloudLoaderState) {
// do the tor check
// this handle will set tor to be ignored whenever a message is received
- Handler ignoreTorHandler = new Handler() {
+ Runnable ignoreTor = new Runnable() {
@Override
- public void handleMessage(Message msg) {
+ public void run() {
// disables Tor until Activity is recreated
mProxyPrefs = new Preferences.ProxyPrefs(false, false, null, -1, null);
mListFragment.loadNew(loaderState, mProxyPrefs.parcelableProxy);
}
};
-
- if(mProxyPrefs.torEnabled && !OrbotHelper.isOrbotInstalled(this)) {
-
- OrbotHelper.getInstallDialogFragmentWithThirdButton(
- new Messenger(ignoreTorHandler),
- R.string.orbot_install_dialog_ignore_tor
- ).show(getSupportFragmentManager(), "orbotInstallDialog");
-
- return;
- }
-
- if(mProxyPrefs.torEnabled && !OrbotHelper.isOrbotRunning()) {
- OrbotHelper.getOrbotStartDialogFragment(new Messenger(ignoreTorHandler),
- R.string.orbot_install_dialog_ignore_tor)
- .show(getSupportFragmentManager(), "orbotStartDialog");
- return;
+ if (OrbotHelper.isOrbotInRequiredState(R.string.orbot_ignore_tor, ignoreTor, mProxyPrefs, this)) {
+ mListFragment.loadNew(loaderState, mProxyPrefs.parcelableProxy);
}
}