Skip to content

Commit

Permalink
Merge pull request #47759 from m4gr3d/update_activity_result_behavior…
Browse files Browse the repository at this point in the history
…_3_3

[3.x] Fix issue causing the response callback to be invoked with the invalid `requestCode`
  • Loading branch information
akien-mga authored Apr 9, 2021
2 parents 5fe89e8 + dedeada commit 7a9c14e
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,30 +64,27 @@ public void onCreate(Bundle savedInstanceState) {

@Override
public void onNewIntent(Intent intent) {
super.onNewIntent(intent);
if (godotFragment != null) {
godotFragment.onNewIntent(intent);
} else {
super.onNewIntent(intent);
}
}

@CallSuper
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (godotFragment != null) {
godotFragment.onActivityResult(requestCode, resultCode, data);
} else {
super.onActivityResult(requestCode, resultCode, data);
}
}

@CallSuper
@Override
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
if (godotFragment != null) {
godotFragment.onRequestPermissionsResult(requestCode, permissions, grantResults);
} else {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
}
}

Expand Down

0 comments on commit 7a9c14e

Please sign in to comment.