Skip to content

Commit 96ed119

Browse files
LimAlbertfacebook-github-bot
authored andcommitted
Call super.onRequestPermissionsResult in ReactActivity (#42478)
Summary: This change allows activities to handle onRequestPermissionsResult callbacks (eg: registerForActivityResult) Fixes #42403 ## Changelog: [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
1 parent 9003d08 commit 96ed119

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactActivity.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ public void requestPermissions(
114114
@Override
115115
public void onRequestPermissionsResult(
116116
int requestCode, @NotNull String[] permissions, @NotNull int[] grantResults) {
117+
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
117118
mDelegate.onRequestPermissionsResult(requestCode, permissions, grantResults);
118119
}
119120

0 commit comments

Comments
 (0)