未验证 提交 d96c23f4 编写于 作者: O openharmony_ci 提交者: Gitee

!7040 delete audio system api

Merge pull request !7040 from wangtao/mas_sys
...@@ -122,7 +122,7 @@ describe('audioCapturerChange', function () { ...@@ -122,7 +122,7 @@ describe('audioCapturerChange', function () {
console.info(`${Tag} : C: ${i} ${AudioCapturerChangeInfoArray[i].deviceDescriptors[j].channelCounts[0]}`); console.info(`${Tag} : C: ${i} ${AudioCapturerChangeInfoArray[i].deviceDescriptors[j].channelCounts[0]}`);
console.info(`${Tag} : CM: ${i} ${AudioCapturerChangeInfoArray[i].deviceDescriptors[j].channelMasks}`); console.info(`${Tag} : CM: ${i} ${AudioCapturerChangeInfoArray[i].deviceDescriptors[j].channelMasks}`);
} }
if (AudioCapturerChangeInfoArray[i].capturerState == 1 && devDescriptor != null) { if (devDescriptor != null) {
audioStreamManager.off('audioCapturerChange'); audioStreamManager.off('audioCapturerChange');
await audioCap.release(); await audioCap.release();
expect(true).assertTrue(); expect(true).assertTrue();
...@@ -184,7 +184,7 @@ describe('audioCapturerChange', function () { ...@@ -184,7 +184,7 @@ describe('audioCapturerChange', function () {
for (let j = 0; j < AudioCapturerChangeInfoArray[i].deviceDescriptors.length; j++) { for (let j = 0; j < AudioCapturerChangeInfoArray[i].deviceDescriptors.length; j++) {
console.info(`${Tag}:deviceDescriptors ${i} : ${JSON.stringify(AudioCapturerChangeInfoArray[i].deviceDescriptors[j])}`); console.info(`${Tag}:deviceDescriptors ${i} : ${JSON.stringify(AudioCapturerChangeInfoArray[i].deviceDescriptors[j])}`);
} }
if (AudioCapturerChangeInfoArray[i].capturerState == 2 && devDescriptor != null) { if (devDescriptor != null) {
resultFlag = true; resultFlag = true;
console.info(`${Tag}: [CAPTURER-CHANGE-ON-002] ResultFlag for element ${i} is: ${resultFlag}`); console.info(`${Tag}: [CAPTURER-CHANGE-ON-002] ResultFlag for element ${i} is: ${resultFlag}`);
audioStreamManagerCB.off('audioCapturerChange'); audioStreamManagerCB.off('audioCapturerChange');
...@@ -260,7 +260,7 @@ describe('audioCapturerChange', function () { ...@@ -260,7 +260,7 @@ describe('audioCapturerChange', function () {
for (let j = 0; j < AudioCapturerChangeInfoArray[i].deviceDescriptors.length; j++) { for (let j = 0; j < AudioCapturerChangeInfoArray[i].deviceDescriptors.length; j++) {
console.info(`${Tag}:deviceDescriptors ${i} : ${JSON.stringify(AudioCapturerChangeInfoArray[i].deviceDescriptors[j])}`); console.info(`${Tag}:deviceDescriptors ${i} : ${JSON.stringify(AudioCapturerChangeInfoArray[i].deviceDescriptors[j])}`);
} }
if (AudioCapturerChangeInfoArray[i].capturerState == 3 && devDescriptor != null) { if (devDescriptor != null) {
resultFlag = true; resultFlag = true;
console.info(`${Tag}: [CAPTURER-CHANGE-ON-003] ResultFlag for element ${i} is: ${resultFlag}`); console.info(`${Tag}: [CAPTURER-CHANGE-ON-003] ResultFlag for element ${i} is: ${resultFlag}`);
} }
...@@ -350,7 +350,7 @@ describe('audioCapturerChange', function () { ...@@ -350,7 +350,7 @@ describe('audioCapturerChange', function () {
for (let j = 0; j < AudioCapturerChangeInfoArray[i].deviceDescriptors.length; j++) { for (let j = 0; j < AudioCapturerChangeInfoArray[i].deviceDescriptors.length; j++) {
console.info(`${Tag}:deviceDescriptors ${i} : ${JSON.stringify(AudioCapturerChangeInfoArray[i].deviceDescriptors[j])}`); console.info(`${Tag}:deviceDescriptors ${i} : ${JSON.stringify(AudioCapturerChangeInfoArray[i].deviceDescriptors[j])}`);
} }
if (AudioCapturerChangeInfoArray[i].capturerState == 4 && devDescriptor != null) { if (devDescriptor != null) {
resultFlag = true; resultFlag = true;
console.info(`${Tag}: [CAPTURER-CHANGE-ON-004] ResultFlag for element ${i} is: ${resultFlag}`); console.info(`${Tag}: [CAPTURER-CHANGE-ON-004] ResultFlag for element ${i} is: ${resultFlag}`);
} }
...@@ -994,7 +994,7 @@ describe('audioCapturerChange', function () { ...@@ -994,7 +994,7 @@ describe('audioCapturerChange', function () {
for (let j = 0; j < AudioCapturerChangeInfoArray[i].deviceDescriptors.length; j++) { for (let j = 0; j < AudioCapturerChangeInfoArray[i].deviceDescriptors.length; j++) {
console.info(`${Tag}:deviceDescriptors ${i} : ${JSON.stringify(AudioCapturerChangeInfoArray[i].deviceDescriptors[j])}`); console.info(`${Tag}:deviceDescriptors ${i} : ${JSON.stringify(AudioCapturerChangeInfoArray[i].deviceDescriptors[j])}`);
} }
if (AudioCapturerChangeInfoArray[i].capturerState == 1 && devDescriptor != null) { if (devDescriptor != null) {
audioStreamManagerCB.off('audioCapturerChange'); audioStreamManagerCB.off('audioCapturerChange');
console.info(`audioCapturerChange off Success `); console.info(`audioCapturerChange off Success `);
expect(true).assertTrue(); expect(true).assertTrue();
...@@ -1084,7 +1084,7 @@ describe('audioCapturerChange', function () { ...@@ -1084,7 +1084,7 @@ describe('audioCapturerChange', function () {
for (let j = 0; j < AudioCapturerChangeInfoArray[i].deviceDescriptors.length; j++) { for (let j = 0; j < AudioCapturerChangeInfoArray[i].deviceDescriptors.length; j++) {
console.info(`${Tag}:deviceDescriptors ${i} : ${JSON.stringify(AudioCapturerChangeInfoArray[i].deviceDescriptors[j])}`); console.info(`${Tag}:deviceDescriptors ${i} : ${JSON.stringify(AudioCapturerChangeInfoArray[i].deviceDescriptors[j])}`);
} }
if (AudioCapturerChangeInfoArray[i].capturerState == 2 && devDescriptor != null) { if (devDescriptor != null) {
audioStreamManager.off('audioCapturerChange'); audioStreamManager.off('audioCapturerChange');
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
...@@ -1179,7 +1179,7 @@ describe('audioCapturerChange', function () { ...@@ -1179,7 +1179,7 @@ describe('audioCapturerChange', function () {
for (let j = 0; j < AudioCapturerChangeInfoArray[i].deviceDescriptors.length; j++) { for (let j = 0; j < AudioCapturerChangeInfoArray[i].deviceDescriptors.length; j++) {
console.info(`${Tag}:deviceDescriptors ${i} : ${JSON.stringify(AudioCapturerChangeInfoArray[i].deviceDescriptors[j])}`); console.info(`${Tag}:deviceDescriptors ${i} : ${JSON.stringify(AudioCapturerChangeInfoArray[i].deviceDescriptors[j])}`);
} }
if (AudioCapturerChangeInfoArray[i].capturerState == 3 && devDescriptor != null) { if (devDescriptor != null) {
audioStreamManager.off('audioCapturerChange'); audioStreamManager.off('audioCapturerChange');
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
...@@ -1348,7 +1348,7 @@ describe('audioCapturerChange', function () { ...@@ -1348,7 +1348,7 @@ describe('audioCapturerChange', function () {
for (let j = 0; j < AudioCapturerChangeInfoArray[i].deviceDescriptors.length; j++) { for (let j = 0; j < AudioCapturerChangeInfoArray[i].deviceDescriptors.length; j++) {
console.info(`${Tag}:deviceDescriptors ${i} : ${JSON.stringify(AudioCapturerChangeInfoArray[i].deviceDescriptors[j])}`); console.info(`${Tag}:deviceDescriptors ${i} : ${JSON.stringify(AudioCapturerChangeInfoArray[i].deviceDescriptors[j])}`);
} }
if (AudioCapturerChangeInfoArray[i].capturerState == 1 && devDescriptor != null) { if (devDescriptor != null) {
audioStreamManager.off('audioCapturerChange'); audioStreamManager.off('audioCapturerChange');
await audioCap.release().then(function () { await audioCap.release().then(function () {
console.info(`${Tag}: Capturer release : SUCCESS`); console.info(`${Tag}: Capturer release : SUCCESS`);
...@@ -1439,7 +1439,7 @@ describe('audioCapturerChange', function () { ...@@ -1439,7 +1439,7 @@ describe('audioCapturerChange', function () {
for (let j = 0; j < AudioCapturerChangeInfoArray[i].deviceDescriptors.length; j++) { for (let j = 0; j < AudioCapturerChangeInfoArray[i].deviceDescriptors.length; j++) {
console.info(`${Tag}:deviceDescriptors ${i} : ${JSON.stringify(AudioCapturerChangeInfoArray[i].deviceDescriptors[j])}`); console.info(`${Tag}:deviceDescriptors ${i} : ${JSON.stringify(AudioCapturerChangeInfoArray[i].deviceDescriptors[j])}`);
} }
if (AudioCapturerChangeInfoArray[i].capturerState == 2 && devDescriptor != null) { if (devDescriptor != null) {
audioStreamManagerCB.off('audioCapturerChange'); audioStreamManagerCB.off('audioCapturerChange');
await audioCap.release().then(function () { await audioCap.release().then(function () {
console.info(`${Tag}: Capturer release : SUCCESS`); console.info(`${Tag}: Capturer release : SUCCESS`);
...@@ -1537,7 +1537,7 @@ describe('audioCapturerChange', function () { ...@@ -1537,7 +1537,7 @@ describe('audioCapturerChange', function () {
for (let j = 0; j < AudioCapturerChangeInfoArray[i].deviceDescriptors.length; j++) { for (let j = 0; j < AudioCapturerChangeInfoArray[i].deviceDescriptors.length; j++) {
console.info(`${Tag}:deviceDescriptors ${i} : ${JSON.stringify(AudioCapturerChangeInfoArray[i].deviceDescriptors[j])}`); console.info(`${Tag}:deviceDescriptors ${i} : ${JSON.stringify(AudioCapturerChangeInfoArray[i].deviceDescriptors[j])}`);
} }
if (AudioCapturerChangeInfoArray[i].capturerState == 3 && devDescriptor != null) { if (devDescriptor != null) {
audioStreamManager.off('audioCapturerChange'); audioStreamManager.off('audioCapturerChange');
await audioCap.release().then(function () { await audioCap.release().then(function () {
console.info(`${Tag}: Capturer release : SUCCESS`); console.info(`${Tag}: Capturer release : SUCCESS`);
......
...@@ -99,7 +99,7 @@ describe('audioRendererChange', function () { ...@@ -99,7 +99,7 @@ describe('audioRendererChange', function () {
console.info(`${Tag} : C: ${i} ${AudioRendererChangeInfoArray[i].deviceDescriptors[j].channelCounts[0]}`); console.info(`${Tag} : C: ${i} ${AudioRendererChangeInfoArray[i].deviceDescriptors[j].channelCounts[0]}`);
console.info(`${Tag} : CM: ${i} ${AudioRendererChangeInfoArray[i].deviceDescriptors[j].channelMasks}`); console.info(`${Tag} : CM: ${i} ${AudioRendererChangeInfoArray[i].deviceDescriptors[j].channelMasks}`);
} }
if (AudioRendererChangeInfoArray[i].rendererState == 1 && devDescriptor != null) { if (devDescriptor != null) {
resultFlag = true; resultFlag = true;
console.info(`${Tag} : [RENDERER-CHANGE-ON-001] ResultFlag for ${i} is: ${resultFlag}`); console.info(`${Tag} : [RENDERER-CHANGE-ON-001] ResultFlag for ${i} is: ${resultFlag}`);
} }
...@@ -178,7 +178,7 @@ describe('audioRendererChange', function () { ...@@ -178,7 +178,7 @@ describe('audioRendererChange', function () {
for (let j = 0; j < AudioRendererChangeInfoArray[i].deviceDescriptors.length; j++) { for (let j = 0; j < AudioRendererChangeInfoArray[i].deviceDescriptors.length; j++) {
console.info(`${Tag} : ${i} ${JSON.stringify(AudioRendererChangeInfoArray[i].deviceDescriptors[j])}`); console.info(`${Tag} : ${i} ${JSON.stringify(AudioRendererChangeInfoArray[i].deviceDescriptors[j])}`);
} }
if (AudioRendererChangeInfoArray[i].rendererState == 2 && devDescriptor != null) { if (devDescriptor != null) {
resultFlag = true; resultFlag = true;
console.info(`${Tag} : [RENDERER-CHANGE-ON-002] ResultFlag for ${i} is: ${resultFlag}`); console.info(`${Tag} : [RENDERER-CHANGE-ON-002] ResultFlag for ${i} is: ${resultFlag}`);
} }
...@@ -269,7 +269,7 @@ describe('audioRendererChange', function () { ...@@ -269,7 +269,7 @@ describe('audioRendererChange', function () {
for (let j = 0; j < AudioRendererChangeInfoArray[i].deviceDescriptors.length; j++) { for (let j = 0; j < AudioRendererChangeInfoArray[i].deviceDescriptors.length; j++) {
console.info(`${Tag} : ${i} ${JSON.stringify(AudioRendererChangeInfoArray[i].deviceDescriptors[j])}`); console.info(`${Tag} : ${i} ${JSON.stringify(AudioRendererChangeInfoArray[i].deviceDescriptors[j])}`);
} }
if (AudioRendererChangeInfoArray[i].rendererState == 3 && devDescriptor != null) { if (devDescriptor != null) {
resultFlag = true; resultFlag = true;
console.info(`${Tag} : [RENDERER-CHANGE-ON-003] ResultFlag for ${i} is: ${resultFlag}`); console.info(`${Tag} : [RENDERER-CHANGE-ON-003] ResultFlag for ${i} is: ${resultFlag}`);
} }
...@@ -361,7 +361,7 @@ describe('audioRendererChange', function () { ...@@ -361,7 +361,7 @@ describe('audioRendererChange', function () {
for (let j = 0; j < AudioRendererChangeInfoArray[i].deviceDescriptors.length; j++) { for (let j = 0; j < AudioRendererChangeInfoArray[i].deviceDescriptors.length; j++) {
console.info(`${Tag} : ${i} ${JSON.stringify(AudioRendererChangeInfoArray[i].deviceDescriptors[j])}`); console.info(`${Tag} : ${i} ${JSON.stringify(AudioRendererChangeInfoArray[i].deviceDescriptors[j])}`);
} }
if (AudioRendererChangeInfoArray[i].rendererState == 4 && devDescriptor != null) { if (devDescriptor != null) {
resultFlag = true; resultFlag = true;
console.info(`${Tag} : [RENDERER-CHANGE-ON-004] ResultFlag for ${i} is: ${resultFlag}`); console.info(`${Tag} : [RENDERER-CHANGE-ON-004] ResultFlag for ${i} is: ${resultFlag}`);
} }
...@@ -440,7 +440,7 @@ describe('audioRendererChange', function () { ...@@ -440,7 +440,7 @@ describe('audioRendererChange', function () {
for (let j = 0; j < AudioRendererChangeInfoArray[i].deviceDescriptors.length; j++) { for (let j = 0; j < AudioRendererChangeInfoArray[i].deviceDescriptors.length; j++) {
console.info(`${Tag} : ${i} ${JSON.stringify(AudioRendererChangeInfoArray[i].deviceDescriptors[j])}`); console.info(`${Tag} : ${i} ${JSON.stringify(AudioRendererChangeInfoArray[i].deviceDescriptors[j])}`);
} }
if (AudioRendererChangeInfoArray[i].rendererState == 5 && devDescriptor != null) { if (devDescriptor != null) {
resultFlag = true; resultFlag = true;
console.info(`${Tag} : [RENDERER-CHANGE-ON-005] ResultFlag for ${i} is: ${resultFlag}`); console.info(`${Tag} : [RENDERER-CHANGE-ON-005] ResultFlag for ${i} is: ${resultFlag}`);
} }
...@@ -1877,7 +1877,7 @@ describe('audioRendererChange', function () { ...@@ -1877,7 +1877,7 @@ describe('audioRendererChange', function () {
for (let j = 0; j < AudioRendererChangeInfoArray[i].deviceDescriptors.length; j++) { for (let j = 0; j < AudioRendererChangeInfoArray[i].deviceDescriptors.length; j++) {
console.info(`${Tag} : ${i} ${JSON.stringify(AudioRendererChangeInfoArray[i].deviceDescriptors[j])}`); console.info(`${Tag} : ${i} ${JSON.stringify(AudioRendererChangeInfoArray[i].deviceDescriptors[j])}`);
} }
if (AudioRendererChangeInfoArray[i].rendererState == 1 && devDescriptor != null) { if (devDescriptor != null) {
resultFlag = true; resultFlag = true;
console.info(`${Tag} : State : ${AudioRendererChangeInfoArray[i].rendererState}`); console.info(`${Tag} : State : ${AudioRendererChangeInfoArray[i].rendererState}`);
} }
...@@ -1970,7 +1970,7 @@ describe('audioRendererChange', function () { ...@@ -1970,7 +1970,7 @@ describe('audioRendererChange', function () {
for (let j = 0; j < AudioRendererChangeInfoArray[i].deviceDescriptors.length; j++) { for (let j = 0; j < AudioRendererChangeInfoArray[i].deviceDescriptors.length; j++) {
console.info(`${Tag} : ${i} ${JSON.stringify(AudioRendererChangeInfoArray[i].deviceDescriptors[j])}`); console.info(`${Tag} : ${i} ${JSON.stringify(AudioRendererChangeInfoArray[i].deviceDescriptors[j])}`);
} }
if (AudioRendererChangeInfoArray[i].rendererState == 2 && devDescriptor != null) { if (devDescriptor != null) {
resultFlag = true; resultFlag = true;
console.info(`${Tag} : State : ${AudioRendererChangeInfoArray[i].rendererState}`); console.info(`${Tag} : State : ${AudioRendererChangeInfoArray[i].rendererState}`);
} }
...@@ -2071,7 +2071,7 @@ describe('audioRendererChange', function () { ...@@ -2071,7 +2071,7 @@ describe('audioRendererChange', function () {
for (let j = 0; j < AudioRendererChangeInfoArray[i].deviceDescriptors.length; j++) { for (let j = 0; j < AudioRendererChangeInfoArray[i].deviceDescriptors.length; j++) {
console.info(`${Tag} : ${i} ${JSON.stringify(AudioRendererChangeInfoArray[i].deviceDescriptors[j])}`); console.info(`${Tag} : ${i} ${JSON.stringify(AudioRendererChangeInfoArray[i].deviceDescriptors[j])}`);
} }
if (AudioRendererChangeInfoArray[i].rendererState == 3 && devDescriptor != null) { if (devDescriptor != null) {
resultFlag = true; resultFlag = true;
console.info(`${Tag} : State : ${AudioRendererChangeInfoArray[i].rendererState}`); console.info(`${Tag} : State : ${AudioRendererChangeInfoArray[i].rendererState}`);
} }
...@@ -2172,7 +2172,7 @@ describe('audioRendererChange', function () { ...@@ -2172,7 +2172,7 @@ describe('audioRendererChange', function () {
for (let j = 0; j < AudioRendererChangeInfoArray[i].deviceDescriptors.length; j++) { for (let j = 0; j < AudioRendererChangeInfoArray[i].deviceDescriptors.length; j++) {
console.info(`${Tag} : ${i} ${JSON.stringify(AudioRendererChangeInfoArray[i].deviceDescriptors[j])}`); console.info(`${Tag} : ${i} ${JSON.stringify(AudioRendererChangeInfoArray[i].deviceDescriptors[j])}`);
} }
if (AudioRendererChangeInfoArray[i].rendererState == 5 && devDescriptor != null) { if (devDescriptor != null) {
resultFlag = true; resultFlag = true;
console.info(`${Tag} : State : ${AudioRendererChangeInfoArray[i].rendererState}`); console.info(`${Tag} : State : ${AudioRendererChangeInfoArray[i].rendererState}`);
} }
...@@ -2352,7 +2352,7 @@ describe('audioRendererChange', function () { ...@@ -2352,7 +2352,7 @@ describe('audioRendererChange', function () {
for (let j = 0; j < AudioRendererChangeInfoArray[i].deviceDescriptors.length; j++) { for (let j = 0; j < AudioRendererChangeInfoArray[i].deviceDescriptors.length; j++) {
console.info(`${Tag} : ${i} ${JSON.stringify(AudioRendererChangeInfoArray[i].deviceDescriptors[j])}`); console.info(`${Tag} : ${i} ${JSON.stringify(AudioRendererChangeInfoArray[i].deviceDescriptors[j])}`);
} }
if (AudioRendererChangeInfoArray[i].rendererState == 1 && devDescriptor != null) { if (devDescriptor != null) {
resultFlag = true; resultFlag = true;
console.info(`${Tag} : State : ${AudioRendererChangeInfoArray[i].rendererState}`); console.info(`${Tag} : State : ${AudioRendererChangeInfoArray[i].rendererState}`);
} }
...@@ -2451,7 +2451,7 @@ describe('audioRendererChange', function () { ...@@ -2451,7 +2451,7 @@ describe('audioRendererChange', function () {
for (let j = 0; j < AudioRendererChangeInfoArray[i].deviceDescriptors.length; j++) { for (let j = 0; j < AudioRendererChangeInfoArray[i].deviceDescriptors.length; j++) {
console.info(`${Tag} : ${i} ${JSON.stringify(AudioRendererChangeInfoArray[i].deviceDescriptors[j])}`); console.info(`${Tag} : ${i} ${JSON.stringify(AudioRendererChangeInfoArray[i].deviceDescriptors[j])}`);
} }
if (AudioRendererChangeInfoArray[i].rendererState == 2 && devDescriptor != null) { if (devDescriptor != null) {
resultFlag = true; resultFlag = true;
console.info(`${Tag} : State : ${AudioRendererChangeInfoArray[i].rendererState}`); console.info(`${Tag} : State : ${AudioRendererChangeInfoArray[i].rendererState}`);
} }
...@@ -2557,7 +2557,7 @@ describe('audioRendererChange', function () { ...@@ -2557,7 +2557,7 @@ describe('audioRendererChange', function () {
for (let j = 0; j < AudioRendererChangeInfoArray[i].deviceDescriptors.length; j++) { for (let j = 0; j < AudioRendererChangeInfoArray[i].deviceDescriptors.length; j++) {
console.info(`${Tag} : ${i} ${JSON.stringify(AudioRendererChangeInfoArray[i].deviceDescriptors[j])}`); console.info(`${Tag} : ${i} ${JSON.stringify(AudioRendererChangeInfoArray[i].deviceDescriptors[j])}`);
} }
if (AudioRendererChangeInfoArray[i].rendererState == 3 && devDescriptor != null) { if (devDescriptor != null) {
resultFlag = true; resultFlag = true;
console.info(`${Tag} : State : ${AudioRendererChangeInfoArray[i].rendererState}`); console.info(`${Tag} : State : ${AudioRendererChangeInfoArray[i].rendererState}`);
} }
...@@ -2663,7 +2663,7 @@ describe('audioRendererChange', function () { ...@@ -2663,7 +2663,7 @@ describe('audioRendererChange', function () {
for (let j = 0; j < AudioRendererChangeInfoArray[i].deviceDescriptors.length; j++) { for (let j = 0; j < AudioRendererChangeInfoArray[i].deviceDescriptors.length; j++) {
console.info(`${Tag} : ${i} ${JSON.stringify(AudioRendererChangeInfoArray[i].deviceDescriptors[j])}`); console.info(`${Tag} : ${i} ${JSON.stringify(AudioRendererChangeInfoArray[i].deviceDescriptors[j])}`);
} }
if (AudioRendererChangeInfoArray[i].rendererState == 5 && devDescriptor != null) { if (devDescriptor != null) {
resultFlag = true; resultFlag = true;
console.info(`AFRenLog: RenSta : ${AudioRendererChangeInfoArray[i].rendererState}`); console.info(`AFRenLog: RenSta : ${AudioRendererChangeInfoArray[i].rendererState}`);
} }
......
...@@ -4425,247 +4425,6 @@ describe('audioFramework', function () { ...@@ -4425,247 +4425,6 @@ describe('audioFramework', function () {
}); });
}) })
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_ONVOLUMECHANGE_0100
*@tc.name : OnVolumeChange - setVolume - MEDIA
*@tc.desc : OnVolumeChange - setVolume - MEDIA
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 1
*/
it('SUB_MULTIMEDIA_AUDIO_MANAGER_ONVOLUMECHANGE_0100', 1, async function (done) {
audioManager = audio.getAudioManager();
audioManager.on('volumeChange', (VolumeEvent) => {
console.log(`${TagFrmwk}: Volume Change Event is called`);
switch (VolumeEvent.volumeType) {
case audio.AudioVolumeType.MEDIA:
console.info(`${TagFrmwk}: Audio VolumeEvent is : ${VolumeEvent}`);
if (VolumeEvent.volume == lowVol) {
console.info(`${TagFrmwk}: MEDIA CallBack : PASS : ${VolumeEvent.volume}`);
expect(true).assertTrue();
}
break;
default:
console.info(`${TagFrmwk}: Audio VolumeEvent is : ${VolumeEvent}`);
expect(false).assertTrue();
break;
}
done();
});
try {
await audioManager.setVolume(audioMedia, lowVol);
console.info('setVolume success')
} catch (err) {
console.log('err :' + JSON.stringify(err))
expect(false).assertTrue();
done();
}
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_ONVOLUMECHANGE_0200
*@tc.name : OnVolumeChange - setVolume - RINGTONE
*@tc.desc : OnVolumeChange - setVolume - RINGTONE
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 1
*/
it('SUB_MULTIMEDIA_AUDIO_MANAGER_ONVOLUMECHANGE_0200', 1, async function (done) {
audioManager = audio.getAudioManager();
audioManager.on('volumeChange', (VolumeEvent) => {
console.log(`${TagFrmwk}: Volume Change Event is called`);
switch (VolumeEvent.volumeType) {
case audio.AudioVolumeType.RINGTONE:
console.info(`${TagFrmwk}: Audio VolumeEvent is : ${VolumeEvent}`);
if (VolumeEvent.volume == lowVol) {
console.info(`${TagFrmwk}: RINGTONE CallBack : PASS : ${VolumeEvent.volume}`);
expect(true).assertTrue();
}
break;
default:
console.info(`${TagFrmwk}: Audio VolumeEvent is : ${VolumeEvent}`);
expect(false).assertTrue();
break;
}
done();
});
try {
await audioManager.setVolume(audioRingtone, lowVol);
console.info('setVolume success')
} catch (err) {
console.log('err :' + JSON.stringify(err))
expect(false).assertTrue();
done();
}
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_ONVOLUMECHANGE_0300
*@tc.name : OnVolumeChange - setVolume - VOICE_CALL
*@tc.desc : OnVolumeChange - setVolume - VOICE_CALL
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 2
*/
it('SUB_MULTIMEDIA_AUDIO_MANAGER_ONVOLUMECHANGE_0300', 2, async function (done) {
audioManager = audio.getAudioManager();
audioManager.on('volumeChange', (VolumeEvent) => {
console.log(`${TagFrmwk}: Volume Change Event is called`);
switch (VolumeEvent.volumeType) {
case audio.AudioVolumeType.VOICE_CALL:
console.info(`${TagFrmwk}: Audio VolumeEvent is : ${VolumeEvent}`);
if (VolumeEvent.volume == lowVol) {
console.info(`${TagFrmwk}: VOICE_CALL CallBack : PASS : ${VolumeEvent.volume}`);
expect(true).assertTrue();
}
break;
default:
console.info(`${TagFrmwk}: Audio VolumeEvent is : ${VolumeEvent}`);
expect(false).assertTrue();
break;
}
done();
});
try {
await audioManager.setVolume(audio.AudioVolumeType.VOICE_CALL, lowVol);
console.info('setVolume success')
} catch (err) {
console.log('err :' + JSON.stringify(err))
expect(false).assertTrue();
done();
}
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_ONVOLUMECHANGE_0400
*@tc.name : OnVolumeChange - setVolume - VOICE_ASSISTANT
*@tc.desc : OnVolumeChange - setVolume - VOICE_ASSISTANT
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 2
*/
it('SUB_MULTIMEDIA_AUDIO_MANAGER_ONVOLUMECHANGE_0400', 2, async function (done) {
audioManager = audio.getAudioManager();
audioManager.on('volumeChange', (VolumeEvent) => {
console.log(`${TagFrmwk}: Volume Change Event is called`);
switch (VolumeEvent.volumeType) {
case audio.AudioVolumeType.VOICE_ASSISTANT:
console.info(`${TagFrmwk}: Audio VolumeEvent is : ${VolumeEvent}`);
if (VolumeEvent.volume == lowVol) {
console.info(`${TagFrmwk}: VOICE_ASSISTANT CallBack : PASS : ${VolumeEvent.volume}`);
expect(true).assertTrue();
}
break;
default:
console.info(`${TagFrmwk}: Audio VolumeEvent is : ${VolumeEvent}`);
expect(false).assertTrue();
break;
}
done();
});
try {
await audioManager.setVolume(audio.AudioVolumeType.VOICE_ASSISTANT, lowVol);
console.info('setVolume success')
} catch (err) {
console.log('err :' + JSON.stringify(err))
expect(false).assertTrue();
done();
}
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_RINGERMODECHANGE_0100
*@tc.name : RingerModeChange - RINGER_MODE_SILENT
*@tc.desc : RingerModeChange - RINGER_MODE_SILENT
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 1
*/
it('SUB_MULTIMEDIA_AUDIO_MANAGER_RINGERMODECHANGE_0100', 1, async function (done) {
audioManager.on('ringerModeChange', (ringerMode) => {
console.log(`${TagFrmwk}: RingerModeChange is called`);
switch (ringerMode) {
case audio.AudioRingMode.RINGER_MODE_SILENT:
console.info(`${TagFrmwk}: Ringer Mode Changed to : RINGER_MODE_SILENT : ${ringerMode}`);
expect(true).assertTrue();
break;
default:
console.info(`${TagFrmwk}: Ringer Mode Changed : UNKNOWN ${ringerMode}`);
expect(false).assertTrue();
break;
}
});
await audioManager.setRingerMode(audio.AudioRingMode.RINGER_MODE_SILENT);
done();
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_RINGERMODECHANGE_0200
*@tc.name : RingerModeChange - RINGER_MODE_VIBRATE
*@tc.desc : RingerModeChange - RINGER_MODE_VIBRATE
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 1
*/
it('SUB_MULTIMEDIA_AUDIO_MANAGER_RINGERMODECHANGE_0200', 1, async function (done) {
audioManager.on('ringerModeChange', (ringerMode) => {
console.log(`${TagFrmwk}: RingerModeChange is called`);
switch (ringerMode) {
case audio.AudioRingMode.RINGER_MODE_VIBRATE:
console.info(`${TagFrmwk}: Ringer Mode Changed to : RINGER_MODE_VIBRATE : ${ringerMode}`);
expect(true).assertTrue();
break;
default:
console.info(`${TagFrmwk}: Ringer Mode Changed : UNKNOWN ${ringerMode}`);
expect(false).assertTrue();
break;
}
done();
});
try {
await audioManager.setRingerMode(audio.AudioRingMode.RINGER_MODE_VIBRATE);
} catch (err) {
console.log('err :' + JSON.stringify(err))
expect(false).assertTrue();
done();
}
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_RINGERMODECHANGE_0300
*@tc.name : RingerModeChange - RINGER_MODE_NORMAL
*@tc.desc : RingerModeChange - RINGER_MODE_NORMAL
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 2
*/
it('SUB_MULTIMEDIA_AUDIO_MANAGER_RINGERMODECHANGE_0300', 2, async function (done) {
audioManager.on('ringerModeChange', (ringerMode) => {
console.log(`${TagFrmwk}: RingerModeChange is called`);
switch (ringerMode) {
case audio.AudioRingMode.RINGER_MODE_NORMAL:
console.info(`${TagFrmwk}: Ringer Mode Changed to : RINGER_MODE_NORMAL : ${ringerMode}`);
expect(true).assertTrue();
break;
default:
console.info(`${TagFrmwk}: Ringer Mode Changed : UNKNOWN ${ringerMode}`);
expect(false).assertTrue();
break;
}
done();
});
try {
await audioManager.setRingerMode(audio.AudioRingMode.RINGER_MODE_NORMAL);
} catch (err) {
console.log('err :' + JSON.stringify(err))
expect(false).assertTrue();
done();
}
})
/** /**
*@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_INTERRUPT_0100 *@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_INTERRUPT_0100
*@tc.name : InterruptType - INTERRUPT_TYPE_BEGIN *@tc.name : InterruptType - INTERRUPT_TYPE_BEGIN
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册