Open
Description
Hi, there, I found NotePad v1.5.4 (downloaded from F-Droid) getting stuck if the permission is denied.
I seems that it is related to the dangerous permission android.permission.WRITE_EXTERNAL_STORAGE
and is triggered during the following call chain:
org.openintents.notepad.activity.SaveFileActivity.onCreate(android.os.Bundle)void
org.openintents.notepad.activity.SaveFileActivity.getFilenameFromNoteTitle(android.net.Uri)android.net.Uri
org.openintents.notepad.activity.SaveFileActivity.getSdCardPath()java.io.File
android.os.Environment.getExternalStorageDirectory()java.io.File
This call chain does not involves either permission checking (via checkSelfPermission) nor permission request (via requestPermissions) to the corresponding permission, which may produce unexpected consequence.
Reproduce bug
In fact, I found this lack of permission management causes the app getting stuck on my Samsung device, following the steps:
- enter the app and click "create note" at top-right
- type some texts
- click "save to sd card" on the top-right option menu
- select deny on the pop-up window (which requests a storage permission) and the app gets stuck
@friedger
Could you help me review this issue? If you need more information, I may make a video for this. Very thanks!
Metadata
Metadata
Assignees
Labels
No labels