Skip to content
This repository was archived by the owner on Nov 3, 2021. It is now read-only.

Commit efcb1b3

Browse files
committed
Merge pull request #33377 from evanxd/bug-1228253
Bug 1228253 - Change the naming of public notification audio channel from publicNotification to publicnotification r=alwu
2 parents c26daba + bc71bf4 commit efcb1b3

File tree

5 files changed

+49
-49
lines changed

5 files changed

+49
-49
lines changed

apps/system/js/audio_channel_policy.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
ringer: { activeAudioChannel: PAUSE, newAudioChannel: PLAY },
2323
telephony: { activeAudioChannel: PAUSE, newAudioChannel: PLAY },
2424
notification: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
25-
publicNotification: { activeAudioChannel: PLAY, newAudioChannel: PLAY }
25+
publicnotification: { activeAudioChannel: PLAY, newAudioChannel: PLAY }
2626
},
2727
content: {
2828
normal: { activeAudioChannel: PAUSE, newAudioChannel: PLAY },
@@ -32,7 +32,7 @@
3232
ringer: { activeAudioChannel: PAUSE, newAudioChannel: PLAY },
3333
telephony: { activeAudioChannel: PAUSE, newAudioChannel: PLAY },
3434
notification: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
35-
publicNotification: { activeAudioChannel: PLAY, newAudioChannel: PLAY }
35+
publicnotification: { activeAudioChannel: PLAY, newAudioChannel: PLAY }
3636
},
3737
alarm: {
3838
normal: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
@@ -42,7 +42,7 @@
4242
ringer: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
4343
telephony: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
4444
notification: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
45-
publicNotification: { activeAudioChannel: PLAY, newAudioChannel: PLAY }
45+
publicnotification: { activeAudioChannel: PLAY, newAudioChannel: PLAY }
4646
},
4747
system: {
4848
normal: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
@@ -52,7 +52,7 @@
5252
ringer: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
5353
telephony: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
5454
notification: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
55-
publicNotification: { activeAudioChannel: PLAY, newAudioChannel: PLAY }
55+
publicnotification: { activeAudioChannel: PLAY, newAudioChannel: PLAY }
5656
},
5757
ringer: {
5858
normal: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
@@ -62,7 +62,7 @@
6262
ringer: { activeAudioChannel: PAUSE, newAudioChannel: PLAY },
6363
telephony: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
6464
notification: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
65-
publicNotification: { activeAudioChannel: PLAY, newAudioChannel: PLAY }
65+
publicnotification: { activeAudioChannel: PLAY, newAudioChannel: PLAY }
6666
},
6767
telephony: {
6868
normal: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
@@ -71,7 +71,7 @@
7171
system: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
7272
ringer: { activeAudioChannel: PLAY, newAudioChannel: PAUSE },
7373
notification: { activeAudioChannel: PLAY, newAudioChannel: PAUSE },
74-
publicNotification: { activeAudioChannel: PLAY, newAudioChannel: PLAY }
74+
publicnotification: { activeAudioChannel: PLAY, newAudioChannel: PLAY }
7575
},
7676
notification: {
7777
normal: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
@@ -81,17 +81,17 @@
8181
ringer: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
8282
telephony: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
8383
notification: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
84-
publicNotification: { activeAudioChannel: PLAY, newAudioChannel: PLAY }
84+
publicnotification: { activeAudioChannel: PLAY, newAudioChannel: PLAY }
8585
},
86-
publicNotification: {
86+
publicnotification: {
8787
normal: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
8888
content: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
8989
alarm: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
9090
system: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
9191
ringer: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
9292
telephony: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
9393
notification: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
94-
publicNotification: { activeAudioChannel: PLAY, newAudioChannel: PLAY }
94+
publicnotification: { activeAudioChannel: PLAY, newAudioChannel: PLAY }
9595
}
9696
};
9797

