summaryrefslogtreecommitdiff
path: root/main/src
diff options
context:
space:
mode:
Diffstat (limited to 'main/src')
-rw-r--r--main/src/main/java/de/blinkt/openvpn/activities/ConfigConverter.java15
1 files changed, 12 insertions, 3 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/activities/ConfigConverter.java b/main/src/main/java/de/blinkt/openvpn/activities/ConfigConverter.java
index 462e7ee0..050555c6 100644
--- a/main/src/main/java/de/blinkt/openvpn/activities/ConfigConverter.java
+++ b/main/src/main/java/de/blinkt/openvpn/activities/ConfigConverter.java
@@ -425,12 +425,19 @@ public class ConfigConverter extends BaseActivity implements FileSelectCallback,
if (foundfile == null && filename != null && !filename.equals("")) {
log(R.string.import_could_not_open, filename);
}
-
- addFileSelectDialog(fileType);
+ fileSelectMap.put(fileType, null);
return foundfile;
}
+ private void addMissingFileDialogs()
+ {
+ for (Map.Entry<Utils.FileType, FileSelectLayout> item: fileSelectMap.entrySet()) {
+ if (item.getValue()==null)
+ addFileSelectDialog(item.getKey());
+ }
+ }
+
private void addFileSelectDialog(Utils.FileType type) {
Pair<Integer, String> fileDialogInfo = getFileDialogInfo(type);
@@ -586,7 +593,6 @@ public class ConfigConverter extends BaseActivity implements FileSelectCallback,
mEmbeddedPwFile = embedFile(cp.getAuthUserPassFile(), Utils.FileType.USERPW_FILE, false);
}
- updateFileSelectDialogs();
}
private void updateFileSelectDialogs() {
@@ -737,6 +743,9 @@ public class ConfigConverter extends BaseActivity implements FileSelectCallback,
@Override
protected void onPostExecute(Integer errorCode) {
mLogLayout.removeView(mProgress);
+ addMissingFileDialogs();
+ updateFileSelectDialogs();
+
if (errorCode == 0) {
displayWarnings();
mResult.mName = getUniqueProfileName(possibleName);