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

Commit

Permalink
Merge pull request #6850 from dscravag/nightly2
Browse files Browse the repository at this point in the history
Nightly 2012-12-06
  • Loading branch information
dscravag committed Dec 6, 2012
2 parents 60f8ed9 + 879aa74 commit 3ad4e52
Show file tree
Hide file tree
Showing 59 changed files with 972 additions and 362 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
ifneq ($(filter user userdebug, $(TARGET_BUILD_VARIANT)),)
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
CLEAN_PROFILE := 1
endif
Expand Down
6 changes: 5 additions & 1 deletion Makefile
Expand Up @@ -59,15 +59,19 @@ GAIA_DOMAIN=thisdomaindoesnotexist.org
GAIA_APP_SRCDIRS=apps showcase_apps
else ifeq ($(MAKECMDGOALS), production)
PRODUCTION=1
B2G_SYSTEM_APPS=1
endif

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

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

ifneq ($(GAIA_OUTOFTREE_APP_SRCDIRS),)
$(shell mkdir -p outoftree_apps \
$(foreach dir,$(GAIA_OUTOFTREE_APP_SRCDIRS),\
Expand Down
2 changes: 1 addition & 1 deletion apps/browser/index.html
Expand Up @@ -26,7 +26,7 @@
<form id="url-bar" novalidate>
<input type="image" id="ssl-indicator" value="" />
<input type="text" id="url-input" placeholder="Enter Search or Address"
data-l10n-id="enter-search-or-address" />
data-l10n-id="enter-search-or-address" x-inputmode="verbatim"/>
<input type="image" id="url-button" value="" />
</form>
<span id="tabs-badge"></span>
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 {
position: absolute;
width: 100%;
z-index: 10;
}

#week-view .week-events > ol.hour-allday li.event {
Expand Down
27 changes: 20 additions & 7 deletions apps/clock/js/onring.js
Expand Up @@ -36,9 +36,14 @@ var RingView = {
init: function rv_init() {
this.setAlarmTime();
this.setAlarmLabel();
this.setWakeLockEnabled(true);
this.ring();
this.vibrate();
// If mozHidden is true in init state,
// it means that alarm screen underneath the oncall screen.
// Don't let the alarm ring and vibrate.
if (!document.mozHidden) {
this.setWakeLockEnabled(true);
this.ring();
this.vibrate();
}
document.addEventListener('mozvisibilitychange', this);
this.snoozeButton.addEventListener('click', this);
this.closeButton.addEventListener('click', this);
Expand Down Expand Up @@ -107,14 +112,22 @@ var RingView = {
stopAlarmNotification: function rv_stopAlarmNotification(action) {
switch (action) {
case 'ring':
this._ringtonePlayer.pause();
if (this._ringtonePlayer)
this._ringtonePlayer.pause();

break;
case 'vibrate':
window.clearInterval(this._vibrateInterval);
if (this._vibrateInterval)
window.clearInterval(this._vibrateInterval);

break;
default:
this._ringtonePlayer.pause();
window.clearInterval(this._vibrateInterval);
if (this._ringtonePlayer)
this._ringtonePlayer.pause();

if (this._vibrateInterval)
window.clearInterval(this._vibrateInterval);

break;
}
this.setWakeLockEnabled(false);
Expand Down
9 changes: 1 addition & 8 deletions apps/communications/contacts/js/contacts_settings.js
Expand Up @@ -100,14 +100,7 @@ contacts.Settings = (function() {
return;
}

var req = conn.getCardLock('pin');
req.onsuccess = function onsucces(evt) {
enableSIMImport(!req.result.enabled);
};
req.onerror = function onerror(evt) {
console.error('Could not check if we have SIM');
enableSIMImport(false);
};
enableSIMImport(conn.cardState == 'ready');
};

// Disables/Enables the actions over the sim import functionality
Expand Down
6 changes: 3 additions & 3 deletions apps/communications/contacts/js/fb/fb_contact_utils.js
Expand Up @@ -88,10 +88,10 @@ fb.setFriendPictureUrl = function(devContact, url) {
// Adapts data to the mozContact format names
fb.friend2mozContact = function(f) {
// givenName is put as name but it should be f.first_name
f.familyName = [f.last_name ? f.last_name.trim() : f.last_name];
var middleName = f.middle_name ? f.middle_name.trim() : f.middle_name;
f.familyName = [f.last_name ? f.last_name.trim() : (f.last_name || '')];
var middleName = f.middle_name ? f.middle_name.trim() : (f.middle_name || '');
f.additionalName = middleName;
var firstName = f.first_name ? f.first_name.trim() : f.first_name;
var firstName = f.first_name ? f.first_name.trim() : (f.first_name || '');
f.givenName = [(firstName + ' ' + middleName).trim()];

delete f.last_name;
Expand Down
14 changes: 12 additions & 2 deletions apps/communications/dialer/js/handled_call.js
Expand Up @@ -85,8 +85,18 @@ HandledCall.prototype.updateCallNumber = function hc_updateCallNumber() {
var additionalInfoNode = this.additionalInfoNode;

if (!number.length) {
var _ = navigator.mozL10n.get;
node.textContent = _('unknown');
var setUnknownNumber = function() {
var _ = navigator.mozL10n.get;
node.textContent = _('unknown');
};
if (navigator.mozL10n.readyState == 'complete') {
setUnknownNumber();
} else {
window.addEventListener('localized', function onLocalized() {
window.removeEventListener('localized', onLocalized);
setUnknownNumber();
});
}
return;
}

Expand Down
2 changes: 1 addition & 1 deletion apps/communications/dialer/js/oncall.js
Expand Up @@ -166,7 +166,7 @@ var OnCallHandler = (function onCallHandler() {

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

Expand Down
23 changes: 10 additions & 13 deletions apps/communications/dialer/style/oncall.css
Expand Up @@ -87,7 +87,6 @@ html * {
top: 100%;
height: 100%;
width: 100%;
border-radius: 10px;
z-index: -1;
}

Expand All @@ -113,7 +112,6 @@ body.hidden *[data-l10n-id] {
height: 100%;
margin: 0;
border: 0;
border-radius: 10px;
background: LightGray;
-moz-transform: translateY(-100%);
z-index: 100;
Expand Down Expand Up @@ -544,25 +542,24 @@ button[disabled] .icon-keypad-visibility {
width: 100%;
height: 100%;
background-color: transparent;
font-size: 1.8rem;
}

#calls > section .numberWrapper,
#calls[data-count="1"] > section .numberWrapper {
width: -moz-calc(100% - 10rem);
height: -moz-calc(100% - 2rem);
#calls[data-count="1"] > section .numberWrapper {
height: 100%;
background-color: transparent;
}

#calls > section .numberWrapper .number,
#calls[data-count="1"] > section .numberWrapper .number{
#calls[data-count="1"] > section .numberWrapper .number,
#calls > section .numberWrapper .number.noAdditionalContactInfo,
#calls[data-count="1"] > section .numberWrapper .number.noAdditionalContactInfo {
width: 100%;
padding: 1rem 1rem 1rem 1.5rem;
font-size: 2rem;
line-height: 100%;
height: calc(100% - 1rem);
padding: 0.5rem 0;

color: white;
white-space: nowrap;
overflow: hidden;
font-size: 3.3rem;
line-height: 100%;
}

}
29 changes: 28 additions & 1 deletion apps/communications/dialer/test/unit/handled_call_test.js
Expand Up @@ -55,7 +55,8 @@ suite('dialer/handled_call', function() {
navigator.mozL10n = {
get: function get(key) {
return key;
}
},
readyState: 'complete'
};

realUtils = window.Utils;
Expand Down Expand Up @@ -342,6 +343,32 @@ suite('dialer/handled_call', function() {
});
});

suite('unknown number', function() {
test('should display unknown l10n key if available', function() {
mockCall = new MockCall('', 'incoming');
subject = new HandledCall(mockCall, fakeNode);

var numberNode = fakeNode.querySelector('.numberWrapper .number');
assert.equal(numberNode.textContent, 'unknown');
});

test('should wait for localized event if needed', function() {
navigator.mozL10n.readyState = '';

mockCall = new MockCall('', 'incoming');
subject = new HandledCall(mockCall, fakeNode);

var numberNode = fakeNode.querySelector('.numberWrapper .number');
assert.notEqual(numberNode.textContent, 'unknown');

var evtObject = document.createEvent('Event');
evtObject.initEvent('localized', false, false);
window.dispatchEvent(evtObject);

assert.equal(numberNode.textContent, 'unknown');
});
});

suite('additional information', function() {
test('check additional info updated', function() {
mockCall = new MockCall('888', 'incoming');
Expand Down
1 change: 1 addition & 0 deletions apps/communications/ftu/css/style.css
Expand Up @@ -595,6 +595,7 @@ html, body {
#browser_privacy {
padding: 1.5rem 3rem 0 3rem;
width: calc(100% - 6rem);
height: calc(100% - 3.5rem);
}

#browser_privacy img {
Expand Down

0 comments on commit 3ad4e52

Please sign in to comment.