mirror of
https://gitee.com/openharmony/bundlemanager_bundle_framework
synced 2024-11-23 07:09:53 +00:00
【bundlemanager_bundle_framework】穿戴设备定制尺寸2*3 ,3*3卡片,并过滤非穿戴设备使用此定制尺寸
Signed-off-by: hqliuzhenghong@h-partners.com <hqliuzhenghong@h-partners.com>
This commit is contained in:
parent
6b8112cbb5
commit
1b9d5d9e83
@ -50,6 +50,8 @@ declare_args() {
|
||||
distributed_bundle_framework = true
|
||||
bundle_framework_overlay_install = true
|
||||
bundle_framework_bundle_resource = true
|
||||
bundle_framework_form_dimension_2_3 = false
|
||||
bundle_framework_form_dimension_3_3 = false
|
||||
|
||||
ability_runtime_enable = true
|
||||
account_enable = true
|
||||
|
@ -26,7 +26,9 @@
|
||||
"bundle_framework_default_app",
|
||||
"bundle_framework_launcher",
|
||||
"bundle_framework_sandbox_app",
|
||||
"bundle_framework_quick_fix"
|
||||
"bundle_framework_quick_fix",
|
||||
"bundle_framework_form_dimension_2_3",
|
||||
"bundle_framework_form_dimension_3_3"
|
||||
],
|
||||
"hisysevent_config": [
|
||||
"//foundation/bundlemanager/bundle_framework/hisysevent.yaml"
|
||||
|
@ -114,6 +114,13 @@ ohos_shared_library("appexecfwk_base") {
|
||||
external_deps += [ "udmf:utd_client" ]
|
||||
}
|
||||
|
||||
if (bundle_framework_form_dimension_2_3) {
|
||||
defines += [ "FORM_DIMENSION_2_3" ]
|
||||
}
|
||||
if (bundle_framework_form_dimension_3_3) {
|
||||
defines += [ "FORM_DIMENSION_3_3" ]
|
||||
}
|
||||
|
||||
public_external_deps = [
|
||||
"ability_base:base",
|
||||
"ability_base:want",
|
||||
|
@ -29,6 +29,12 @@ std::mutex g_mutex;
|
||||
|
||||
const int8_t MAX_FORM_NAME = 127;
|
||||
const int8_t DEFAULT_RECT_SHAPE = 1;
|
||||
#ifndef FORM_DIMENSION_2_3
|
||||
const int8_t DIMENSION_2_3 = 8;
|
||||
#endif
|
||||
#ifndef FORM_DIMENSION_3_3
|
||||
const int8_t DIMENSION_3_3 = 9;
|
||||
#endif
|
||||
constexpr const char* FORM_COLOR_MODE_MAP_KEY[] = {
|
||||
"auto",
|
||||
"dark",
|
||||
@ -46,7 +52,9 @@ constexpr const char* DIMENSION_MAP_KEY[] = {
|
||||
"4*4",
|
||||
"2*1",
|
||||
"1*1",
|
||||
"6*4"
|
||||
"6*4",
|
||||
"2*3",
|
||||
"3*3"
|
||||
};
|
||||
const int32_t DIMENSION_MAP_VALUE[] = {
|
||||
1,
|
||||
@ -55,7 +63,9 @@ const int32_t DIMENSION_MAP_VALUE[] = {
|
||||
4,
|
||||
5,
|
||||
6,
|
||||
7
|
||||
7,
|
||||
8,
|
||||
9
|
||||
};
|
||||
constexpr const char* SHAPE_MAP_KEY[] = {
|
||||
"rect",
|
||||
@ -353,6 +363,22 @@ bool GetMetadata(const ExtensionFormProfileInfo &form, ExtensionFormInfo &info)
|
||||
APP_LOGW("dimension invalid form %{public}s", form.name.c_str());
|
||||
continue;
|
||||
}
|
||||
|
||||
int32_t dimensionItem = DIMENSION_MAP_VALUE[i];
|
||||
#ifndef FORM_DIMENSION_2_3
|
||||
if (dimensionItem == DIMENSION_2_3) {
|
||||
APP_LOGW("dimension invalid in wearable Device form %{public}d", dimensionItem);
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef FORM_DIMENSION_3_3
|
||||
if (dimensionItem == DIMENSION_3_3) {
|
||||
APP_LOGW("dimension invalid in wearable Device form %{public}d", dimensionItem);
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
|
||||
supportDimensionSet.emplace(DIMENSION_MAP_VALUE[i]);
|
||||
}
|
||||
for (i = 0; i < len; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user