bluelinelabs / Conductor

A small, yet full-featured framework that allows building View-based Android applications
Apache License 2.0
3.89k stars 342 forks source link

Unexpected behaviour of android.app.Fragment.requestPermissions #603

Open KirillMalafey opened 4 years ago

KirillMalafey commented 4 years ago

I use Conductor in my project and noticed probably unexpected behavior when working with runtime permissions. With androidx.Fragment or AppCompatActivity if you try to start another one request with the same id, previous request will be automatically cancelled by Android. But android.app.Fragment does not do this (at least on Android 7 and 8), it invokes onRequestPermissionsResult() method twice.

PR with mergating to AndroidX Fragments: https://github.com/bluelinelabs/Conductor/pull/602