diff --git a/runtime/main/extend/systemplugin/napi/ohos_telephony_call.js b/runtime/main/extend/systemplugin/napi/ohos_telephony_call.js index 0f7c281b7777e86f2d3bb10383997d72313a99bd..e9f0a90833040c89bf818c8b009cc9fbab3f1fb0 100644 --- a/runtime/main/extend/systemplugin/napi/ohos_telephony_call.js +++ b/runtime/main/extend/systemplugin/napi/ohos_telephony_call.js @@ -138,9 +138,27 @@ export const TransferStatus = { TRANSFER_DISABLE: 0, TRANSFER_ENABLE: 1, }; +export const CallAttributeOptions = { + accountNumber: "[PC Preview] unknow accountNumber", + speakerphoneOn: "[PC Preview] unknow speakerphoneOn", + accountId: "[PC Preview] unknow accountId", + videoState: VideoStateType, + startTime: "[PC Preview] unknow startTime", + isEcc: "[PC Preview] unknow isEcc", + callType: CallType, + callId: "[PC Preview] unknow callId", + callState: DetailedCallState, + conferenceState: ConferenceState, + status: "[PC Preview] unknow status", + number: "[PC Preview] unknow number", +} export const EmergencyNumberOptions = { slotId: "[PC Preview] unknow slotId" } +export const CallTransferResult = { + status: "[PC Preview] unknow status", + number: "[PC Preview] unknow number", +} export const DisconnectedDetails = { UNASSIGNED_NUMBER: 1, NO_ROUTE_TO_DESTINATION: 3, @@ -181,6 +199,7 @@ export function mockCall() { CallState, DialScene, RestrictionStatus, + CallTransferResult, DialType, CallRestrictionMode, dial: function (...args) { diff --git a/runtime/main/extend/systemplugin/napi/ohos_telephony_observer.js b/runtime/main/extend/systemplugin/napi/ohos_telephony_observer.js index 4c9c60af39f8e87d6c44aea9d234326fc3d8a84d..0f3ef44e09221f4fe52c54c66a5f7899ec300c9b 100644 --- a/runtime/main/extend/systemplugin/napi/ohos_telephony_observer.js +++ b/runtime/main/extend/systemplugin/napi/ohos_telephony_observer.js @@ -14,6 +14,7 @@ */ import { paramMock } from "../utils" +import { CardType, SimState } from "./ohos_telephony_sim" export const LockReason = { SIM_NONE: "[PC Preview] unknow SIM_NONE", SIM_PIN: "[PC Preview] unknow SIM_PIN", @@ -29,15 +30,14 @@ export const LockReason = { SIM_SIM_PIN: "[PC Preview] unknow SIM_SIM_PIN", SIM_SIM_PUK: "[PC Preview] unknow SIM_SIM_PUK", }; +export const SimStateData = { + type: CardType, + state: SimState, + reason: LockReason, +} export function mockObserver() { - const SimStateData = { - type: "[PC Preview] unknow type", - state: "[PC Preview] unknow state", - reason: LockReason, - } const observer = { LockReason, - SimStateData, on: function (...args) { console.warn("telephony.observer.on interface mocked in the Previewer. How this interface works on the Previewer may " + "be different from that on a real device.") diff --git a/runtime/main/extend/systemplugin/napi/ohos_telephony_radio.js b/runtime/main/extend/systemplugin/napi/ohos_telephony_radio.js index 2a12c5b556a682d6a42e8fba03d8c85d5f5b5228..56de5d38e0946b2482f59769af42ae04b657c536 100644 --- a/runtime/main/extend/systemplugin/napi/ohos_telephony_radio.js +++ b/runtime/main/extend/systemplugin/napi/ohos_telephony_radio.js @@ -116,6 +116,17 @@ export const TdscdmaCellInformation = { mcc: "[PC Preview] unknow mcc", mnc: "[PC Preview] unknow mnc", } +export const NetworkState = { + longOperatorName: "[PC Preview] unknow longOperatorName", + shortOperatorName: "[PC Preview] unknow shortOperatorName", + plmnNumeric: "[PC Preview] unknow plmnNumeric", + isRoaming: "[PC Preview] unknow isRoaming", + regState: RegState, + cfgTech: RadioTechnology, + nsaState: NsaState, + isCaActive: "[PC Preview] unknow isCaActive", + isEmergency: "[PC Preview] unknow isEmergency", +} export const NrCellInformation = { nrArfcn: "[PC Preview] unknow nrArfcn", pci: "[PC Preview] unknow pci", @@ -166,6 +177,21 @@ export const NrOptionMode = { NR_OPTION_SA_ONLY: "[PC Preview] unknow NR_OPTION_SA_ONLY", NR_OPTION_NSA_AND_SA: "[PC Preview] unknow NR_OPTION_NSA_AND_SA", }; +export const CellInformation = { + networkType: NetworkType, + isCamped: "[PC Preview] unknow isCamped", + timeStamp: "[PC Preview] unknow timeStamp", + signalInformation: SignalInformation, + data: CdmaCellInformation, +}; +export const SignalInformation = { + signalType: NetworkType, + signalLevel: "[PC Preview] unknow signalLevel", +}; +export const NetworkSearchResult = { + isNetworkSearchSuccess: "[PC Preview] unknow isNetworkSearchSuccess", + networkSearchResult: [NetworkInformation], +} export function mockRadio() { const radio = { RegState, diff --git a/runtime/main/extend/systemplugin/napi/ohos_telephony_sim.js b/runtime/main/extend/systemplugin/napi/ohos_telephony_sim.js index 72171671e0a356b75647e3d79178c99e6c77bdff..1faba27dfe213c335ecc9f0e798f53f6b10ac45b 100644 --- a/runtime/main/extend/systemplugin/napi/ohos_telephony_sim.js +++ b/runtime/main/extend/systemplugin/napi/ohos_telephony_sim.js @@ -61,6 +61,15 @@ export const CardType = { DUAL_MODE_UG_CARD: 50, SINGLE_MODE_ISIM_CARD: 60 }; +export const IccAccountInfo = { + simId: "[PC Preview] unknow simId", + slotIndex: "[PC Preview] unknow slotIndex", + isEsim: "[PC Preview] unknow isEsim", + isActive: "[PC Preview] unknow isActive", + iccId: "[PC Preview] unknow iccId", + showName: "[PC Preview] unknow showName", + showNumber: "[PC Preview] unknow showNumber", +} export const SimState = { SIM_STATE_UNKNOWN: "[PC Preview] unknow SIM_STATE_UNKNOWN", SIM_STATE_NOT_PRESENT: "[PC Preview] unknow SIM_STATE_NOT_PRESENT", @@ -73,6 +82,14 @@ export const ContactType = { GENERAL_CONTACT: 1, FIXED_DIALING: 2, }; +export const OperatorConfig = { + field: "[PC Preview] unknow field", + value: "[PC Preview] unknow value" +} +export const LockStatusResponse = { + result: "[PC Preview] unknow result", + remain: "[PC Preview] unknow remain", +} export function mockSim() { const sim = { ContactType, diff --git a/runtime/main/extend/systemplugin/napi/ohos_telephony_sms.js b/runtime/main/extend/systemplugin/napi/ohos_telephony_sms.js index a562634ec330bf6c2502aad12796f4a6da35b84a..b78411ea9422d3a6558ce83d1003a96d10ed7d47 100644 --- a/runtime/main/extend/systemplugin/napi/ohos_telephony_sms.js +++ b/runtime/main/extend/systemplugin/napi/ohos_telephony_sms.js @@ -119,6 +119,7 @@ export const MmsDeliveryInd = { to: [MmsAddress], status: "[PC Preview] unknow status", version: MmsVersionType, + messageId: "[PC Preview] unknow messageId", } export const MmsReadRecInd = { version: MmsVersionType,