Skip to content

Commit

Permalink
Merge pull request mozilla-b2g#6857 from vingtetun/backout-ringtones
Browse files Browse the repository at this point in the history
Revert "Bug 807431 - [Phone] Final Ringtones Need to be Added to the Bui...
  • Loading branch information
vingtetun committed Dec 6, 2012
2 parents fd22b48 + ba07ea1 commit d7a4181
Show file tree
Hide file tree
Showing 109 changed files with 484 additions and 587 deletions.
5 changes: 5 additions & 0 deletions Android.mk
Expand Up @@ -22,6 +22,11 @@ CLEAN_PROFILE := 0
# In user (production) builds we put gaia apps in /system/b2g/webapps # In user (production) builds we put gaia apps in /system/b2g/webapps
ifneq ($(filter user userdebug, $(TARGET_BUILD_VARIANT)),) ifneq ($(filter user userdebug, $(TARGET_BUILD_VARIANT)),)
GAIA_MAKE_FLAGS += PRODUCTION=1 GAIA_MAKE_FLAGS += PRODUCTION=1
B2G_SYSTEM_APPS := 1
endif

ifeq ($(B2G_SYSTEM_APPS),1)
GAIA_MAKE_FLAGS += B2G_SYSTEM_APPS=1
GAIA_APP_INSTALL_PARENT := $(TARGET_OUT)/b2g GAIA_APP_INSTALL_PARENT := $(TARGET_OUT)/b2g
CLEAN_PROFILE := 1 CLEAN_PROFILE := 1
endif endif
Expand Down
39 changes: 26 additions & 13 deletions Makefile
Expand Up @@ -56,15 +56,19 @@ GAIA_DOMAIN=thisdomaindoesnotexist.org
GAIA_APP_SRCDIRS=apps showcase_apps GAIA_APP_SRCDIRS=apps showcase_apps
else ifeq ($(MAKECMDGOALS), production) else ifeq ($(MAKECMDGOALS), production)
PRODUCTION=1 PRODUCTION=1
B2G_SYSTEM_APPS=1
endif endif


# PRODUCTION is also set for user and userdebug B2G builds # PRODUCTION is also set for user and userdebug B2G builds
ifeq ($(PRODUCTION), 1) ifeq ($(PRODUCTION), 1)
GAIA_APP_SRCDIRS=apps GAIA_APP_SRCDIRS=apps
GAIA_INSTALL_PARENT=/system/b2g
ADB_REMOUNT=1 ADB_REMOUNT=1
endif endif


ifeq ($(B2G_SYSTEM_APPS), 1)
GAIA_INSTALL_PARENT=/system/b2g
endif

