Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
This commit is contained in:
parent
93e3a48004
commit
b38dea0597
25901 changed files with 9982925 additions and 369 deletions
54
gaia/apps/system/test/unit/mock_system_icc.js
Executable file
54
gaia/apps/system/test/unit/mock_system_icc.js
Executable file
|
|
@ -0,0 +1,54 @@
|
|||
'use strict';
|
||||
|
||||
/* exported MockSystemICC */
|
||||
function MockSystemICC(iccManager, mobileConnections) {
|
||||
return {
|
||||
onresponse: function() {},
|
||||
_iccManager: iccManager,
|
||||
getSIMNumber: function() {
|
||||
return 1;
|
||||
},
|
||||
responseSTKCommand: function(message, response) {
|
||||
this.onresponse(message, response);
|
||||
},
|
||||
|
||||
calculateDurationInMS: function icc_calculateDurationInMS(timeUnit,
|
||||
timeInterval) {
|
||||
var timeout = timeInterval;
|
||||
switch (timeUnit) {
|
||||
case this._iccManager.STK_TIME_UNIT_MINUTE:
|
||||
timeout *= 3600000;
|
||||
break;
|
||||
case this._iccManager.STK_TIME_UNIT_SECOND:
|
||||
timeout *= 1000;
|
||||
break;
|
||||
case this._iccManager.STK_TIME_UNIT_TENTH_SECOND:
|
||||
timeout *= 100;
|
||||
break;
|
||||
}
|
||||
return timeout;
|
||||
},
|
||||
|
||||
confirm: function icc_confirm(stkMessage, message, icons,
|
||||
timeout, callback) {
|
||||
callback(true); // User accepted the message
|
||||
},
|
||||
|
||||
alert: function() {},
|
||||
|
||||
hideViews: function() {},
|
||||
|
||||
getConnection: function(iccId) {
|
||||
return mobileConnections[iccId];
|
||||
},
|
||||
|
||||
getIcc: function(iccId){
|
||||
return iccManager.getIccById(iccId);
|
||||
},
|
||||
|
||||
discardCurrentMessageIfNeeded: function(new_message) {}
|
||||
};
|
||||
}
|
||||
|
||||
MockSystemICC.mTeardown = function() {
|
||||
};
|
||||
Loading…
Reference in a new issue