Skip to content
This repository has been archived by the owner on Jul 2, 2021. It is now read-only.

Demo crashes when rotating. #14

Closed
greysonp opened this issue Nov 24, 2015 · 4 comments
Closed

Demo crashes when rotating. #14

greysonp opened this issue Nov 24, 2015 · 4 comments
Labels

Comments

@greysonp
Copy link

  1. Request a permission.
  2. While the rationale is showing, rotate the device (the dialog will be dismissed).
  3. Click the button request the permission again.
  4. App crashes.
1-23 17:17:32.121 20300-20300/com.karumi.dexter.sample E/AndroidRuntime: FATAL EXCEPTION: main
11-23 17:17:32.121 20300-20300/com.karumi.dexter.sample E/AndroidRuntime: Process: com.karumi.dexter.sample, PID: 20300
11-23 17:17:32.121 20300-20300/com.karumi.dexter.sample E/AndroidRuntime: java.lang.IllegalStateException: Only one permission request at a time. Currently handling permission: [android.permission.READ_CONTACTS]
11-23 17:17:32.121 20300-20300/com.karumi.dexter.sample E/AndroidRuntime:     at com.karumi.dexter.DexterInstance.checkPermission(DexterInstance.java:51)
11-23 17:17:32.121 20300-20300/com.karumi.dexter.sample E/AndroidRuntime:     at com.karumi.dexter.Dexter.checkPermission(Dexter.java:53)
11-23 17:17:32.121 20300-20300/com.karumi.dexter.sample E/AndroidRuntime:     at com.karumi.dexter.sample.SampleActivity.onContactsPermissionButtonClicked(SampleActivity.java:70)
11-23 17:17:32.121 20300-20300/com.karumi.dexter.sample E/AndroidRuntime:     at com.karumi.dexter.sample.SampleActivity$$ViewBinder$2.doClick(SampleActivity$$ViewBinder.java:34)
11-23 17:17:32.121 20300-20300/com.karumi.dexter.sample E/AndroidRuntime:     at butterknife.internal.DebouncingOnClickListener.onClick(DebouncingOnClickListener.java:22)
11-23 17:17:32.121 20300-20300/com.karumi.dexter.sample E/AndroidRuntime:     at android.view.View.performClick(View.java:5198)
11-23 17:17:32.121 20300-20300/com.karumi.dexter.sample E/AndroidRuntime:     at android.view.View$PerformClick.run(View.java:21147)
11-23 17:17:32.121 20300-20300/com.karumi.dexter.sample E/AndroidRuntime:     at android.os.Handler.handleCallback(Handler.java:739)
11-23 17:17:32.121 20300-20300/com.karumi.dexter.sample E/AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:95)
11-23 17:17:32.121 20300-20300/com.karumi.dexter.sample E/AndroidRuntime:     at android.os.Looper.loop(Looper.java:148)
11-23 17:17:32.121 20300-20300/com.karumi.dexter.sample E/AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:5417)
11-23 17:17:32.121 20300-20300/com.karumi.dexter.sample E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Native Method)
11-23 17:17:32.121 20300-20300/com.karumi.dexter.sample E/AndroidRuntime:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
11-23 17:17:32.121 20300-20300/com.karumi.dexter.sample E/AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
@pedrovgs pedrovgs added the bug label Nov 24, 2015
@pedrovgs
Copy link
Contributor

Thanks @greysonp! We are working on it :)

@Serchinastico
Copy link
Contributor

We are fixing it the lazy way (it's just a sample project after all) by forcing the activity in portrait mode. Thanks for reporting!

@pedrovgs
Copy link
Contributor

If I'm not wrong, the library user should handle this behaviour by himself. We can't add code to the library to fix this bug, just fix the sample as we are doing.

@Serchinastico
Copy link
Contributor

Fixed in 2.0.0

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

No branches or pull requests

3 participants