android-自定义Luncher2

谷歌自带的Luncher2位于packages\apps\Launcher2,但是客户需要自定义Luncher2,在原Luncher2上修改总是不太好的。那么,最好就是自己定义的放在device/.../../custom_Luncher2/目录下,通过Android.mk控制使用自定义的Luncher2。

原packages\apps\Launcher2\Android.mk修改如下:

ifeq ($(BOARD_USE_DEFAULT_LAUNCHER2),true)

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_STATIC_JAVA_LIBRARIES := android-common
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := Launcher2
LOCAL_CERTIFICATE := shared

LOCAL_OVERRIDES_PACKAGES := Home
LOCAL_PROGUARD_FLAGS := -include $(LOCAL_PATH)/proguard.flags

include $(BUILD_PACKAGE)
endif

在device/../../Boardconfig.mk中添加变量BOARD_USE_DEFAULT_LAUNCHER2 := false就OK了!在device/.../../custom_Luncher2/Android.mk中自然为ifeq ($(BOARD_USE_DEFAULT_LAUNCHER2),false)咯!

你可能感兴趣的:(java,Module,Build,Path,include,tags)