diff options
author | Adam Lesinski <adamlesinski@google.com> | 2014-01-28 15:34:50 -0800 |
---|---|---|
committer | Adam Lesinski <adamlesinski@google.com> | 2014-02-05 19:26:40 +0000 |
commit | 898c13df7b9b12ff10062f3542593e12fbe0c119 (patch) | |
tree | 323bc4d7da06b48af2079f44c5f8d346d265e956 /services/backup | |
parent | df88d73092c62a1a3cd2b2056ca63ae2e70cc238 (diff) | |
download | frameworks_base-898c13df7b9b12ff10062f3542593e12fbe0c119.zip frameworks_base-898c13df7b9b12ff10062f3542593e12fbe0c119.tar.gz frameworks_base-898c13df7b9b12ff10062f3542593e12fbe0c119.tar.bz2 |
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
Diffstat (limited to 'services/backup')
-rw-r--r-- | services/backup/Android.mk | 12 | ||||
-rw-r--r-- | services/backup/java/service.mk | 11 |
2 files changed, 12 insertions, 11 deletions
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 |