Adam Lesinski 898c13df7b Check feature bits before loading optional services
At startup, we check with PackageManager whether a system service is
available before attempting to load it. A system service is available
if its associated feature (similar to hardware features) is present.
This does not remove unavailable services from the compiled jar.

Change-Id: I13571805083aa4e65519a74acb52efd17b9fb3d7
2014-02-05 19:26:40 +00:00

46 lines
1007 B
Makefile

LOCAL_PATH:= $(call my-dir)
# merge all required services into one jar
# ============================================================
include $(CLEAR_VARS)
LOCAL_MODULE := services
LOCAL_SRC_FILES := $(call all-java-files-under,java)
LOCAL_STATIC_JAVA_LIBRARIES := \
services.core \
services.accessibility \
services.appwidget \
services.backup \
services.devicepolicy \
services.print
include $(BUILD_JAVA_LIBRARY)
# native library
# =============================================================
include $(CLEAR_VARS)
LOCAL_SRC_FILES :=
LOCAL_SHARED_LIBRARIES :=
# include all the jni subdirs to collect their sources
include $(wildcard $(LOCAL_PATH)/*/jni/Android.mk)
LOCAL_CFLAGS += -DEGL_EGLEXT_PROTOTYPES -DGL_GLEXT_PROTOTYPES
ifeq ($(WITH_MALLOC_LEAK_CHECK),true)
LOCAL_CFLAGS += -DMALLOC_LEAK_CHECK
endif
LOCAL_MODULE:= libandroid_servers
include $(BUILD_SHARED_LIBRARY)
ifeq (,$(ONE_SHOT_MAKEFILE))
include $(call all-makefiles-under, $(LOCAL_PATH))
endif