Skip to content
This repository was archived by the owner on Feb 4, 2024. It is now read-only.
This repository was archived by the owner on Feb 4, 2024. It is now read-only.

点击dialog外侧,dialog也会取消,且shouldShowRequestPermissionRationale=flase #346

@githubxiaoou

Description

@githubxiaoou

disposable = rxPermissions.requestEach(permission.CALL_PHONE, permission.CAMERA)
.subscribe(new Consumer() {
@OverRide
public void accept(Permission permission) throws Throwable {
if (permission.granted) {
Log.e(permission.name, "granted");
} else if (permission.shouldShowRequestPermissionRationale) {
Log.e(permission.name, "shouldShowRequestPermissionRationale");
} else {
Log.e(permission.name, "denied");
}
}
});

权限对话框是可取消的,点击dialog外侧取消后,走的也是else分支。这时候去过else里面写的是引导用户去设置页的逻辑,就不大合适。希望能够区分开:不再询问的禁止 和 点击dialog外侧取消。

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