From bfd4e3b02d2b09bd922ccc056081189bc5bd87ad Mon Sep 17 00:00:00 2001 From: njupthan Date: Fri, 21 Jan 2022 16:26:28 +0000 Subject: [PATCH] Add update configuration d.ts Signed-off-by: njupthan --- api/@ohos.application.Configuration.d.ts | 34 +++++++++++++++++++ api/@ohos.application.abilityManager.d.ts | 40 +++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 api/@ohos.application.Configuration.d.ts create mode 100644 api/@ohos.application.abilityManager.d.ts diff --git a/api/@ohos.application.Configuration.d.ts b/api/@ohos.application.Configuration.d.ts new file mode 100644 index 0000000000..ff9681efa8 --- /dev/null +++ b/api/@ohos.application.Configuration.d.ts @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"), + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * configuration item. + * + * @name Configuration + * @since 8 + * @sysCap AAFwk + * @devices phone, tablet, tv, wearable, car + * @permission N/A + */ +export interface Configuration { + /** + * Indicates the current language of the application. + * + * @since 8 + * @sysCap AAFwk + */ + language: string; +} + diff --git a/api/@ohos.application.abilityManager.d.ts b/api/@ohos.application.abilityManager.d.ts new file mode 100644 index 0000000000..5ced77d93e --- /dev/null +++ b/api/@ohos.application.abilityManager.d.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"), + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { AsyncCallback } from './basic'; +import Configuration from './@ohos.application.Configuration'; + +/** + * The class of an ability manager. + * + * @since 8 + * @sysCap AAFwk + * @devices phone, tablet, tv, wearable, car + * @permission N/A + */ +declare namespace abilityManager { + /** + * Updates the configuration by modifying the configuration. + * + * @devices phone, tablet, tv, wearable, car + * @since 8 + * @SysCap AAFwk + * @param config Indicates the new configuration. + * @systemapi Hide this for inner system use. + * @return - + */ + function updateConfiguration(config: Configuration, callback: AsyncCallback): void; + function updateConfiguration(config: Configuration): Promise; +} \ No newline at end of file -- Gitee