From d6d8008a6720b618188fdb86538171529de2eb7b Mon Sep 17 00:00:00 2001 From: Robin Linden Date: Fri, 26 Mar 2021 19:33:43 +0100 Subject: [PATCH] Don't require storage permissions --- atox/src/main/AndroidManifest.xml | 2 -- atox/src/main/kotlin/ui/chat/ChatFragment.kt | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/atox/src/main/AndroidManifest.xml b/atox/src/main/AndroidManifest.xml index 4cb5e486e..1ee7d439e 100644 --- a/atox/src/main/AndroidManifest.xml +++ b/atox/src/main/AndroidManifest.xml @@ -8,7 +8,6 @@ - @@ -17,7 +16,6 @@ android:allowBackup="false" android:icon="@mipmap/launcher_icon" android:label="@string/app_name" - android:requestLegacyExternalStorage="true" android:roundIcon="@mipmap/launcher_icon_round" android:supportsRtl="true" android:theme="@style/AppTheme"> diff --git a/atox/src/main/kotlin/ui/chat/ChatFragment.kt b/atox/src/main/kotlin/ui/chat/ChatFragment.kt index a612456ce..6d0655f45 100644 --- a/atox/src/main/kotlin/ui/chat/ChatFragment.kt +++ b/atox/src/main/kotlin/ui/chat/ChatFragment.kt @@ -426,7 +426,7 @@ class ChatFragment : BaseFragment(FragmentChatBinding::infl mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC) mRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4) mRecorder.setAudioEncoder(MediaRecorder.OutputFormat.AMR_NB) - val rootPath = Environment.getExternalStorageDirectory().absolutePath + val rootPath = requireContext().filesDir.absolutePath val file = File("$rootPath/ATox") if (!file.exists()) { file.mkdirs()