Mercurial > 510Connectbot
changeset 497:73fa7329dc87
updates for android10+
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Mon, 06 Jun 2022 13:01:45 -0700 |
parents | f698820bffdf |
children | 3feac274a27b |
files | app/src/main/AndroidManifest.xml app/src/main/java/com/five_ten_sg/connectbot/HostListActivity.java app/src/main/java/com/five_ten_sg/connectbot/PubkeyListActivity.java app/src/main/java/com/five_ten_sg/connectbot/transport/SSH.java app/src/main/java/com/five_ten_sg/connectbot/util/FileChooser.java |
diffstat | 5 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/app/src/main/AndroidManifest.xml Sun Jun 05 14:46:41 2022 -0700 +++ b/app/src/main/AndroidManifest.xml Mon Jun 06 13:01:45 2022 -0700 @@ -26,6 +26,7 @@ <uses-permission android:name="android.permission.FOREGROUND" /> <uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> <uses-permission android:name="android.permission.INTERNET" /> + <uses-permission android:name="android.permission.REORDER_TASKS"/> <uses-permission android:name="android.permission.VIBRATE" /> <uses-permission android:name="android.permission.WAKE_LOCK" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
--- a/app/src/main/java/com/five_ten_sg/connectbot/HostListActivity.java Sun Jun 05 14:46:41 2022 -0700 +++ b/app/src/main/java/com/five_ten_sg/connectbot/HostListActivity.java Mon Jun 06 13:01:45 2022 -0700 @@ -437,7 +437,7 @@ int[] c = hostdb.getGlobalDefaultColors(); int fg = c[0]; int bg = c[1]; - String fn = Environment.getExternalStorageDirectory().getAbsolutePath() + + String fn = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).getAbsolutePath() + File.separator + "deployment.connections"; BufferedReader reader = new BufferedReader(new FileReader(fn)); String line = null;
--- a/app/src/main/java/com/five_ten_sg/connectbot/PubkeyListActivity.java Sun Jun 05 14:46:41 2022 -0700 +++ b/app/src/main/java/com/five_ten_sg/connectbot/PubkeyListActivity.java Mon Jun 06 13:01:45 2022 -0700 @@ -543,7 +543,7 @@ errorString = "Error exporting public key"; } - final String sdcard = Environment.getExternalStorageDirectory().getAbsolutePath(); + final String sdcard = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).getAbsolutePath(); final EditText fileName = new EditText(PubkeyListActivity.this); fileName.setSingleLine();
--- a/app/src/main/java/com/five_ten_sg/connectbot/transport/SSH.java Sun Jun 05 14:46:41 2022 -0700 +++ b/app/src/main/java/com/five_ten_sg/connectbot/transport/SSH.java Mon Jun 06 13:01:45 2022 -0700 @@ -906,7 +906,7 @@ SCPClient client = new SCPClient(connection); if (localFolder == null || localFolder == "") - localFolder = Environment.getExternalStorageDirectory().getAbsolutePath(); + localFolder = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).getAbsolutePath(); File dir = new File(localFolder); dir.mkdirs();
--- a/app/src/main/java/com/five_ten_sg/connectbot/util/FileChooser.java Sun Jun 05 14:46:41 2022 -0700 +++ b/app/src/main/java/com/five_ten_sg/connectbot/util/FileChooser.java Mon Jun 06 13:01:45 2022 -0700 @@ -49,7 +49,7 @@ } public static void selectFile(Activity source, FileChooserCallback callback, int requestcode, String title) { - final File sdcard = Environment.getExternalStorageDirectory(); + final File sdcard = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS); if (title == null) title = source.getString(R.string.file_chooser_select_file); @@ -124,4 +124,4 @@ return file; } -} \ No newline at end of file +}