|
两步走:
1、删除源码目录下applications\standard\hap下的SystemUI-ScreenLock.hap
2、删除修改源码目录下applications\standard\hap\BUILD.gn里的部分代码
(1)、删除或注释掉 预置SystemUI-ScreenLock.hap的相关代码,如下所示
ohos_prebuilt_etc("screenLock_hap") {
source = "SystemUI-ScreenLock.hap"
module_install_dir = "app/com.ohos.systemui"
part_name = "prebuilt_hap"
subsystem_name = "applications"
}
(2)删除或注释与Screenlock的依赖,如下列代码中的红色部分
group("hap") {
deps = [
":calendarData_hap",
":printspooler_hap",
":systemDialog_hap",
":updateapp_hap",
"//applications/standard/hap:calc_demo_hap",
"//applications/standard/hap:callUI_hap",
"//applications/standard/hap:camera_hap",
"//applications/standard/hap:capture.ogg",
"//applications/standard/hap:certificate_manager_hap",
"//applications/standard/hap:clock_demo_hap",
"//applications/standard/hap:contacts_hap",
"//applications/standard/hap:demo.wav",
"//applications/standard/hap:downloadTemplate.abc",
"//applications/standard/hap:downloadTemplate.js",
"//applications/standard/hap:dropdownPanel_hap",
"//applications/standard/hap:dynamic.wav",
"//applications/standard/hap:external.json",
"//applications/standard/hap:filepicker_hap",
"//applications/standard/hap:kika_input_hap",
"//applications/standard/hap:launcher_hap",
"//applications/standard/hap:launcher_settings_hap",
"//applications/standard/hap:mms_hap",
"//applications/standard/hap:mobileDataSettings_hap",
"//applications/standard/hap:music_demo_hap",
"//applications/standard/hap:navigationBar_hap",
"//applications/standard/hap:note_hap",
"//applications/standard/hap:notificationManagement_hap",
"//applications/standard/hap:photos_hap",
#"//applications/standard/hap:screenLock_hap",
"//applications/standard/hap:screen_shot_hap",
"//applications/standard/hap:settingsData_hap",
"//applications/standard/hap:settings_faceauth_hap",
"//applications/standard/hap:settings_hap",
"//applications/standard/hap:statusBar_hap",
"//applications/standard/hap:systemui_hap",
"//applications/standard/hap:volumePanel_hap",
]
if (defined(product_name) && product_name == "watchos") {
deps -= [
":calendarData_hap",
":printspooler_hap",
":systemDialog_hap",
":updateapp_hap",
"//applications/standard/hap:calc_demo_hap",
"//applications/standard/hap:callUI_hap",
"//applications/standard/hap:camera_hap",
"//applications/standard/hap:capture.ogg",
"//applications/standard/hap:certificate_manager_hap",
"//applications/standard/hap:contacts_hap",
"//applications/standard/hap:demo.wav",
"//applications/standard/hap:downloadTemplate.abc",
"//applications/standard/hap:downloadTemplate.js",
"//applications/standard/hap:dropdownPanel_hap",
"//applications/standard/hap:dynamic.wav",
"//applications/standard/hap:external.json",
"//applications/standard/hap:kika_input_hap",
"//applications/standard/hap:mms_hap",
"//applications/standard/hap:mobileDataSettings_hap",
"//applications/standard/hap:music_demo_hap",
"//applications/standard/hap:navigationBar_hap",
"//applications/standard/hap:notificationManagement_hap",
"//applications/standard/hap:photos_hap",
#"//applications/standard/hap:screenLock_hap",
"//applications/standard/hap:screen_shot_hap",
"//applications/standard/hap:settingsData_hap",
"//applications/standard/hap:settings_faceauth_hap",
"//applications/standard/hap:settings_hap",
"//applications/standard/hap:statusBar_hap",
"//applications/standard/hap:systemui_hap",
"//applications/standard/hap:volumePanel_hap",
]
} else if (defined(product_name) && product_name == "rk3568") {
deps +=
[ "//applications/standard/admin_provisioning:adminprovisioning_hap" ]
} else if (defined(product_name) && product_name == "ohos-arm64") {
deps +=
[ "//applications/standard/admin_provisioning:adminprovisioning_hap" ]
}
}
(3)重新编译,烧录即可
参考链接:https://laval.csdn.net/658a97fb2c13685765debb5b.html
|
|