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

[Bug]Activity重建以后无法再申请权限 #438

Closed
tankjj opened this issue Apr 16, 2019 · 3 comments
Closed

[Bug]Activity重建以后无法再申请权限 #438

tankjj opened this issue Apr 16, 2019 · 3 comments

Comments

@tankjj
Copy link

tankjj commented Apr 16, 2019

  1. 在MainActivity中申请权限;
  2. 在弹出系统的权限弹框的时候,旋转屏幕,这个时候MainActivity会重建
  3. 点击拒绝权限按钮
    这个时候,后面再申请权限,只会保存在RequestExecutor中的mQueue里面,RequestExecutor会一直处于waiting状态
@tankjj
Copy link
Author

tankjj commented Apr 16, 2019

我删除了RequestExecutor里面的 wait()/notify()机制,并且删除了synchronized部分,暂时可以测试通过,但是带来的问题是MainActivity一旦重建了,onGrant就不会继续执行了,请问这个有什么好办法解决吗?感觉这是个大坑呀

@xie2000
Copy link

xie2000 commented Apr 19, 2019

同问,有解决方法嘛?

Repository owner deleted a comment from tankjj Sep 26, 2019
@yanzhenjie yanzhenjie added the bug label Sep 26, 2019
@yanzhenjie yanzhenjie added enhancement and removed bug labels Oct 1, 2019
@yanzhenjie
Copy link
Owner

在minifest中为MainActivity添加这个即可解决:

android:configChanges="orientation"

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

No branches or pull requests

3 participants