Android 在Android.bp或Android.mk文件移除原生内置应用
1.在SystemUI或者Launcher的Android.bp文件中配置overrides
android_app {name: "SystemUI",defaults: ["platform_app_defaults"],static_libs: ["SystemUI-core",],resource_dirs: [],platform_apis: true,system_ext_specific: true,certificate: "platform",privileged: true,optimize: {proguard_flags_files: ["proguard.flags"],},libs: ["android.car","android.car.userlib","ims-common","extphonelib",],enforce_uses_libs: false,kotlincflags: ["-Xjvm-default=enable"],dxflags: ["--multi-dex"],required: ["privapp_whitelist_com.android.systemui",],overrides:["Calendar","Contacts","Dialer",],
}
2.在SystemUI或者Launcher的Android.mk文件中配置LOCAL_OVERRIDES_PACKAGES属性
\frameworks\base\packages\SystemUI/Android.mk
LOCAL_OVERRIDES_PACKAGES := Calendar Contacts Dialer