add param bootanimation.ready in bootanimation init

Signed-off-by: chenq <chenqiang157@huawei.com>
This commit is contained in:
chenq 2024-02-06 11:01:33 +08:00
parent f03c511609
commit af6f4f4bd7
4 changed files with 27 additions and 0 deletions

View File

@ -20,6 +20,7 @@ group("default") {
if (graphic_2d_feature_bootanimation_enable) {
public_deps += [ "frameworks/bootanimation:bootanimation" ]
public_deps += [ "frameworks/bootanimation:bootanimation_para" ]
public_deps += [ "frameworks/bootanimation:bootanimation_pics" ]
public_deps += [ "frameworks/bootanimation:bootanimation_sounds" ]
public_deps += [ "frameworks/bootanimation:bootanimation_video" ]

View File

@ -120,4 +120,14 @@ ohos_prebuilt_etc("bootanimation_video") {
part_name = "graphic_2d"
subsystem_name = "graphic"
}
## Install boot animation resource to /system/etc/graphic/ }}}
## Install boot animation para to /system/etc/param/ {{{
ohos_prebuilt_etc("bootanimation_para") {
source = "etc/bootanimation.para"
relative_install_dir = "param"
part_name = "graphic_2d"
subsystem_name = "graphic"
}
## Install boot animation para to /system/etc/param/ }}}

View File

@ -0,0 +1,14 @@
# Copyright (c) 2024 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.
bootevent.bootanimation.ready=false

View File

@ -210,6 +210,8 @@ void BootAnimation::InitRsSurfaceNode()
OHOS::Rosen::RSTransaction::FlushImplicitTransaction();
rsSurfaceNode_->AttachToDisplay(defaultId_);
OHOS::Rosen::RSTransaction::FlushImplicitTransaction();
system::SetParameter("bootevent.bootanimation.ready", "true");
LOGI("Set bootevent.bootanimation.ready true");
}
void BootAnimation::InitRsSurface()