Skip to content

Commit

Permalink
Call super.onRequestPermissionsResult in ReactActivity (#42478)
Browse files Browse the repository at this point in the history
Summary:
This change allows activities to handle onRequestPermissionsResult callbacks (eg: registerForActivityResult)

Fixes #42403

[Android][Changed] - Call super.onRequestPermissionsResult in ReactActivity's onRequestPermissionsResult()

Pull Request resolved: #42478

Test Plan:
**Without super.onRequestPermissionsResult() call**

![before](https://github.com/facebook/react-native/assets/8672580/553ff597-c077-4831-a4d3-51846a253536)

**With super.onRequestPermissionsResult() call**

![after](https://github.com/facebook/react-native/assets/8672580/c7d588d2-5846-4083-a02f-59b5f915442c)

Reviewed By: cipolleschi

Differential Revision: D52952198

Pulled By: cortinico

fbshipit-source-id: 53b5dac65f6b5409d87b5fe7f8be659d7b48f70d
  • Loading branch information
LimAlbert authored and lunaleaps committed Feb 16, 2024
1 parent c8e9836 commit 5de1d4f
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ public void requestPermissions(
@Override
public void onRequestPermissionsResult(
int requestCode, String[] permissions, int[] grantResults) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
mDelegate.onRequestPermissionsResult(requestCode, permissions, grantResults);
}

Expand Down

0 comments on commit 5de1d4f

Please sign in to comment.