android: simplify code

- No need to handle the activity result in the fragment, since we already do in
  the Activity
- Automagically ddispose the view when destroyed
This commit is contained in:
Saúl Ibarra Corretgé 2020-03-06 15:56:26 +01:00 committed by Saúl Ibarra Corretgé
parent 7fea8e2e6c
commit 65a8091e53
2 changed files with 6 additions and 16 deletions

View File

@ -57,22 +57,6 @@ public class JitsiMeetFragment extends Fragment {
return view;
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
JitsiMeetActivityDelegate.onActivityResult(
getActivity(), requestCode, resultCode, data);
}
@Override
public void onDestroyView() {
if (view != null) {
view.dispose();
view = null;
}
super.onDestroyView();
}
@Override
public void onDestroy() {
super.onDestroy();

View File

@ -201,4 +201,10 @@ public class JitsiMeetView extends BaseReactView<JitsiMeetViewListener>
protected void onExternalAPIEvent(String name, ReadableMap data) {
onExternalAPIEvent(LISTENER_METHODS, name, data);
}
@Override
protected void onDetachedFromWindow() {
dispose();
super.onDetachedFromWindow();
}
}