Mercurial > 510Connectbot
changeset 533:2b41d177f96b
add missing WRITE_EXTERNAL_STORAGE for android 10
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Fri, 10 Jan 2025 13:30:28 -0700 |
parents | 4ac13a6984d2 |
children | b68399b185ea |
files | app/src/main/AndroidManifest.xml app/src/main/java/com/five_ten_sg/connectbot/HostListActivity.java |
diffstat | 2 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/app/src/main/AndroidManifest.xml Tue Dec 31 13:58:46 2024 -0700 +++ b/app/src/main/AndroidManifest.xml Fri Jan 10 13:30:28 2025 -0700 @@ -17,8 +17,8 @@ --> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.five_ten_sg.connectbot" - android:versionName="1.9.5-0" - android:versionCode="1950" + android:versionName="1.9.5-1" + android:versionCode="1951" android:installLocation="auto"> <queries> <package android:name="com.five_ten_sg.connectbot.monitor" /> @@ -34,7 +34,7 @@ <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" android:maxSdkVersion="28" /> + <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="29" /> <permission android:name="org.openintents.ssh.permission.ACCESS_SSH_AGENT"
--- a/app/src/main/java/com/five_ten_sg/connectbot/HostListActivity.java Tue Dec 31 13:58:46 2024 -0700 +++ b/app/src/main/java/com/five_ten_sg/connectbot/HostListActivity.java Fri Jan 10 13:30:28 2025 -0700 @@ -186,13 +186,16 @@ // ask for permissions, must match AndroidManifest.xml if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { + // >= api 23 android 6 get_permissions(new String[] {Manifest.permission.ACCESS_NETWORK_STATE, Manifest.permission.INTERNET, Manifest.permission.WAKE_LOCK}); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { + // >= api 30 android 11 get_storage_manager(); } else { + // <= api 29 android 10 get_permissions(new String[] {Manifest.permission.WRITE_EXTERNAL_STORAGE}); } }