Skip to content

Commit

Permalink
feat(android) disable ConnectionService by default
Browse files Browse the repository at this point in the history
Our app has had it disabled for quite a while, it makes sense the SDKs
do that too.

Fixes: #13800
  • Loading branch information
saghul committed Sep 23, 2023
1 parent f0cb33a commit b8a669a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
1 change: 0 additions & 1 deletion android/app/src/main/java/org/jitsi/meet/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
12 changes: 9 additions & 3 deletions react/features/app/components/App.native.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,21 @@ export class App extends AbstractApp<IProps> {
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));

Expand Down Expand Up @@ -163,8 +171,6 @@ export class App extends AbstractApp<IProps> {
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 }));
}
Expand Down

0 comments on commit b8a669a

Please sign in to comment.