ifneq ($(GAIA_OUTOFTREE_APP_SRCDIRS),) ifneq ($(GAIA_OUTOFTREE_APP_SRCDIRS),)
$(shell mkdir -p outoftree_apps \ $(shell mkdir -p outoftree_apps \
$(foreach dir,$(GAIA_OUTOFTREE_APP_SRCDIRS),\ $(foreach dir,$(GAIA_OUTOFTREE_APP_SRCDIRS),\
Expand Down Expand Up @@ -205,7 +209,7 @@ endif
endif endif


app-makefiles: app-makefiles:
@for d in ${GAIA_APP_SRCDIRS}; \ for d in ${GAIA_APP_SRCDIRS}; \
do \ do \
for mfile in `find $$d -mindepth 2 -maxdepth 2 -name "Makefile"` ;\ for mfile in `find $$d -mindepth 2 -maxdepth 2 -name "Makefile"` ;\
do \ do \
Expand All @@ -217,19 +221,23 @@ app-makefiles:
# We duplicate manifest.webapp to manifest.webapp and manifest.json # We duplicate manifest.webapp to manifest.webapp and manifest.json
# to accommodate Gecko builds without bug 757613. Should be removed someday. # to accommodate Gecko builds without bug 757613. Should be removed someday.
webapp-manifests: install-xulrunner-sdk webapp-manifests: install-xulrunner-sdk
@echo "Generated webapps"
@mkdir -p profile/webapps @mkdir -p profile/webapps
@$(call run-js-command, webapp-manifests) @$(call run-js-command, webapp-manifests)
@#cat profile/webapps/webapps.json @cat profile/webapps/webapps.json
@echo "Done"


# Generate profile/webapps/APP/application.zip # Generate profile/webapps/APP/application.zip
webapp-zip: stamp-commit-hash install-xulrunner-sdk webapp-zip: stamp-commit-hash install-xulrunner-sdk
ifneq ($(DEBUG),1) ifneq ($(DEBUG),1)
@echo "Packaged webapps"
@rm -rf apps/system/camera @rm -rf apps/system/camera
@cp -r apps/camera 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 @cat apps/camera/index.html | sed -e 's:shared/:../shared/:' > apps/system/camera/index.html
@rm apps/system/camera/manifest.webapp @rm apps/system/camera/manifest.webapp
@mkdir -p profile/webapps @mkdir -p profile/webapps
@$(call run-js-command, webapp-zip) @$(call run-js-command, webapp-zip)
@echo "Done"
endif endif


offline-cache: webapp-manifests install-xulrunner-sdk offline-cache: webapp-manifests install-xulrunner-sdk
Expand Down Expand Up @@ -320,28 +328,33 @@ EXTENDED_PREF_FILES = \


# Generate profile/prefs.js # Generate profile/prefs.js
preferences: install-xulrunner-sdk preferences: install-xulrunner-sdk
@test -d profile || mkdir -p profile @echo "Generating prefs.js..."
test -d profile || mkdir -p profile
@$(call run-js-command, preferences) @$(call run-js-command, preferences)
@$(foreach prefs_file,$(addprefix build/,$(EXTENDED_PREF_FILES)),\ @$(foreach prefs_file,$(addprefix build/,$(EXTENDED_PREF_FILES)),\
if [ -f $(prefs_file) ]; then \ if [ -f $(prefs_file) ]; then \
cat $(prefs_file) >> profile/user.js; \ cat $(prefs_file) >> profile/user.js; \
fi; \ fi; \
) )
@echo "Done"


# Generate profile/ # Generate profile/
applications-data: install-xulrunner-sdk applications-data: install-xulrunner-sdk
@echo "Generating application data..."
test -d profile || mkdir -p profile test -d profile || mkdir -p profile
@$(call run-js-command, applications-data) @$(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 # Generate profile/extensions
EXT_DIR=profile/extensions EXT_DIR=profile/extensions
extensions: extensions:
@echo "Generating extensions..."
@mkdir -p profile @mkdir -p profile
@rm -rf $(EXT_DIR) @rm -rf $(EXT_DIR)
ifeq ($(DEBUG),1) ifeq ($(DEBUG),1)
cp -r tools/extensions $(EXT_DIR) cp -r tools/extensions $(EXT_DIR)
endif endif
@echo "Finished: Generating extensions" @echo "Done"






Expand Down Expand Up @@ -404,8 +417,8 @@ test-agent-config: test-agent-bootstrap-apps
@rm -f $(TEST_AGENT_CONFIG) @rm -f $(TEST_AGENT_CONFIG)
@touch $(TEST_AGENT_CONFIG) @touch $(TEST_AGENT_CONFIG)
@rm -f /tmp/test-agent-config; @rm -f /tmp/test-agent-config;
@# Build json array of all test files # Build json array of all test files
@for d in ${GAIA_APP_SRCDIRS}; \ for d in ${GAIA_APP_SRCDIRS}; \
do \ do \
find $$d -name '*_test.js' | sed "s:$$d/::g" >> /tmp/test-agent-config; \ find $$d -name '*_test.js' | sed "s:$$d/::g" >> /tmp/test-agent-config; \
done; done;
Expand All @@ -415,19 +428,19 @@ test-agent-config: test-agent-bootstrap-apps
sed -e ':a' -e 'N' -e '$$!ba' -e 's/\n/,\ sed -e ':a' -e 'N' -e '$$!ba' -e 's/\n/,\
/g' >> $(TEST_AGENT_CONFIG); /g' >> $(TEST_AGENT_CONFIG);
@echo ' ]}' >> $(TEST_AGENT_CONFIG); @echo ' ]}' >> $(TEST_AGENT_CONFIG);
@echo "Finished: test ui config file: $(TEST_AGENT_CONFIG)" @echo "Built test ui config file: $(TEST_AGENT_CONFIG)"
@rm -f /tmp/test-agent-config @rm -f /tmp/test-agent-config


.PHONY: test-agent-bootstrap-apps .PHONY: test-agent-bootstrap-apps
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 \ do \
mkdir -p $$d/test/unit ; \ mkdir -p $$d/test/unit ; \
mkdir -p $$d/test/integration ; \ mkdir -p $$d/test/integration ; \
cp -f $(TEST_COMMON)/test/boilerplate/_proxy.html $$d/test/unit/_proxy.html; \ 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; \ cp -f $(TEST_COMMON)/test/boilerplate/_sandbox.html $$d/test/unit/_sandbox.html; \
done done
@echo "Finished: bootstrapping test proxies/sandboxes"; @echo "Done bootstrapping test proxies/sandboxes";


# Temp make file method until we can switch # Temp make file method until we can switch
# over everything in test # over everything in test
Expand Down Expand Up @@ -488,7 +501,7 @@ lint:
# let us remove the update-offline-manifests target dependancy of the # let us remove the update-offline-manifests target dependancy of the
# default target. # default target.
stamp-commit-hash: 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; \ git log -1 --format="%H%n%at" HEAD > apps/settings/resources/gaia_commit.txt; \
else \ else \
echo 'Unknown Git commit; build date shown here.' > apps/settings/resources/gaia_commit.txt; \ echo 'Unknown Git commit; build date shown here.' > apps/settings/resources/gaia_commit.txt; \
Expand All @@ -497,7 +510,7 @@ stamp-commit-hash:


# Erase all the indexedDB databases on the phone, so apps have to rebuild them. # Erase all the indexedDB databases on the phone, so apps have to rebuild them.
delete-databases: delete-databases:
@echo 'Stopping b2g' @echo 'Stoping b2g'
$(ADB) shell stop b2g $(ADB) shell stop b2g
$(ADB) shell rm -r $(MSYS_FIX)/data/local/indexedDB/* $(ADB) shell rm -r $(MSYS_FIX)/data/local/indexedDB/*
@echo 'Starting b2g' @echo 'Starting b2g'
Expand Down Expand Up @@ -548,7 +561,7 @@ update-offline-manifests:
TARGET_FOLDER = webapps/$(BUILD_APP_NAME).$(GAIA_DOMAIN) TARGET_FOLDER = webapps/$(BUILD_APP_NAME).$(GAIA_DOMAIN)
install-gaia: profile install-gaia: profile
$(ADB) start-server $(ADB) start-server
@echo 'Stopping b2g' @echo 'Stoping b2g'
$(ADB) shell stop b2g $(ADB) shell stop b2g
$(ADB) shell rm -r $(MSYS_FIX)/cache/* $(ADB) shell rm -r $(MSYS_FIX)/cache/*


Expand Down
1 change: 1 addition & 0 deletions apps/calendar/style/week_view.css
Expand Up @@ -115,6 +115,7 @@
#week-view .week-events > ol li.event { #week-view .week-events > ol li.event {
position: absolute; position: absolute;
width: 100%; width: 100%;
z-index: 10;
} }


#week-view .week-events > ol.hour-allday li.event { #week-view .week-events > ol.hour-allday li.event {
Expand Down
19 changes: 8 additions & 11 deletions apps/clock/index.html
Expand Up @@ -11,9 +11,6 @@
<link rel="stylesheet" type="text/css" href="shared/style/headers.css"> <link rel="stylesheet" type="text/css" href="shared/style/headers.css">
<link rel="stylesheet" type="text/css" href="shared/style/switches.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 --> <!-- Localization -->
<link rel="resource" type="application/l10n" href="/shared/locales/date.ini"> <link rel="resource" type="application/l10n" href="/shared/locales/date.ini">
<link rel="resource" type="application/l10n" href="locales/locales.ini"> <link rel="resource" type="application/l10n" href="locales/locales.ini">
Expand Down Expand Up @@ -196,14 +193,14 @@ <h1 id="alarm-title"></h1>
<li class="singleline"> <li class="singleline">
<span class="view-alarm-lbl" data-l10n-id="sound">Sound</span> <span class="view-alarm-lbl" data-l10n-id="sound">Sound</span>
<select id="sound-select" class="abstract-menu"> <select id="sound-select" class="abstract-menu">
<option value="ac_classic_clock_alarm.opus" data-l10n-id="ac_classic_clock_alarm_opus"></option> <option value="classic_buzz.ogg" data-l10n-id="classic_buzz">Classic Buzz</option>
<option value="ac_classic_clock_alarm_prog.opus" data-l10n-id="ac_classic_clock_alarm_prog_opus"></option> <option value="classic_pulse.ogg" data-l10n-id="classic_pulse">Classic Pulse</option>
<option value="ac_classic_clock_radio.opus" data-l10n-id="ac_classic_clock_radio_opus"></option> <option value="classic_pulse_progressive.ogg" data-l10n-id="classic_pulse_progressive">Classic Progressive</option>
<option value="ac_normal_gem_echoes.opus" data-l10n-id="ac_normal_gem_echoes_opus"></option> <option value="alarm_gem_echoes.ogg" data-l10n-id="alarm_gem_echoes">Gem Echoes</option>
<option value="ac_normal_ringing_strings.opus" data-l10n-id="ac_normal_ringing_strings_opus"></option> <option value="alarm_into_the_void.ogg" data-l10n-id="alarm_into_the_void">Into the Void</option>
<option value="ac_soft_humming_waves.opus" data-l10n-id="ac_soft_humming_waves_opus"></option> <option value="alarm_ringing_strings.ogg" data-l10n-id="alarm_ringing_strings">Ringing Strings</option>
<option value="ac_soft_into_the_void.opus" data-l10n-id="ac_soft_into_the_void_opus"></option> <option value="alarm_shimmering_waves.ogg" data-l10n-id="alarm_shimmering_waves">Shimmering Waves</option>
<option value="ac_soft_smooth_strings.opus" data-l10n-id="ac_soft_smooth_strings_opus"></option> <option value="alarm_smooth_strings.ogg" data-l10n-id="alarm_smooth_strings">Smooth Strings</option>
</select> </select>
<a id="sound-menu" class="abstract-menu">Classic</a> <a id="sound-menu" class="abstract-menu">Classic</a>
<p></p> <p></p>
Expand Down
8 changes: 4 additions & 4 deletions apps/clock/js/alarm.js
Expand Up @@ -789,7 +789,7 @@ var AlarmEditView = {
minute: now.getMinutes(), // use current minute minute: now.getMinutes(), // use current minute
enabled: true, enabled: true,
repeat: '0000000', repeat: '0000000',
sound: 'ac_classic_clock_alarm.opus', sound: 'classic_buzz.ogg',
snooze: 5, snooze: 5,
color: 'Darkorange' color: 'Darkorange'
}; };
Expand Down Expand Up @@ -863,9 +863,9 @@ var AlarmEditView = {
}, },


refreshSoundMenu: function aev_refreshSoundMenu(sound) { refreshSoundMenu: function aev_refreshSoundMenu(sound) {
// Refresh and parse the name of sound file for sound menu. // Refresh and paser the name of sound file for sound menu.
var sound = (sound) ? this.getSoundSelect() : this.alarm.sound; var sound = (sound) ? this.getSoundSelect() : this.alarm.sound;
this.soundMenu.innerHTML = _(sound.replace('.', '_')); this.soundMenu.innerHTML = _(sound.slice(0, sound.lastIndexOf('.')));
}, },


previewSound: function aev_previewSound() { previewSound: function aev_previewSound() {
Expand All @@ -878,7 +878,7 @@ var AlarmEditView = {
} }


var ringtoneName = this.getSoundSelect(); var ringtoneName = this.getSoundSelect();
var previewRingtone = 'shared/resources/media/alarms/' + ringtoneName; var previewRingtone = 'style/ringtones/' + ringtoneName;
ringtonePlayer.mozAudioChannelType = 'alarm'; ringtonePlayer.mozAudioChannelType = 'alarm';
ringtonePlayer.src = previewRingtone; ringtonePlayer.src = previewRingtone;
ringtonePlayer.play(); ringtonePlayer.play();
Expand Down
2 changes: 1 addition & 1 deletion apps/clock/js/onring.js
Expand Up @@ -81,7 +81,7 @@ var RingView = {
var ringtonePlayer = this._ringtonePlayer; var ringtonePlayer = this._ringtonePlayer;
ringtonePlayer.mozAudioChannelType = 'alarm'; ringtonePlayer.mozAudioChannelType = 'alarm';
ringtonePlayer.loop = true; ringtonePlayer.loop = true;
var selectedAlarmSound = 'shared/ringtones/media/alarms/' + var selectedAlarmSound = 'style/ringtones/' +
window.opener.AlarmManager.getAlarmSound(); window.opener.AlarmManager.getAlarmSound();
ringtonePlayer.src = selectedAlarmSound; ringtonePlayer.src = selectedAlarmSound;
ringtonePlayer.play(); ringtonePlayer.play();
Expand Down
8 changes: 0 additions & 8 deletions apps/clock/locales/alarms.en-US.properties

This file was deleted.

9 changes: 9 additions & 0 deletions apps/clock/locales/clock.en-US.properties
Expand Up @@ -59,3 +59,12 @@ nRemainMinutes[two] = and <strong>{{n}} minutes</strong>
nRemainMinutes[few] = and <strong>{{n}} minutes</strong> nRemainMinutes[few] = and <strong>{{n}} minutes</strong>
nRemainMinutes[many] = and <strong>{{n}} minutes</strong> nRemainMinutes[many] = and <strong>{{n}} minutes</strong>
nRemainMinutes[other] = 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 change: 0 additions & 1 deletion apps/clock/locales/locales.ini
@@ -1,5 +1,4 @@
@import url(clock.en-US.properties) @import url(clock.en-US.properties)
@import url(alarms.en-US.properties)


[ar] [ar]
@import url(clock.ar.properties) @import url(clock.ar.properties)
Expand Down
Binary file added apps/clock/style/ringtones/alarm_gem_echoes.ogg
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added apps/clock/style/ringtones/classic_buzz.ogg
Binary file not shown.
Binary file added apps/clock/style/ringtones/classic_pulse.ogg
Binary file not shown.
Binary file not shown.
12 changes: 6 additions & 6 deletions apps/communications/dialer/js/oncall.js
Expand Up @@ -174,15 +174,15 @@ var OnCallHandler = (function onCallHandler() {


/* === Settings === */ /* === Settings === */
var activePhoneSound = true; var activePhoneSound = true;
SettingsListener.observe('ring.enabled', true, function(value) { SettingsListener.observe('audio.volume.notification', true, function(value) {
activePhoneSound = !!value; activePhoneSound = !!value;
}); });


var selectedPhoneSound = ''; var selectedPhoneSound = 'style/ringtones/classic.ogg';
SettingsListener.observe('dialer.ringtone', '', function(value) { SettingsListener.observe('dialer.ringtone', 'classic.ogg', function(value) {
selectedPhoneSound = value; selectedPhoneSound = 'style/ringtones/' + value;
ringtonePlayer.pause(); ringtonePlayer.pause();
ringtonePlayer.src = value; ringtonePlayer.src = selectedPhoneSound;


if (ringing) { if (ringing) {
ringtonePlayer.play(); ringtonePlayer.play();
Expand Down Expand Up @@ -338,7 +338,7 @@ var OnCallHandler = (function onCallHandler() {
}, 600); }, 600);
} }


if (activePhoneSound) { if (activePhoneSound && selectedPhoneSound) {
ringtonePlayer.play(); ringtonePlayer.play();
ringing = true; ringing = true;
} }
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit d7a4181

Please sign in to comment.