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 #31904 from jessi3py/bug-1200937
Browse files Browse the repository at this point in the history
Bug 1200937 - APN Settings: support reading 'mtu' field from apn database, r=gasolin
  • Loading branch information
gasolin committed Sep 21, 2015
2 parents 899860a + 1ab8ba4 commit c8eb5b2
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 15 deletions.
4 changes: 4 additions & 0 deletions apps/settings/elements/apn_editor.html
Expand Up @@ -78,6 +78,10 @@ <h1 data-l10n-id="apn-editor-header"></h1>
</select>
</span>
</li>
<li>
<p data-l10n-id="apn-mtu"></p>
<input type="number" x-inputmode="digits" class="mtu" dir="auto" />
</li>
</ul>
<ul class="apnSettings-btns">
<li class="delete">
Expand Down
2 changes: 1 addition & 1 deletion apps/settings/js/modules/apn/apn_const.js
Expand Up @@ -26,7 +26,7 @@ define(function(require) {
var APN_PROPS = [
'carrier', 'apn', 'user', 'passwd', 'httpproxyhost', 'httpproxyport',
'mmsc', 'mmsproxy', 'mmsport', 'authtype', 'types', 'protocol',
'roaming_protocol',
'roaming_protocol', 'mtu',
/**
* _id is an internal property for identifying apn items received via
* client provisioning.
Expand Down
3 changes: 2 additions & 1 deletion apps/settings/js/panels/apn_editor/apn_editor_const.js
Expand Up @@ -16,7 +16,8 @@ define(function(require) {
'authtype': 'notDefined',
'types': ['default'],
'protocol': 'notDefined',
'roaming_protocol': 'notDefined'
'roaming_protocol': 'notDefined',
'mtu' : ''
};

var APN_PROPERTIES = Object.keys(APN_PROPERTY_DEFAULTS);
Expand Down
1 change: 1 addition & 0 deletions apps/settings/locales/settings.en-US.properties
Expand Up @@ -445,6 +445,7 @@ apn-protocol-ip = IPv4
apn-protocol-ipv6 = IPv6
apn-protocol-ipv4v6 = IPv4/IPv6
apn-type = APN Type
apn-mtu = MTU
dataConnection-warning-head=Turn ON data connection?
dataConnection-warning-message=Applications will automatically fetch data via data connection when required. Additional data charges may apply.
dataRoaming-warning-head=Turn ON data roaming?
Expand Down
18 changes: 12 additions & 6 deletions apps/system/js/operator_variant_handler.js
Expand Up @@ -270,7 +270,8 @@
'ril.data.passwd': 'password',
'ril.data.httpProxyHost': 'proxy',
'ril.data.httpProxyPort': 'port',
'ril.data.authtype': 'authtype'
'ril.data.authtype': 'authtype',
'ril.data.mtu': 'mtu'
},
'supl': {
'ril.supl.carrier': 'carrier',
Expand All @@ -279,7 +280,8 @@
'ril.supl.passwd': 'password',
'ril.supl.httpProxyHost': 'proxy',
'ril.supl.httpProxyPort': 'port',
'ril.supl.authtype': 'authtype'
'ril.supl.authtype': 'authtype',
'ril.supl.mtu': 'mtu'
},
'mms': {
'ril.mms.carrier': 'carrier',
Expand All @@ -291,7 +293,8 @@
'ril.mms.mmsc': 'mmsc',
'ril.mms.mmsproxy': 'mmsproxy',
'ril.mms.mmsport': 'mmsport',
'ril.mms.authtype': 'authtype'
'ril.mms.authtype': 'authtype',
'ril.mms.mtu': 'mtu'
},
'dun': {
'ril.dun.carrier': 'carrier',
Expand All @@ -300,7 +303,8 @@
'ril.dun.passwd': 'password',
'ril.dun.httpProxyHost': 'proxy',
'ril.dun.httpProxyPort': 'port',
'ril.dun.authtype': 'authtype'
'ril.dun.authtype': 'authtype',
'ril.dun.mtu': 'mtu'
},
'ims': {
'ril.ims.carrier': 'carrier',
Expand All @@ -309,7 +313,8 @@
'ril.ims.passwd': 'password',
'ril.ims.httpProxyHost': 'proxy',
'ril.ims.httpProxyPort': 'port',
'ril.ims.authtype': 'authtype'
'ril.ims.authtype': 'authtype',
'ril.ims.mtu': 'mtu'
},
'fota': {
'ril.fota.carrier': 'carrier',
Expand All @@ -318,7 +323,8 @@
'ril.fota.passwd': 'password',
'ril.fota.httpProxyHost': 'proxy',
'ril.fota.httpProxyPort': 'port',
'ril.fota.authtype': 'authtype'
'ril.fota.authtype': 'authtype',
'ril.fota.mtu': 'mtu'
},
'operatorvariant': {
'ril.iccInfo.mbdn': 'voicemail',
Expand Down
16 changes: 15 additions & 1 deletion apps/system/test/unit/operator_variant_handler_test.js
Expand Up @@ -59,32 +59,45 @@ suite('Operator variant', function() {
{ key: 'ril.data.httpProxyHost', value: '127.0.0.1' },
{ key: 'ril.data.httpProxyPort', value: '8080' },
{ key: 'ril.data.authtype', value: 'none' },
{ key: 'ril.data.mtu', value: '1440' },
{ key: 'ril.supl.carrier', value: 'Test Network' },
{ key: 'ril.supl.apn', value: 'internet' },
{ key: 'ril.supl.user', value: 'user' },
{ key: 'ril.supl.passwd', value: 'password' },
{ key: 'ril.supl.httpProxyHost', value: '127.0.0.1' },
{ key: 'ril.supl.httpProxyPort', value: '8080' },
{ key: 'ril.supl.authtype', value: 'none' },
{ key: 'ril.supl.mtu', value: '1440' },
{ key: 'ril.dun.carrier', value: 'Test Network' },
{ key: 'ril.dun.apn', value: 'internet' },
{ key: 'ril.dun.user', value: 'user' },
{ key: 'ril.dun.passwd', value: 'password' },
{ key: 'ril.dun.httpProxyHost', value: '127.0.0.1' },
{ key: 'ril.dun.httpProxyPort', value: '8080' },
{ key: 'ril.dun.authtype', value: 'none' },
{ key: 'ril.dun.mtu', value: '1440' },
{ key: 'ril.ims.carrier', value: 'Test Network' },
{ key: 'ril.ims.apn', value: 'internet' },
{ key: 'ril.ims.user', value: 'user' },
{ key: 'ril.ims.passwd', value: 'password' },
{ key: 'ril.ims.httpProxyHost', value: '127.0.0.1' },
{ key: 'ril.ims.httpProxyPort', value: '8080' },
{ key: 'ril.ims.authtype', value: 'none' },
{ key: 'ril.ims.mtu', value: '1440' },
{ key: 'ril.fota.carrier', value: 'Test Network' },
{ key: 'ril.fota.apn', value: 'internet' },
{ key: 'ril.fota.user', value: 'user' },
{ key: 'ril.fota.passwd', value: 'password' },
{ key: 'ril.fota.httpProxyHost', value: '127.0.0.1' },
{ key: 'ril.fota.httpProxyPort', value: '8080' },
{ key: 'ril.fota.authtype', value: 'none' },
{ key: 'ril.fota.mtu', value: '1440' },
{ key: 'ril.mms.carrier', value: 'Test Network' },
{ key: 'ril.mms.apn', value: 'internet' },
{ key: 'ril.mms.mmsc', value: 'http://127.0.0.1' },
{ key: 'ril.mms.mmsproxy', value: '127.0.0.1' },
{ key: 'ril.mms.mmsport', value: '8080' },
{ key: 'ril.mms.mtu', value: '1440' },
{ key: 'ril.data.carrier', value: 'Test Network' },
{ key: 'ril.iccInfo.mbdn', value: [ORIGINAL_VOICEMAIL_NUMBER, ''] },
{ key: 'ril.cellbroadcast.searchlist', value: '0,1,2,3' }
Expand All @@ -97,7 +110,8 @@ suite('Operator variant', function() {
{ key: 'ril.data.passwd', value: 'password' },
{ key: 'ril.data.httpProxyHost', value: '127.0.0.1' },
{ key: 'ril.data.httpProxyPort', value: '8080' },
{ key: 'ril.data.authtype', value: 'none' }
{ key: 'ril.data.authtype', value: 'none' },
{ key: 'ril.data.mtu', value: '1440' }
];

var realMozSettings, realMozIccManager;
Expand Down
18 changes: 12 additions & 6 deletions shared/resources/apn/query.js
Expand Up @@ -219,7 +219,8 @@ document.addEventListener('DOMContentLoaded', function onload() {
'ril.data.passwd': 'password',
'ril.data.httpProxyHost': 'proxy',
'ril.data.httpProxyPort': 'port',
'ril.data.authtype': 'authtype'
'ril.data.authtype': 'authtype',
'ril.data.mtu': 'mtu'
},
'supl': {
'ril.supl.carrier': 'carrier',
Expand All @@ -228,7 +229,8 @@ document.addEventListener('DOMContentLoaded', function onload() {
'ril.supl.passwd': 'password',
'ril.supl.httpProxyHost': 'proxy',
'ril.supl.httpProxyPort': 'port',
'ril.supl.authtype': 'authtype'
'ril.supl.authtype': 'authtype',
'ril.supl.mtu': 'mtu'
},
'mms': {
'ril.mms.carrier': 'carrier',
Expand All @@ -240,7 +242,8 @@ document.addEventListener('DOMContentLoaded', function onload() {
'ril.mms.mmsc': 'mmsc',
'ril.mms.mmsproxy': 'mmsproxy',
'ril.mms.mmsport': 'mmsport',
'ril.mms.authtype': 'authtype'
'ril.mms.authtype': 'authtype',
'ril.mms.mtu': 'mtu'
},
'dun': {
'ril.dun.carrier': 'carrier',
Expand All @@ -249,7 +252,8 @@ document.addEventListener('DOMContentLoaded', function onload() {
'ril.dun.passwd': 'password',
'ril.dun.httpProxyHost': 'proxy',
'ril.dun.httpProxyPort': 'port',
'ril.dun.authtype': 'authtype'
'ril.dun.authtype': 'authtype',
'ril.dun.mtu': 'mtu'
},
'ims': {
'ril.ims.carrier': 'carrier',
Expand All @@ -258,7 +262,8 @@ document.addEventListener('DOMContentLoaded', function onload() {
'ril.ims.passwd': 'password',
'ril.ims.httpProxyHost': 'proxy',
'ril.ims.httpProxyPort': 'port',
'ril.ims.authtype': 'authtype'
'ril.ims.authtype': 'authtype',
'ril.ims.mtu': 'mtu'
},
'fota': {
'ril.fota.carrier': 'carrier',
Expand All @@ -267,7 +272,8 @@ document.addEventListener('DOMContentLoaded', function onload() {
'ril.fota.passwd': 'password',
'ril.fota.httpProxyHost': 'proxy',
'ril.fota.httpProxyPort': 'port',
'ril.fota.authtype': 'authtype'
'ril.fota.authtype': 'authtype',
'ril.fota.mtu': 'mtu'
},
'operatorvariant': {
'ril.iccInfo.mbdn': 'voicemail',
Expand Down

0 comments on commit c8eb5b2

Please sign in to comment.