Finish deprecation of legacy windows audio device module

This commit is contained in:
ayumi-signal 2024-04-22 14:14:59 -07:00 committed by GitHub
parent 3eb0e30a23
commit 4ae402eb7f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 1 additions and 59 deletions

View file

@ -1,18 +0,0 @@
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { makeEnumParser } from '../util/enum';
import OS from '../util/os/osMain';
export enum AudioDeviceModule {
Default = 'Default',
WindowsAdm2 = 'WindowsAdm2',
}
export const parseAudioDeviceModule = makeEnumParser(
AudioDeviceModule,
AudioDeviceModule.Default
);
export const getAudioDeviceModule = (): AudioDeviceModule =>
OS.isWindows() ? AudioDeviceModule.WindowsAdm2 : AudioDeviceModule.Default;

View file

@ -1,39 +0,0 @@
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { assert } from 'chai';
import * as sinon from 'sinon';
import {
AudioDeviceModule,
getAudioDeviceModule,
} from '../../calling/audioDeviceModule';
describe('audio device module', () => {
describe('getAudioDeviceModule', () => {
let sandbox: sinon.SinonSandbox;
beforeEach(() => {
sandbox = sinon.createSandbox();
});
afterEach(() => {
sandbox.restore();
});
it('returns ADM2 on Windows', () => {
sandbox.stub(process, 'platform').get(() => 'win32');
assert.strictEqual(getAudioDeviceModule(), AudioDeviceModule.WindowsAdm2);
});
it('returns the default module on macOS', () => {
sandbox.stub(process, 'platform').get(() => 'darwin');
assert.strictEqual(getAudioDeviceModule(), AudioDeviceModule.Default);
});
it('returns the default module on Linux', () => {
sandbox.stub(process, 'platform').get(() => 'linux');
assert.strictEqual(getAudioDeviceModule(), AudioDeviceModule.Default);
});
});
});

View file

@ -6,7 +6,6 @@ import type {
CustomColorsItemType,
DefaultConversationColorType,
} from './Colors';
import type { AudioDeviceModule } from '../calling/audioDeviceModule';
import type { PhoneNumberDiscoverability } from '../util/phoneNumberDiscoverability';
import type { PhoneNumberSharingMode } from '../util/phoneNumberSharingMode';
import type { RetryItemType } from '../util/retryPlaceholders';
@ -170,7 +169,7 @@ export type StorageAccessType = {
// Deprecated
'challenge:retry-message-ids': never;
nextSignedKeyRotationTime: number;
previousAudioDeviceModule: AudioDeviceModule;
previousAudioDeviceModule: never;
senderCertificateWithUuid: never;
signaling_key: never;
signedKeyRotationRejected: number;