mirror of
https://gitee.com/openharmony/applications_call
synced 2024-11-23 06:19:44 +00:00
modify sdk interface
Signed-off-by: 18518779689 <litingting84@huawei.com>
This commit is contained in:
parent
d1c9eb0090
commit
c18d1edea8
@ -60,10 +60,10 @@ export default class TelephonyApi {
|
||||
* @param { number } callId - call id
|
||||
*/
|
||||
public acceptCall = function (callId) {
|
||||
call.answer(callId).then((res) => {
|
||||
LogUtils.i(TAG, prefixLog + "call.answer callId: " + JSON.stringify(callId))
|
||||
call.answerCall(callId).then((res) => {
|
||||
LogUtils.i(TAG, prefixLog + "call.answerCall callId: " + JSON.stringify(callId))
|
||||
}).catch((err) => {
|
||||
LogUtils.i(TAG, prefixLog + "call.answer catch : " + JSON.stringify(err))
|
||||
LogUtils.i(TAG, prefixLog + "call.answerCall catch : " + JSON.stringify(err))
|
||||
})
|
||||
}
|
||||
|
||||
@ -77,9 +77,9 @@ export default class TelephonyApi {
|
||||
* @param { string } msg - message string
|
||||
*/
|
||||
public rejectCall = function (callId, isSendSms = false, msg = '') {
|
||||
const rejectCallPromise = isSendSms ? call.reject(callId, {
|
||||
const rejectCallPromise = isSendSms ? call.rejectCall(callId, {
|
||||
messageContent: msg
|
||||
}) : call.reject(callId);
|
||||
}) : call.rejectCall(callId);
|
||||
rejectCallPromise.then((res) => {
|
||||
LogUtils.i(TAG, prefixLog + "then:rejectCall")
|
||||
})
|
||||
@ -96,7 +96,7 @@ export default class TelephonyApi {
|
||||
* @return { Object } promise object
|
||||
*/
|
||||
public hangUpCall = (callId) => new Promise((resolve, reject) => {
|
||||
call.hangup(callId).then((res) => {
|
||||
call.hangUpCall(callId).then((res) => {
|
||||
resolve(res);
|
||||
LogUtils.i(TAG, prefixLog + "then:hangUpCall : %s" + JSON.stringify(callId))
|
||||
}).catch((err) => {
|
||||
|
@ -63,10 +63,10 @@ export default class CallServiceProxy {
|
||||
* @param { number } callId - call id
|
||||
*/
|
||||
public acceptCall = function (callId) {
|
||||
call.answer(callId).then((res) => {
|
||||
LogUtils.i(TAG, prefixLog + "call.answer : %s" + JSON.stringify(callId))
|
||||
call.answerCall(callId).then((res) => {
|
||||
LogUtils.i(TAG, prefixLog + "call.answerCall : %s" + JSON.stringify(callId))
|
||||
}).catch((err) => {
|
||||
LogUtils.i(TAG, prefixLog + "call.answer catch : %s" + JSON.stringify(err))
|
||||
LogUtils.i(TAG, prefixLog + "call.answerCall catch : %s" + JSON.stringify(err))
|
||||
});
|
||||
};
|
||||
|
||||
@ -80,9 +80,9 @@ export default class CallServiceProxy {
|
||||
* @param { string } msg - message string
|
||||
*/
|
||||
public rejectCall = function (callId, isSendSms = false, msg = '') {
|
||||
const rejectCallPromise = isSendSms ? call.reject(callId, {
|
||||
const rejectCallPromise = isSendSms ? call.rejectCall(callId, {
|
||||
messageContent: msg
|
||||
}) : call.reject(callId);
|
||||
}) : call.rejectCall(callId);
|
||||
rejectCallPromise.then((res) => {
|
||||
LogUtils.i(TAG, prefixLog + "then:rejectCall")
|
||||
})
|
||||
@ -99,7 +99,7 @@ export default class CallServiceProxy {
|
||||
* @return { Object } promise object
|
||||
*/
|
||||
public hangUpCall = (callId) => new Promise((resolve, reject) => {
|
||||
call.hangup(callId).then((res) => {
|
||||
call.hangUpCall(callId).then((res) => {
|
||||
resolve(res);
|
||||
LogUtils.i(TAG, prefixLog + "then:hangUpCall : %s" + JSON.stringify(callId))
|
||||
}).catch((err) => {
|
||||
|
@ -12,6 +12,12 @@
|
||||
"deliveryWithInstall": true,
|
||||
"installationFree": false,
|
||||
"pages": "$profile:main_pages",
|
||||
"metadata": [
|
||||
{
|
||||
"name": "ArkTSPartialUpdate",
|
||||
"value": "false"
|
||||
}
|
||||
],
|
||||
"uiSyntax": "ets",
|
||||
"abilities": [
|
||||
{
|
||||
|
@ -27,6 +27,12 @@
|
||||
"deliveryWithInstall": true,
|
||||
"installationFree": false,
|
||||
"pages": "$profile:main_pages",
|
||||
"metadata": [
|
||||
{
|
||||
"name": "ArkTSPartialUpdate",
|
||||
"value": "false"
|
||||
}
|
||||
],
|
||||
"uiSyntax": "ets",
|
||||
"abilities": [
|
||||
{
|
||||
|
@ -12,6 +12,12 @@
|
||||
"deliveryWithInstall": true,
|
||||
"installationFree": false,
|
||||
"pages": "$profile:main_pages",
|
||||
"metadata": [
|
||||
{
|
||||
"name": "ArkTSPartialUpdate",
|
||||
"value": "false"
|
||||
}
|
||||
],
|
||||
"abilities": [
|
||||
{
|
||||
"name": "com.ohos.mobiledatasettings.MainAbility",
|
||||
|
@ -27,6 +27,12 @@
|
||||
"deliveryWithInstall": true,
|
||||
"installationFree": false,
|
||||
"pages": "$profile:main_pages",
|
||||
"metadata": [
|
||||
{
|
||||
"name": "ArkTSPartialUpdate",
|
||||
"value": "false"
|
||||
}
|
||||
],
|
||||
"abilities": [
|
||||
{
|
||||
"name": "com.ohos.mobiledatasettings.MainAbility",
|
||||
|
Loading…
Reference in New Issue
Block a user