Permalink
Browse files

Merge pull request #6858 from vingtetun/ringtones

Bug 807431 - [Phone] Final Ringtones Need to be Added to the Build
  • Loading branch information...
vingtetun committed Dec 6, 2012
2 parents 593b35a + 4145fb4 commit 9b2cdf4c25dfc1da496d22a0328b6af24307008e
Showing with 325 additions and 166 deletions.
  1. +12 −21 Makefile
  2. +11 −8 apps/clock/index.html
  3. +4 −4 apps/clock/js/alarm.js
  4. +1 −1 apps/clock/js/onring.js
  5. +8 −0 apps/clock/locales/alarms.en-US.properties
  6. +0 −9 apps/clock/locales/clock.en-US.properties
  7. +1 −0 apps/clock/locales/locales.ini
  8. +5 −5 apps/communications/dialer/js/oncall.js
  9. BIN apps/communications/dialer/style/ringtones/classic.ogg
  10. BIN apps/communications/dialer/style/ringtones/low_bit.ogg
  11. BIN apps/communications/dialer/style/ringtones/old_school.ogg
  12. BIN apps/communications/dialer/style/ringtones/sms.wav
  13. +4 −32 apps/settings/index.html
  14. +161 −51 apps/settings/js/sound.js
  15. +4 −2 apps/settings/js/utils.js
  16. +2 −0 apps/settings/locales/locales.ini
  17. +12 −0 apps/settings/locales/notifications.en-US.properties
  18. +15 −0 apps/settings/locales/ringtones.en-US.properties
  19. +0 −4 apps/settings/locales/settings.en-US.properties
  20. +8 −1 apps/system/js/notifications.js
  21. BIN apps/system/style/notifications/ringtones/notification.wav
  22. +5 −1 build/preferences.js
  23. +17 −2 build/settings.py
  24. +20 −0 build/utils.js
  25. +1 −2 build/webapp-manifests.js
  26. +2 −23 build/webapp-zip.js
  27. BIN shared/resources/media/alarms/ac_classic_clock_alarm.opus
  28. BIN shared/resources/media/alarms/ac_classic_clock_alarm_prog.opus
  29. BIN shared/resources/media/alarms/ac_classic_clock_radio.opus
  30. BIN shared/resources/media/alarms/ac_normal_gem_echoes.opus
  31. BIN shared/resources/media/alarms/ac_normal_ringing_strings.opus
  32. BIN shared/resources/media/alarms/ac_soft_humming_waves.opus
  33. BIN shared/resources/media/alarms/ac_soft_into_the_void.opus
  34. BIN shared/resources/media/alarms/ac_soft_smooth_strings.opus
  35. +15 −0 shared/resources/media/notifications/list.json
  36. BIN shared/resources/media/notifications/notifier_bap.opus
  37. BIN shared/resources/media/notifications/notifier_bell.opus
  38. BIN shared/resources/media/notifications/notifier_bell_extd.opus
  39. BIN shared/resources/media/notifications/notifier_boomer.opus
  40. BIN shared/resources/media/notifications/notifier_bop.opus
  41. BIN shared/resources/media/notifications/notifier_dididi.opus
  42. BIN shared/resources/media/notifications/notifier_exclamation.ogg
  43. BIN shared/resources/media/notifications/notifier_minimal_bands.ogg
  44. BIN shared/resources/media/notifications/notifier_rewind.ogg
  45. BIN shared/resources/media/notifications/notifier_ring.ogg
  46. BIN shared/resources/media/notifications/notifier_spring.ogg
  47. BIN shared/resources/media/notifications/notifier_ting.opus
  48. +17 −0 shared/resources/media/ringtones/list.json
  49. BIN shared/resources/media/ringtones/ringer_bitbounce.opus
  50. BIN shared/resources/media/ringtones/ringer_classic_courier.opus
  51. BIN shared/resources/media/ringtones/ringer_classic_electric.ogg
  52. BIN shared/resources/media/ringtones/ringer_classic_prism.ogg
  53. BIN shared/resources/media/ringtones/ringer_classic_touchmatic.opus
  54. BIN shared/resources/media/ringtones/ringer_classic_wallphone.ogg
  55. BIN shared/resources/media/ringtones/ringer_digital_dapple.opus
  56. BIN shared/resources/media/ringtones/ringer_digitalascent.opus
  57. BIN shared/resources/media/ringtones/ringer_loude_windchimes.opus
  58. BIN shared/resources/media/ringtones/ringer_low_bit_swing.opus
  59. BIN shared/resources/media/ringtones/ringer_progressive_dapple.opus
  60. BIN shared/resources/media/ringtones/ringer_rain_echoes.opus
  61. BIN shared/resources/media/ringtones/ringer_ringing_gems.opus
  62. BIN shared/resources/media/ringtones/ringer_soft_disco_drive.opus
  63. BIN shared/resources/media/ringtones/ringer_vamos_la_elektro.opus