@@ -218,7 +218,7 @@
218218
function(activeChannelName, newChannelName) {
219219
var isNeeded = false;
220220
if ((activeChannelName === 'notification' ||
221-
activeChannelName === 'publicNotification') &&
221+
activeChannelName === 'publicnotification') &&
222222
(newChannelName === 'normal' ||
223223
newChannelName === 'content')
224224
)
@@ -241,7 +241,7 @@
241241
if (((activeChannelName === 'normal' ||
242242
activeChannelName === 'content') &&
243243
(newChannelName === 'notification' ||
244-
newChannelName === 'publicNotification')
244+
newChannelName === 'publicnotification')
245245
) ||
246246
(activeChannelName === 'alarm' &&
247247
(newChannelName === 'ringer' ||

apps/system/js/audio_channel_service.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
this._audioChannelWeights = new Map([
4848
['none', 0], ['system', 1], ['normal', 2], ['content', 3],
4949
['alarm', 4], ['ringer', 5], ['telephony', 6],
50-
['notification', 7], ['publicNotification', 8]
50+
['notification', 7], ['publicnotification', 8]
5151
]);
5252
this._interruptedAudioChannels = [];
5353
this._muteSystemAudioChannels();

apps/system/test/unit/audio_channel_policy_test.js

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ suite('system/AudioChannelPolicy', function() {
9090
{ newAudioChannel: 'alarm', activeAudioChannels: 'ringer' },
9191
{ newAudioChannel: 'alarm', activeAudioChannels: 'notification' },
9292
{ newAudioChannel: 'alarm',
93-
activeAudioChannels: 'publicNotification' },
93+
activeAudioChannels: 'publicnotification' },
9494
{ newAudioChannel: 'system', activeAudioChannels: 'normal' },
9595
{ newAudioChannel: 'system', activeAudioChannels: 'content' },
9696
{ newAudioChannel: 'system', activeAudioChannels: 'alarm' },
@@ -99,35 +99,35 @@ suite('system/AudioChannelPolicy', function() {
9999
{ newAudioChannel: 'system', activeAudioChannels: 'telephony' },
100100
{ newAudioChannel: 'system', activeAudioChannels: 'notification' },
101101
{ newAudioChannel: 'system',
102-
activeAudioChannels: 'publicNotification' },
102+
activeAudioChannels: 'publicnotification' },
103103
{ newAudioChannel: 'ringer', activeAudioChannels: 'system' },
104104
{ newAudioChannel: 'ringer', activeAudioChannels: 'notification' },
105105
{ newAudioChannel: 'ringer',
106-
activeAudioChannels: 'publicNotification' },
106+
activeAudioChannels: 'publicnotification' },
107107
{ newAudioChannel: 'telephony', activeAudioChannels: 'system' },
108108
{ newAudioChannel: 'telephony', activeAudioChannels: 'ringer' },
109109
{ newAudioChannel: 'telephony', activeAudioChannels: 'notification' },
110110
{ newAudioChannel: 'telephony',
111-
activeAudioChannels: 'publicNotification' },
111+
activeAudioChannels: 'publicnotification' },
112112
{ newAudioChannel: 'notification', activeAudioChannels: 'alarm' },
113113
{ newAudioChannel: 'notification', activeAudioChannels: 'system' },
114114
{ newAudioChannel: 'notification', activeAudioChannels: 'ringer' },
115115
{ newAudioChannel: 'notification',
116116
activeAudioChannels: 'notification' },
117117
{ newAudioChannel: 'notification',
118-
activeAudioChannels: 'publicNotification' },
119-
{ newAudioChannel: 'publicNotification',
118+
activeAudioChannels: 'publicnotification' },
119+
{ newAudioChannel: 'publicnotification',
120120
activeAudioChannels: 'alarm' },
121-
{ newAudioChannel: 'publicNotification',
121+
{ newAudioChannel: 'publicnotification',
122122
activeAudioChannels: 'system' },
123-
{ newAudioChannel: 'publicNotification',
123+
{ newAudioChannel: 'publicnotification',
124124
activeAudioChannels: 'ringer' },
125-
{ newAudioChannel: 'publicNotification',
125+
{ newAudioChannel: 'publicnotification',
126126
activeAudioChannels: 'telephony' },
127-
{ newAudioChannel: 'publicNotification',
127+
{ newAudioChannel: 'publicnotification',
128128
activeAudioChannels: 'notification' },
129-
{ newAudioChannel: 'publicNotification',
130-
activeAudioChannels: 'publicNotification' },
129+
{ newAudioChannel: 'publicnotification',
130+
activeAudioChannels: 'publicnotification' },
131131
],
132132
{
133133
newAudioChannel: {
@@ -199,9 +199,9 @@ suite('system/AudioChannelPolicy', function() {
199199
{ newAudioChannel: 'telephony', activeAudioChannels: 'alarm' },
200200
{ newAudioChannel: 'notification', activeAudioChannels: 'normal' },
201201
{ newAudioChannel: 'notification', activeAudioChannels: 'content' },
202-
{ newAudioChannel: 'publicNotification',
202+
{ newAudioChannel: 'publicnotification',
203203
activeAudioChannels: 'normal' },
204-
{ newAudioChannel: 'publicNotification',
204+
{ newAudioChannel: 'publicnotification',
205205
activeAudioChannels: 'content' },
206206
],
207207
{
@@ -222,10 +222,10 @@ suite('system/AudioChannelPolicy', function() {
222222
[
223223
{ newAudioChannel: 'normal', activeAudioChannels: 'notification' },
224224
{ newAudioChannel: 'normal',
225-
activeAudioChannels: 'publicNotification' },
225+
activeAudioChannels: 'publicnotification' },
226226
{ newAudioChannel: 'content', activeAudioChannels: 'notification' },
227227
{ newAudioChannel: 'content',
228-
activeAudioChannels: 'publicNotification' }
228+
activeAudioChannels: 'publicnotification' }
229229
],
230230
{
231231
newAudioChannel: {
@@ -281,11 +281,11 @@ suite('system/AudioChannelPolicy', function() {
281281
checkPolicy(
282282
[
283283
{ newAudioChannel: 'alarm', activeAudioChannels:
284-
['system', 'telephony', 'publicNotification'] },
284+
['system', 'telephony', 'publicnotification'] },
285285
{ newAudioChannel: 'ringer', activeAudioChannels:
286-
['system', 'telephony', 'publicNotification'] },
286+
['system', 'telephony', 'publicnotification'] },
287287
{ newAudioChannel: 'notification', activeAudioChannels:
288-
['system', 'telephony', 'publicNotification'] },
288+
['system', 'telephony', 'publicnotification'] },
289289
],
290290
{
291291
newAudioChannel: {
@@ -336,7 +336,7 @@ suite('system/AudioChannelPolicy', function() {
336336
newAudioChannel: 'normal',
337337
activeAudioChannels: [
338338
'content', 'alarm', 'system', 'ringer', 'telephony',
339-
'notification', 'publicNotification'
339+
'notification', 'publicnotification'
340340
]
341341
},
342342
{
@@ -353,7 +353,7 @@ suite('system/AudioChannelPolicy', function() {
353353
test('All audio channel except normal audio channel ' +
354354
'can play in background', function() {
355355
['content', 'alarm', 'system', 'ringer', 'telephony',
356-
'notification', 'publicNotification'].forEach(function(name) {
356+
'notification', 'publicnotification'].forEach(function(name) {
357357
var newAudioChannel = new MockAudioChannelController(
358358
{ instanceID: 'appID' }, { name: name }
359359
);
@@ -392,8 +392,8 @@ suite('system/AudioChannelPolicy', function() {
392392
var isNeeded = [
393393
{ activeChannelName: 'notification', newChannelName: 'normal' },
394394
{ activeChannelName: 'notification', newChannelName: 'content' },
395-
{ activeChannelName: 'publicNotification', newChannelName: 'normal' },
396-
{ activeChannelName: 'publicNotification', newChannelName: 'content' }
395+
{ activeChannelName: 'publicnotification', newChannelName: 'normal' },
396+
{ activeChannelName: 'publicnotification', newChannelName: 'content' }
397397
].map(function(obj) {
398398
return subject._isNeededToFadeOutForNewAudioChannel(
399399
obj.activeChannelName, obj.newChannelName
@@ -407,9 +407,9 @@ suite('system/AudioChannelPolicy', function() {
407407
{ activeChannelName: 'alarm', newChannelName: 'ringer' },
408408
{ activeChannelName: 'alarm', newChannelName: 'telephony' },
409409
{ activeChannelName: 'normal', newChannelName: 'notification' },
410-
{ activeChannelName: 'normal', newChannelName: 'publicNotification' },
410+
{ activeChannelName: 'normal', newChannelName: 'publicnotification' },
411411
{ activeChannelName: 'content', newChannelName: 'notification' },
412-
{ activeChannelName: 'content', newChannelName: 'publicNotification' }
412+
{ activeChannelName: 'content', newChannelName: 'publicnotification' }
413413
].map(function(obj) {
414414
return subject._isNeededToFadeOutForActiveAudioChannel(
415415
obj.activeChannelName, obj.newChannelName

tv_apps/smart-system/js/audio_channel_policy.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
ringer: { activeAudioChannel: PAUSE, newAudioChannel: PLAY },
2323
telephony: { activeAudioChannel: PAUSE, newAudioChannel: PLAY },
2424
notification: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
25-
publicNotification: { activeAudioChannel: PLAY, newAudioChannel: PLAY }
25+
publicnotification: { activeAudioChannel: PLAY, newAudioChannel: PLAY }
2626
},
2727
content: {
2828
normal: { activeAudioChannel: PAUSE, newAudioChannel: PLAY },
@@ -32,7 +32,7 @@
3232
ringer: { activeAudioChannel: PAUSE, newAudioChannel: PLAY },
3333
telephony: { activeAudioChannel: PAUSE, newAudioChannel: PLAY },
3434
notification: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
35-
publicNotification: { activeAudioChannel: PLAY, newAudioChannel: PLAY }
35+
publicnotification: { activeAudioChannel: PLAY, newAudioChannel: PLAY }
3636
},
3737
alarm: {
3838
normal: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
@@ -42,7 +42,7 @@
4242
ringer: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
4343
telephony: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
4444
notification: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
45-
publicNotification: { activeAudioChannel: PLAY, newAudioChannel: PLAY }
45+
publicnotification: { activeAudioChannel: PLAY, newAudioChannel: PLAY }
4646
},
4747
system: {
4848
normal: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
@@ -52,7 +52,7 @@
5252
ringer: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
5353
telephony: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
5454
notification: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
55-
publicNotification: { activeAudioChannel: PLAY, newAudioChannel: PLAY }
55+
publicnotification: { activeAudioChannel: PLAY, newAudioChannel: PLAY }
5656
},
5757
ringer: {
5858
normal: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
@@ -62,7 +62,7 @@
6262
ringer: { activeAudioChannel: PAUSE, newAudioChannel: PLAY },
6363
telephony: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
6464
notification: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
65-
publicNotification: { activeAudioChannel: PLAY, newAudioChannel: PLAY }
65+
publicnotification: { activeAudioChannel: PLAY, newAudioChannel: PLAY }
6666
},
6767
telephony: {
6868
normal: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
@@ -71,7 +71,7 @@
7171
system: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
7272
ringer: { activeAudioChannel: PLAY, newAudioChannel: PAUSE },
7373
notification: { activeAudioChannel: PLAY, newAudioChannel: PAUSE },
74-
publicNotification: { activeAudioChannel: PLAY, newAudioChannel: PLAY }
74+
publicnotification: { activeAudioChannel: PLAY, newAudioChannel: PLAY }
7575
},
7676
notification: {
7777
normal: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
@@ -81,17 +81,17 @@
8181
ringer: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
8282
telephony: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
8383
notification: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
84-
publicNotification: { activeAudioChannel: PLAY, newAudioChannel: PLAY }
84+
publicnotification: { activeAudioChannel: PLAY, newAudioChannel: PLAY }
8585
},
86-
publicNotification: {
86+
publicnotification: {
8787
normal: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
8888
content: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
8989
alarm: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
9090
system: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
9191
ringer: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
9292
telephony: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
9393
notification: { activeAudioChannel: PLAY, newAudioChannel: PLAY },
94-
publicNotification: { activeAudioChannel: PLAY, newAudioChannel: PLAY }
94+
publicnotification: { activeAudioChannel: PLAY, newAudioChannel: PLAY }
9595
}
9696
};
9797

@@ -224,7 +224,7 @@
224224
function(activeChannelName, newChannelName) {
225225
var isNeeded = false;
226226
if ((activeChannelName === 'notification' ||
227-
activeChannelName === 'publicNotification') &&
227+
activeChannelName === 'publicnotification') &&
228228
(newChannelName === 'normal' ||
229229
newChannelName === 'content')
230230
)
@@ -247,7 +247,7 @@
247247
if (((activeChannelName === 'normal' ||
248248
activeChannelName === 'content') &&
249249
(newChannelName === 'notification' ||
250-
newChannelName === 'publicNotification')
250+
newChannelName === 'publicnotification')
251251
) ||
252252
(activeChannelName === 'alarm' &&
253253
(newChannelName === 'ringer' ||

tv_apps/smart-system/js/audio_channel_service.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
this._audioChannelWeights = new Map([
4949
['none', 0], ['system', 1], ['normal', 2], ['content', 3],
5050
['alarm', 4], ['ringer', 5], ['telephony', 6],
51-
['notification', 7], ['publicNotification', 8]
51+
['notification', 7], ['publicnotification', 8]
5252
]);
5353
this._interruptedAudioChannels = [];
5454
this._muteSystemAudioChannels();

0 commit comments

Comments
 (0)