From 898c13df7b9b12ff10062f3542593e12fbe0c119 Mon Sep 17 00:00:00 2001 From: Adam Lesinski Date: Tue, 28 Jan 2014 15:34:50 -0800 Subject: 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 --- services/backup/Android.mk | 12 ++++++++++++ services/backup/java/service.mk | 11 ----------- 2 files changed, 12 insertions(+), 11 deletions(-) create mode 100644 services/backup/Android.mk delete mode 100644 services/backup/java/service.mk (limited to 'services/backup') diff --git a/services/backup/Android.mk b/services/backup/Android.mk new file mode 100644 index 0000000..3e686d1 --- /dev/null +++ b/services/backup/Android.mk @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_MODULE := services.backup + +LOCAL_SRC_FILES += \ + $(call all-java-files-under,java) + +LOCAL_JAVA_LIBRARIES := services.core + +include $(BUILD_STATIC_JAVA_LIBRARY) diff --git a/services/backup/java/service.mk b/services/backup/java/service.mk deleted file mode 100644 index bd22b95..0000000 --- a/services/backup/java/service.mk +++ /dev/null @@ -1,11 +0,0 @@ -# Include only if the service is required -ifneq ($(findstring backup,$(REQUIRED_SERVICES)),) - -SUB_DIR := backup/java - -LOCAL_SRC_FILES += \ - $(call all-java-files-under,$(SUB_DIR)) - -#DEFINED_SERVICES += com.android.server.backup.BackupManagerService - -endif -- cgit v1.1