diff --git a/api/@ohos.application.Configuration.d.ts b/api/@ohos.application.Configuration.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ff9681efa86f38eba6bb42ebb0fdee2b3cdb1ebe --- /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 0000000000000000000000000000000000000000..5ced77d93ed97c548af8f67b02a1a760a72c33eb --- /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