diff options
-rw-r--r-- | Android.bp | 3 | ||||
-rw-r--r-- | res/values/config.xml | 4 | ||||
-rw-r--r-- | src/com/android/se/SecureElementService.java | 6 |
3 files changed, 9 insertions, 4 deletions
@@ -42,9 +42,6 @@ android_app { "src/**/*.java", ":statslog-secure-element-java-gen", ], - vintf_fragments: [ - "secure_element-service.xml", - ], platform_apis: true, certificate: "platform", static_libs: ["android.hardware.secure_element-V1.0-java", diff --git a/res/values/config.xml b/res/values/config.xml index cc310a0..5811b10 100644 --- a/res/values/config.xml +++ b/res/values/config.xml @@ -3,4 +3,8 @@ <!-- The list of AIDs are the candidate of the ARA AID in ESE. The first available AID will be taken as the ARA AID. --> <string-array name="config_ara_aid_candidate_list_ese" translatable="false" /> + + <!-- To enable vendor stable service, set this to true and + make sure its vntf manifest entry is also configured. --> + <bool name="secure_element_vintf_enabled">false</bool> </resources> diff --git a/src/com/android/se/SecureElementService.java b/src/com/android/se/SecureElementService.java index a493767..2742fb4 100644 --- a/src/com/android/se/SecureElementService.java +++ b/src/com/android/se/SecureElementService.java @@ -191,7 +191,11 @@ public final class SecureElementService extends Service { initialize(); createTerminals(); - ServiceManager.addService(VSTABLE_SECURE_ELEMENT_SERVICE, mSecureElementServiceBinderVntf); + // Add vendor stable service only if it is configured + if (getResources().getBoolean(R.bool.secure_element_vintf_enabled)) { + ServiceManager.addService(VSTABLE_SECURE_ELEMENT_SERVICE, + mSecureElementServiceBinderVntf); + } // Since ISecureElementService is marked with VINTF stability // to use this same interface within the system partition, will use |