Skip to content

Commit

Permalink
Don't require storage permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
robinlinden committed May 18, 2021
1 parent d83b6c0 commit d6d8008
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions atox/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

<uses-feature android:name="android.hardware.camera" android:required="false"/>

Expand All @@ -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">
Expand Down
2 changes: 1 addition & 1 deletion atox/src/main/kotlin/ui/chat/ChatFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ class ChatFragment : BaseFragment<FragmentChatBinding>(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()
Expand Down

0 comments on commit d6d8008

Please sign in to comment.