Skip to content

Revoking permission at MemeCreateActivity causes app crashed #227

@aper-project

Description

@aper-project

Hi, there, I've found a crash in MemeTastic v1.6.7(68), which is downloaded from F-Droid.

I seems that it is related to the dangerous permission android.permission.WRITE_EXTERNAL_STORAGE and is triggered during the following call chain:

net.gsantner.memetastic.activity.MemeCreateActivity.onCreate(android.os.Bundle)void
  net.gsantner.memetastic.activity.MemeCreateActivity.initMemeSettings(android.os.Bundle)boolean
    net.gsantner.memetastic.activity.MemeCreateActivity.extractBitmapFromIntent(android.content.Intent)android.graphics.Bitmap
      net.gsantner.opoc.util.ShareUtil.extractFileFromIntent(android.content.Intent)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 crash

In fact, I found this lack of permission management causes a crash on my Samsung device, following the steps:

  1. enter the app from the home screen and allow the permission request
  2. choose one meme item and enter the ``create meme activity''
  3. go to system setting and revoke the storage permission
  4. go back to the app and it crashes

@gsantner
Could you help me review this issue? If you need more information, I may make a video showing the crash. Very thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions