From b8a669ad21d85bfce5588377289a9a9b61a8b109 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Fri, 22 Sep 2023 21:33:15 +0200 Subject: [PATCH] feat(android) disable ConnectionService by default Our app has had it disabled for quite a while, it makes sense the SDKs do that too. Fixes: https://github.com/jitsi/jitsi-meet/issues/13800 --- .../src/main/java/org/jitsi/meet/MainActivity.java | 1 - react/features/app/components/App.native.tsx | 12 +++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/android/app/src/main/java/org/jitsi/meet/MainActivity.java b/android/app/src/main/java/org/jitsi/meet/MainActivity.java index 883622fd8c37..2de18adcad27 100644 --- a/android/app/src/main/java/org/jitsi/meet/MainActivity.java +++ b/android/app/src/main/java/org/jitsi/meet/MainActivity.java @@ -152,7 +152,6 @@ private void setJitsiMeetConferenceDefaultOptions() { = new JitsiMeetConferenceOptions.Builder() .setServerURL(buildURL(defaultURL)) .setFeatureFlag("welcomepage.enabled", true) - .setFeatureFlag("call-integration.enabled", false) .setFeatureFlag("resolution", 360) .setFeatureFlag("server-url-change.enabled", !configurationByRestrictions) .build(); diff --git a/react/features/app/components/App.native.tsx b/react/features/app/components/App.native.tsx index f54d330f203b..20ad0aa40837 100644 --- a/react/features/app/components/App.native.tsx +++ b/react/features/app/components/App.native.tsx @@ -112,13 +112,21 @@ export class App extends AbstractApp { async _extraInit() { const { dispatch, getState } = this.state.store ?? {}; const { flags = {} } = this.props; + let callIntegrationEnabled = flags[CALL_INTEGRATION_ENABLED as keyof typeof flags]; // CallKit does not work on the simulator, make sure we disable it. if (Platform.OS === 'ios' && DeviceInfo.isEmulatorSync()) { - flags['call-integration.enabled'] = false; + flags[CALL_INTEGRATION_ENABLED] = false; + callIntegrationEnabled = false; logger.info('Disabling CallKit because this is a simulator'); } + // Disable Android ConnectionService by default. + if (Platform.OS === 'android' && typeof callIntegrationEnabled === 'undefined') { + flags[CALL_INTEGRATION_ENABLED] = false; + callIntegrationEnabled = false; + } + // We set these early enough so then we avoid any unnecessary re-renders. dispatch?.(updateFlags(flags)); @@ -163,8 +171,6 @@ export class App extends AbstractApp { dispatch?.(updateSettings(this.props.userInfo || {})); // Update settings with feature-flag. - const callIntegrationEnabled = flags[CALL_INTEGRATION_ENABLED as keyof typeof flags]; - if (typeof callIntegrationEnabled !== 'undefined') { dispatch?.(updateSettings({ disableCallIntegration: !callIntegrationEnabled })); }