View
@@ -209,7 +209,7 @@ endif
endif
app-makefiles:
- for d in ${GAIA_APP_SRCDIRS}; \
+ @for d in ${GAIA_APP_SRCDIRS}; \
do \
for mfile in `find $$d -mindepth 2 -maxdepth 2 -name "Makefile"` ;\
do \
@@ -221,23 +221,19 @@ app-makefiles:
# We duplicate manifest.webapp to manifest.webapp and manifest.json
# to accommodate Gecko builds without bug 757613. Should be removed someday.
webapp-manifests: install-xulrunner-sdk
- @echo "Generated webapps"
@mkdir -p profile/webapps
@$(call run-js-command, webapp-manifests)
- @cat profile/webapps/webapps.json
- @echo "Done"
+ @#cat profile/webapps/webapps.json
# Generate profile/webapps/APP/application.zip
webapp-zip: stamp-commit-hash install-xulrunner-sdk
ifneq ($(DEBUG),1)
- @echo "Packaged webapps"
@rm -rf apps/system/camera
@cp -r apps/camera apps/system/camera
@cat apps/camera/index.html | sed -e 's:shared/:../shared/:' > apps/system/camera/index.html
@rm apps/system/camera/manifest.webapp
@mkdir -p profile/webapps
@$(call run-js-command, webapp-zip)
- @echo "Done"
endif
offline-cache: webapp-manifests install-xulrunner-sdk
@@ -328,33 +324,28 @@ EXTENDED_PREF_FILES = \
# Generate profile/prefs.js
preferences: install-xulrunner-sdk
- @echo "Generating prefs.js..."
- test -d profile || mkdir -p profile
+ @test -d profile || mkdir -p profile
@$(call run-js-command, preferences)
@$(foreach prefs_file,$(addprefix build/,$(EXTENDED_PREF_FILES)),\
if [ -f $(prefs_file) ]; then \
cat $(prefs_file) >> profile/user.js; \
fi; \
)
- @echo "Done"
# Generate profile/
applications-data: install-xulrunner-sdk
- @echo "Generating application data..."
test -d profile || mkdir -p profile
@$(call run-js-command, applications-data)
- @echo "Done. If this results in an error remove the xulrunner/xulrunner-sdk folder in your gaia folder."
# Generate profile/extensions
EXT_DIR=profile/extensions
extensions:
- @echo "Generating extensions..."
@mkdir -p profile
@rm -rf $(EXT_DIR)
ifeq ($(DEBUG),1)
cp -r tools/extensions $(EXT_DIR)
endif
- @echo "Done"
+ @echo "Finished: Generating extensions"
@@ -417,8 +408,8 @@ test-agent-config: test-agent-bootstrap-apps
@rm -f $(TEST_AGENT_CONFIG)
@touch $(TEST_AGENT_CONFIG)
@rm -f /tmp/test-agent-config;
- # Build json array of all test files
- for d in ${GAIA_APP_SRCDIRS}; \
+ @# Build json array of all test files
+ @for d in ${GAIA_APP_SRCDIRS}; \
do \
find $$d -name '*_test.js' | sed "s:$$d/::g" >> /tmp/test-agent-config; \
done;
@@ -428,19 +419,19 @@ test-agent-config: test-agent-bootstrap-apps
sed -e ':a' -e 'N' -e '$$!ba' -e 's/\n/,\
/g' >> $(TEST_AGENT_CONFIG);
@echo ' ]}' >> $(TEST_AGENT_CONFIG);
- @echo "Built test ui config file: $(TEST_AGENT_CONFIG)"
+ @echo "Finished: test ui config file: $(TEST_AGENT_CONFIG)"
@rm -f /tmp/test-agent-config
.PHONY: test-agent-bootstrap-apps
test-agent-bootstrap-apps:
- for d in `find -L ${GAIA_APP_SRCDIRS} -mindepth 1 -maxdepth 1 -type d` ;\
+ @for d in `find -L ${GAIA_APP_SRCDIRS} -mindepth 1 -maxdepth 1 -type d` ;\
do \
mkdir -p $$d/test/unit ; \
mkdir -p $$d/test/integration ; \
cp -f $(TEST_COMMON)/test/boilerplate/_proxy.html $$d/test/unit/_proxy.html; \
cp -f $(TEST_COMMON)/test/boilerplate/_sandbox.html $$d/test/unit/_sandbox.html; \
done
- @echo "Done bootstrapping test proxies/sandboxes";
+ @echo "Finished: bootstrapping test proxies/sandboxes";
# Temp make file method until we can switch
# over everything in test
@@ -501,7 +492,7 @@ lint:
# let us remove the update-offline-manifests target dependancy of the
# default target.
stamp-commit-hash:
- (if [ -d ./.git ]; then \
+ @(if [ -d ./.git ]; then \
git log -1 --format="%H%n%at" HEAD > apps/settings/resources/gaia_commit.txt; \
else \
echo 'Unknown Git commit; build date shown here.' > apps/settings/resources/gaia_commit.txt; \
@@ -510,7 +501,7 @@ stamp-commit-hash:
# Erase all the indexedDB databases on the phone, so apps have to rebuild them.
delete-databases:
- @echo 'Stoping b2g'
+ @echo 'Stopping b2g'
$(ADB) shell stop b2g
$(ADB) shell rm -r $(MSYS_FIX)/data/local/indexedDB/*
@echo 'Starting b2g'
@@ -561,7 +552,7 @@ update-offline-manifests:
TARGET_FOLDER = webapps/$(BUILD_APP_NAME).$(GAIA_DOMAIN)
install-gaia: profile
$(ADB) start-server
- @echo 'Stoping b2g'
+ @echo 'Stopping b2g'
$(ADB) shell stop b2g
$(ADB) shell rm -r $(MSYS_FIX)/cache/*
View
@@ -11,6 +11,9 @@
<link rel="stylesheet" type="text/css" href="shared/style/headers.css">
<link rel="stylesheet" type="text/css" href="shared/style/switches.css">
+ <!-- Shared sounds -->
+ <link rel="resources" type="directory" href="shared/resources/media/alarms/">
+
<!-- Localization -->
<link rel="resource" type="application/l10n" href="/shared/locales/date.ini">
<link rel="resource" type="application/l10n" href="locales/locales.ini">
@@ -193,14 +196,14 @@ <h1 id="alarm-title"></h1>
<li class="singleline">
<span class="view-alarm-lbl" data-l10n-id="sound">Sound</span>
<select id="sound-select" class="abstract-menu">
- <option value="classic_buzz.ogg" data-l10n-id="classic_buzz">Classic Buzz</option>
- <option value="classic_pulse.ogg" data-l10n-id="classic_pulse">Classic Pulse</option>
- <option value="classic_pulse_progressive.ogg" data-l10n-id="classic_pulse_progressive">Classic Progressive</option>
- <option value="alarm_gem_echoes.ogg" data-l10n-id="alarm_gem_echoes">Gem Echoes</option>
- <option value="alarm_into_the_void.ogg" data-l10n-id="alarm_into_the_void">Into the Void</option>
- <option value="alarm_ringing_strings.ogg" data-l10n-id="alarm_ringing_strings">Ringing Strings</option>
- <option value="alarm_shimmering_waves.ogg" data-l10n-id="alarm_shimmering_waves">Shimmering Waves</option>
- <option value="alarm_smooth_strings.ogg" data-l10n-id="alarm_smooth_strings">Smooth Strings</option>
+ <option value="ac_classic_clock_alarm.opus" data-l10n-id="ac_classic_clock_alarm_opus"></option>
+ <option value="ac_classic_clock_alarm_prog.opus" data-l10n-id="ac_classic_clock_alarm_prog_opus"></option>
+ <option value="ac_classic_clock_radio.opus" data-l10n-id="ac_classic_clock_radio_opus"></option>
+ <option value="ac_normal_gem_echoes.opus" data-l10n-id="ac_normal_gem_echoes_opus"></option>
+ <option value="ac_normal_ringing_strings.opus" data-l10n-id="ac_normal_ringing_strings_opus"></option>
+ <option value="ac_soft_humming_waves.opus" data-l10n-id="ac_soft_humming_waves_opus"></option>
+ <option value="ac_soft_into_the_void.opus" data-l10n-id="ac_soft_into_the_void_opus"></option>
+ <option value="ac_soft_smooth_strings.opus" data-l10n-id="ac_soft_smooth_strings_opus"></option>
</select>
<a id="sound-menu" class="abstract-menu">Classic</a>
<p></p>
View
@@ -789,7 +789,7 @@ var AlarmEditView = {
minute: now.getMinutes(), // use current minute
enabled: true,
repeat: '0000000',
- sound: 'classic_buzz.ogg',
+ sound: 'ac_classic_clock_alarm.opus',
snooze: 5,
color: 'Darkorange'
};
@@ -863,9 +863,9 @@ var AlarmEditView = {
},
refreshSoundMenu: function aev_refreshSoundMenu(sound) {
- // Refresh and paser the name of sound file for sound menu.
+ // Refresh and parse the name of sound file for sound menu.
var sound = (sound) ? this.getSoundSelect() : this.alarm.sound;
- this.soundMenu.innerHTML = _(sound.slice(0, sound.lastIndexOf('.')));
+ this.soundMenu.innerHTML = _(sound.replace('.', '_'));
},
previewSound: function aev_previewSound() {
@@ -878,7 +878,7 @@ var AlarmEditView = {
}
var ringtoneName = this.getSoundSelect();
- var previewRingtone = 'style/ringtones/' + ringtoneName;
+ var previewRingtone = 'shared/resources/media/alarms/' + ringtoneName;
ringtonePlayer.mozAudioChannelType = 'alarm';
ringtonePlayer.src = previewRingtone;
ringtonePlayer.play();
View
@@ -81,7 +81,7 @@ var RingView = {
var ringtonePlayer = this._ringtonePlayer;
ringtonePlayer.mozAudioChannelType = 'alarm';
ringtonePlayer.loop = true;
- var selectedAlarmSound = 'style/ringtones/' +
+ var selectedAlarmSound = 'shared/ringtones/media/alarms/' +
window.opener.AlarmManager.getAlarmSound();
ringtonePlayer.src = selectedAlarmSound;
ringtonePlayer.play();
@@ -0,0 +1,8 @@
+ac_classic_clock_alarm_opus = Classic Buzz
+ac_classic_clock_alarm_prog_opus = Classic Pulse Progressive
+ac_classic_clock_radio_opus = Classic Pulse
+ac_normal_gem_echoes_opus = Gem Echoes
+ac_soft_smooth_strings_opus = Smooth Strings
+ac_soft_humming_waves_opus = Shimmering Waves
+ac_normal_ringing_strings_opus = Ringing Strings
+ac_soft_into_the_void_opus = Into the Void
@@ -59,12 +59,3 @@ nRemainMinutes[two] = and <strong>{{n}} minutes</strong>
nRemainMinutes[few] = and <strong>{{n}} minutes</strong>
nRemainMinutes[many] = and <strong>{{n}} minutes</strong>
nRemainMinutes[other] = and <strong>{{n}} minutes</strong>
-
-classic_buzz = Classic Buzz
-classic_pulse = Classic Pulse
-classic_pulse_progressive = Classic Progressive
-alarm_gem_echoes = Gem Echoes
-alarm_into_the_void = Into the Void
-alarm_ringing_strings = Ringing Strings
-alarm_shimmering_waves = Shimmering Waves
-alarm_smooth_strings = Smooth Strings
@@ -1,4 +1,5 @@
@import url(clock.en-US.properties)
+@import url(alarms.en-US.properties)
[ar]
@import url(clock.ar.properties)
@@ -178,11 +178,11 @@ var OnCallHandler = (function onCallHandler() {
activePhoneSound = !!value;
});
- var selectedPhoneSound = 'style/ringtones/classic.ogg';
- SettingsListener.observe('dialer.ringtone', 'classic.ogg', function(value) {
- selectedPhoneSound = 'style/ringtones/' + value;
+ var selectedPhoneSound = '';
+ SettingsListener.observe('dialer.ringtone', '', function(value) {
+ selectedPhoneSound = value;
ringtonePlayer.pause();
- ringtonePlayer.src = selectedPhoneSound;
+ ringtonePlayer.src = value;
if (ringing) {
ringtonePlayer.play();
@@ -338,7 +338,7 @@ var OnCallHandler = (function onCallHandler() {
}, 600);
}
- if (activePhoneSound && selectedPhoneSound) {
+ if (activePhoneSound) {
ringtonePlayer.play();
ringing = true;
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
View
@@ -804,44 +804,16 @@ <h1 data-l10n-id="select-tone"> Select a Tone </h1>
<header>
<h2 data-l10n-id="ring-tones">Ringtones</h2>
</header>
- <ul>
- <li>
- <label>
- <input type="radio" name="tone-option" data-ignore value="classic.ogg" data-label="Classic" checked />
- <span></span>
- </label>
- <a data-l10n-id="classic">Classic</a>
- </li>
- <li>
- <label>
- <input type="radio" name="tone-option" data-ignore value="old_school.ogg" data-label="Old School" />
- <span></span>
- </label>
- <a data-l10n-id="oldSchool">Old School</a>
- </li>
- <li>
- <label>
- <input type="radio" name="tone-option" data-ignore value="low_bit.ogg" data-label="Low Bit" />
- <span></span>
- </label>
- <a data-l10n-id="lowBit">Low Bit</a>
- </li>
+ <ul id="ringtones-list">
</ul>
<header>
<h2 data-l10n-id="alert-tones">Alert Tones</h2>
</header>
- <ul>
- <li>
- <label>
- <input type="radio" name="tone-option" data-ignore value="sms.wav" data-label="Beep Beep" />
- <span></span>
- </label>
- <a data-l10n-id="beep">Beep Beep</a>
- </li>
+ <ul id="notifications-list">
</ul>
- <audio style="display: none;" src="resources/ringtones/classic.ogg"></audio>
+ <audio style="display: none;" src=""></audio>
-->
</section>
@@ -896,7 +868,7 @@ <h2 data-l10n-id="tones">Tones</h2>
<ul>
<li>
<span data-l10n-id="ringer">Ringer
- <button id="call-tone-selection" class="tone-select">Old School</button>
++ <button id="call-tone-selection" class="tone-select" data-l10n-id="change"></button>
</span>
</li>
</ul>
Oops, something went wrong.

0 comments on commit 9b2cdf4

Please sign in to comment.