diff options
Diffstat (limited to 'app/src/main/java/com/wireguard/android/preference')
-rw-r--r-- | app/src/main/java/com/wireguard/android/preference/LogExporterPreference.java | 2 | ||||
-rw-r--r-- | app/src/main/java/com/wireguard/android/preference/ZipExporterPreference.java | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/src/main/java/com/wireguard/android/preference/LogExporterPreference.java b/app/src/main/java/com/wireguard/android/preference/LogExporterPreference.java index 5babb9ac..3836f9ac 100644 --- a/app/src/main/java/com/wireguard/android/preference/LogExporterPreference.java +++ b/app/src/main/java/com/wireguard/android/preference/LogExporterPreference.java @@ -45,7 +45,7 @@ public class LogExporterPreference extends Preference { final File file = new File(path, "wireguard-log.txt"); if (!path.isDirectory() && !path.mkdirs()) throw new IOException( - getContext().getResources().getString(R.string.create_output_dir_error)); + getContext().getString(R.string.create_output_dir_error)); /* We would like to simply run `builder.redirectOutput(file);`, but this is API 26. * Instead we have to do this dance, since logcat appends. diff --git a/app/src/main/java/com/wireguard/android/preference/ZipExporterPreference.java b/app/src/main/java/com/wireguard/android/preference/ZipExporterPreference.java index 9aa48d0a..f5385a2b 100644 --- a/app/src/main/java/com/wireguard/android/preference/ZipExporterPreference.java +++ b/app/src/main/java/com/wireguard/android/preference/ZipExporterPreference.java @@ -56,7 +56,7 @@ public class ZipExporterPreference extends Preference { futureConfigs.add(tunnel.getConfigAsync().toCompletableFuture()); if (futureConfigs.isEmpty()) { exportZipComplete(null, new IllegalArgumentException( - getContext().getResources().getString(R.string.no_tunnels_error))); + getContext().getString(R.string.no_tunnels_error))); return; } CompletableFuture.allOf(futureConfigs.toArray(new CompletableFuture[futureConfigs.size()])) @@ -67,7 +67,7 @@ public class ZipExporterPreference extends Preference { final File file = new File(path, "wireguard-export.zip"); if (!path.isDirectory() && !path.mkdirs()) throw new IOException( - getContext().getResources().getString(R.string.create_output_dir_error)); + getContext().getString(R.string.create_output_dir_error)); try (ZipOutputStream zip = new ZipOutputStream(new FileOutputStream(file))) { for (int i = 0; i < futureConfigs.size(); ++i) { zip.putNextEntry(new ZipEntry(tunnels.get(i).getName() + ".conf")); |