Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App gets stuck if permission is revoked #43

Open
aper-project opened this issue Apr 28, 2021 · 0 comments
Open

App gets stuck if permission is revoked #43

aper-project opened this issue Apr 28, 2021 · 0 comments

Comments

@aper-project
Copy link

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:

  1. enter the app and click "create note" at top-right
  2. type some texts
  3. click "save to sd card" on the top-right option menu
  4. 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant