You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 4, 2024. It is now read-only.
Note: It is possible that the permissions request interaction with the user is interrupted. In this case you will receive empty permissions and results arrays which should be treated as a cancellation.
Current handling in RxPermissionFragment#onRequestPermissionsResult:
void onRequestPermissionsResult(String permissions[], int[] grantResults, boolean[] shouldShowRequestPermissionRationale) {
for (int i = 0, size = permissions.length; i < size; i++) {
//...
mSubjects.remove(permissions[i]);
//...
}
}
Problem:
Requested permission list is not cleared when permission flow is interrupted.
Solution:
If permissions[] is empty, then mSubjects should be completed unsuccessfully and cleared.
Related:
#218 tries to retry immediately in this case. This is wrong because the interruption happens after onStop.
The text was updated successfully, but these errors were encountered:
Javadoc on
Fragment#onRequestPermissionsResult
:Current handling in
RxPermissionFragment#onRequestPermissionsResult
:Problem:
Requested permission list is not cleared when permission flow is interrupted.
Solution:
If
permissions[]
is empty, thenmSubjects
should be completed unsuccessfully and cleared.Related:
#218 tries to retry immediately in this case. This is wrong because the interruption happens after
onStop
.The text was updated successfully, but these errors were encountered: