From 9d0717a1d4c8664ce1a7b9362ddbc335fb9f516a Mon Sep 17 00:00:00 2001 From: zhangzezhong Date: Tue, 3 Jun 2025 10:14:35 +0800 Subject: [PATCH] add Configuration Signed-off-by: zhangzezhong --- .../ets/@ohos.app.ability.Configuration.ets | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 frameworks/ets/ets/@ohos.app.ability.Configuration.ets diff --git a/frameworks/ets/ets/@ohos.app.ability.Configuration.ets b/frameworks/ets/ets/@ohos.app.ability.Configuration.ets new file mode 100644 index 00000000000..e9db058b47f --- /dev/null +++ b/frameworks/ets/ets/@ohos.app.ability.Configuration.ets @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2025 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 ConfigurationConstant from '@ohos.app.ability.ConfigurationConstant'; + +export interface Configuration { + language?: string; + colorMode?: ConfigurationConstant.ColorMode; + direction?: ConfigurationConstant.Direction; + screenDensity?: ConfigurationConstant.ScreenDensity; + displayId?: number; + hasPointerDevice?: boolean; + fontId?: string; + fontSizeScale?: number; + fontWeightScale?: number; + mcc?: string; + mnc?: string; +} + +class ConfigurationImpl implements Configuration { + language?: string; + colorMode?: ConfigurationConstant.ColorMode; + direction?: ConfigurationConstant.Direction; + screenDensity?: ConfigurationConstant.ScreenDensity; + displayId?: number; + hasPointerDevice?: boolean; + fontId?: string; + fontSizeScale?: number; + fontWeightScale?: number; + mcc?: string; + mnc?: string; +} -- Gitee