VulpesOS/gaia/shared/test/unit/mocks/dialer/mock_keypad.js
OverSu b38dea0597 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.
2026-09-30 23:13:03 +02:00

29 lines
730 B
JavaScript
Executable file

'use strict';
/* exported MockKeypadManager */
var MockKeypadManager = {
_phoneNumber: '',
mOnMakeCall: null,
lastCalled: '15555555555',
init: function() {},
updatePhoneNumber: function khm_updatePhoneNumber(number) {
this._phoneNumber = number;
},
makeCall: function makeCall() {
if (this.mOnMakeCall) {
if (this._phoneNumber) {
this.lastCalled = this._phoneNumber;
}
this.mOnMakeCall(this._phoneNumber);
}
},
phoneNumber: function phoneNumber() {
return this._phoneNumber;
},
fetchLastCalled: function() {
this._phoneNumber = this.lastCalled;
},
render: function() {},
restorePhoneNumber: function() {},
restoreAdditionalContactInfo: function() {}
};