Procházet zdrojové kódy

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
master
Saúl Ibarra Corretgé před 5 roky
rodič
revize
65a8091e53

+ 0
- 16
android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetFragment.java Zobrazit soubor

57
         return view;
57
         return view;
58
     }
58
     }
59
 
59
 
60
-    @Override
61
-    public void onActivityResult(int requestCode, int resultCode, Intent data) {
62
-        JitsiMeetActivityDelegate.onActivityResult(
63
-                getActivity(), requestCode, resultCode, data);
64
-    }
65
-
66
-    @Override
67
-    public void onDestroyView() {
68
-        if (view != null) {
69
-            view.dispose();
70
-            view = null;
71
-        }
72
-
73
-        super.onDestroyView();
74
-    }
75
-
76
     @Override
60
     @Override
77
     public void onDestroy() {
61
     public void onDestroy() {
78
         super.onDestroy();
62
         super.onDestroy();

+ 6
- 0
android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetView.java Zobrazit soubor

201
     protected void onExternalAPIEvent(String name, ReadableMap data) {
201
     protected void onExternalAPIEvent(String name, ReadableMap data) {
202
         onExternalAPIEvent(LISTENER_METHODS, name, data);
202
         onExternalAPIEvent(LISTENER_METHODS, name, data);
203
     }
203
     }
204
+
205
+    @Override
206
+    protected void onDetachedFromWindow() {
207
+        dispose();
208
+        super.onDetachedFromWindow();
209
+    }
204
 }
210
 }

Načítá se…
Zrušit
Uložit