Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
ref(android) remove unused code
Saúl Ibarra Corretgéb9e30f3c1bc5
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xmlindex c9ca0e0cd8..6b2157c026 100644--- a/android/app/src/main/AndroidManifest.xml+++ b/android/app/src/main/AndroidManifest.xml@@ -7,7 +7,6 @@android:extractNativeLibs="true"android:icon="@mipmap/ic_launcher"android:label="@string/app_name"- android:name=".MainApplication"android:networkSecurityConfig="@xml/network_security_config"android:theme="@style/AppTheme"><meta-datadiff --git a/android/app/src/main/java/org/jitsi/meet/MainApplication.java b/android/app/src/main/java/org/jitsi/meet/MainApplication.javadeleted file mode 100644index f79d1ffdd6..0000000000--- a/android/app/src/main/java/org/jitsi/meet/MainApplication.java+++ /dev/null@@ -1,47 +0,0 @@-/*- * Copyright @ 2022-present 8x8, Inc.- *- * Licensed under the Apache License, Version 2.0 (the "License");- * you may not use this file except in compliance with the License.- * You may obtain a copy of the License at- *- * http://www.apache.org/licenses/LICENSE-2.0- *- * Unless required by applicable law or agreed to in writing, software- * distributed under the License is distributed on an "AS IS" BASIS,- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.- * See the License for the specific language governing permissions and- * limitations under the License.- */--package org.jitsi.meet;--import android.app.Application;-import android.util.Log;--import com.facebook.react.ReactApplication;-import com.facebook.react.ReactNativeHost;--import org.jitsi.meet.sdk.JitsiReactNativeHost;--/**- * Application class for Jitsi Meet. The only reason why this exists is for Detox- * to believe our app is a "greenfield" app. SDK users need not use this.- */-public class MainApplication extends Application implements ReactApplication {- private final ReactNativeHost mReactNativeHost = new JitsiReactNativeHost(this);-- @Override- public ReactNativeHost getReactNativeHost() {- return mReactNativeHost;- }-- @Override- public void onCreate() {- super.onCreate();-- // Initialize RN- Log.d(this.getClass().getCanonicalName(), "app onCreate");- getReactNativeHost().getReactInstanceManager();- }-}diff --git a/android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetActivity.java b/android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetActivity.javaindex 119c6d8f44..05da4bc070 100644--- a/android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetActivity.java+++ b/android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetActivity.java@@ -16,6 +16,7 @@package org.jitsi.meet.sdk;+import android.annotation.SuppressLint;import android.app.Activity;import android.content.BroadcastReceiver;import android.content.Context;@@ -298,6 +299,7 @@ public class JitsiMeetActivity extends AppCompatActivityJitsiMeetActivityDelegate.requestPermissions(this, permissions, requestCode, listener);}+ @SuppressLint("MissingSuperCall")@Overridepublic void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {JitsiMeetActivityDelegate.onRequestPermissionsResult(requestCode, permissions, grantResults);diff --git a/android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiReactNativeHost.java b/android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiReactNativeHost.javadeleted file mode 100644index 2237151a17..0000000000--- a/android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiReactNativeHost.java+++ /dev/null@@ -1,41 +0,0 @@-package org.jitsi.meet.sdk;--import android.app.Application;--import com.facebook.react.ReactInstanceManager;-import com.facebook.react.ReactNativeHost;-import com.facebook.react.ReactPackage;--import java.util.List;--/**- * This is the minimal implementation of ReactNativeHost that will make things like the- * Detox testing framework believe we are a "greenfield" app.- *- * Generally speaking, apps using the SDK (other than the Jitsi Meet app itself) should not- * need to use this because the- */-public class JitsiReactNativeHost extends ReactNativeHost {- public JitsiReactNativeHost(Application application) {- super(application);- }-- @Override- public boolean getUseDeveloperSupport() {- // Unused since we override `createReactInstanceManager`.- return false;- }-- @Override- protected List<ReactPackage> getPackages() {- // Unused since we override `createReactInstanceManager`.- return null;- }-- @Override- protected ReactInstanceManager createReactInstanceManager() {- ReactInstanceManagerHolder.initReactInstanceManager(this.getApplication());-- return ReactInstanceManagerHolder.getReactInstanceManager();- }-}diff --git a/android/sdk/src/main/java/org/jitsi/meet/sdk/ReactInstanceManagerHolder.java b/android/sdk/src/main/java/org/jitsi/meet/sdk/ReactInstanceManagerHolder.javaindex cd943520c5..900c470a8b 100644--- a/android/sdk/src/main/java/org/jitsi/meet/sdk/ReactInstanceManagerHolder.java+++ b/android/sdk/src/main/java/org/jitsi/meet/sdk/ReactInstanceManagerHolder.java@@ -17,7 +17,6 @@package org.jitsi.meet.sdk;import android.app.Activity;-import android.app.Application;import android.util.Log;import androidx.annotation.Nullable;@@ -227,11 +226,9 @@ class ReactInstanceManagerHolder {* time. All {@code ReactRootView} instances will be tied to the one and* only {@code ReactInstanceManager}.*- * This method is only meant to be called when integrating with {@code JitsiReactNativeHost}.- *- * @param app {@code Application} current running Application.+ * @param activity {@code Activity} current running Activity.*/- static void initReactInstanceManager(Application app) {+ static void initReactInstanceManager(Activity activity) {if (reactInstanceManager != null) {return;}@@ -244,34 +241,7 @@ class ReactInstanceManagerHolder {options.videoDecoderFactory = new H264AndSoftwareVideoDecoderFactory(eglContext);options.videoEncoderFactory = new H264AndSoftwareVideoEncoderFactory(eglContext);- Log.d(TAG, "initializing RN with Application");-- reactInstanceManager- = ReactInstanceManager.builder()- .setApplication(app)- .setBundleAssetName("index.android.bundle")- .setJSMainModulePath("index.android")- .setJavaScriptExecutorFactory(getReactNativeJSFactory())- .addPackages(getReactNativePackages())- .setUseDeveloperSupport(BuildConfig.DEBUG)- .setInitialLifecycleState(LifecycleState.BEFORE_CREATE)- .build();- }-- /**- * Internal method to initialize the React Native instance manager. We- * create a single instance in order to load the JavaScript bundle a single- * time. All {@code ReactRootView} instances will be tied to the one and- * only {@code ReactInstanceManager}.- *- * @param activity {@code Activity} current running Activity.- */- static void initReactInstanceManager(Activity activity) {- if (reactInstanceManager != null) {- return;- }-- Log.d(ReactInstanceManagerHolder.class.getCanonicalName(), "initializing RN with Activity");+ Log.d(TAG, "initializing RN with Activity");reactInstanceManager= ReactInstanceManager.builder()