summaryrefslogtreecommitdiff
path: root/src/com/android/se/SecureElementService.java
AgeCommit message (Collapse)Author
2021-09-14Merge remote-tracking branch 'nxp-oss/br_android_ncihalx_row_12' into ↵alk3pInjection
lineage-18.1 Signed-off-by: alk3pInjection <webmaster@raspii.tech> Change-Id: Ifda025f9963e067b37475cf65de4276fdaeeedd2
2020-09-08Code sync to aosp branchGanesh Deva
Sync internal branch code refactor to aosp.
2020-09-08Strengthen the robustness of concurrent operationsGanesh Deva
1. Ensure the concurrent access to mChannels in Terminal.java is protected by the same lock instance 2. Move the remove operation of mSessions into synchronized block in method of Terminal.removeSession 3. Add synchronous block protection to mChannels.add operation in SecureElementService.java
2020-09-08Allow OpenLogicalChannel with null aid for privilege appsGanesh Deva
Do not return null directly when application try to openLogicalChannel with null aid. Check if it is privilege application first.
2020-09-08Refresh terminal instances when switching between SS and DSGanesh Deva
Listen to CARRIER_CONFIG_CHANGED and reinitialize UICC terminals.
2020-06-11Refresh terminal instances when switching between SS and DSJack Yu
Listen to CARRIER_CONFIG_CHANGED and reinitialize UICC terminals. Bug: 152008670 Test: adb shell dumpsys secure_element Merged-In: I8bb13b43de6f17f0b5b82440708d90bf684ca7ec Change-Id: I8bb13b43de6f17f0b5b82440708d90bf684ca7ec
2020-06-03Allow OpenLogicalChannel with null aid for privilege appsJack Yu
Do not return null directly when application try to openLogicalChannel with null aid. Check if it is privilege application first. Bug: 157349625 Test: openLogicalChannel with null aid Merged-In: Icf7ee2b299154874f1bdd4b5b409c7df04eb831b Change-Id: Icf7ee2b299154874f1bdd4b5b409c7df04eb831b
2020-05-01{R-DP1} Unblock some operations for privilege applicationsYerriswamy
When applications with privilege permission or carrier privilege, allow basic channel access and select operation in an opened channel. Bug: 139701995 Test: build pass Change-Id: I823202b9eadf012cfdf89bde5678c01bc8f77314
2020-05-01{R-DP1} Don't retry on failure for Terminals after index 1Yerriswamy
Terminals are loaded in the onCreate, which has a limited amount of time to do work without ANRing. For DSDS, its possible that although a SIM2 ese exists in a manifest, the HAL won't be loaded if DSDS is inactive on the device. Don't allow retries when trying to fetch terminals after index 1, in case they don't actually exist. Bug: 139010988 Change-Id: I250cfed507a2805abba21e2c8ebfb025431cfb0d
2020-05-01Update License in the files having coverity changesnxf48293
2020-01-08Unblock some operations for privilege applicationsJack Yu
When applications with privilege permission or carrier privilege, allow basic channel access and select operation in an opened channel. Bug: 139701995 Test: build pass Change-Id: I823202b9eadf012cfdf89bde5678c01bc8f77314
2019-11-06Resolve JAVA warningsnxf48293
Warnings resolved: GUARDED_BY_VIOLATION, FORWARD_NULL, NULL_RETURN, CALL_SUPER
2019-08-07Don't retry on failure for Terminals after index 1Andrew Chant
Terminals are loaded in the onCreate, which has a limited amount of time to do work without ANRing. For DSDS, its possible that although a SIM2 ese exists in a manifest, the HAL won't be loaded if DSDS is inactive on the device. Don't allow retries when trying to fetch terminals after index 1, in case they don't actually exist. Bug: 139010988 Change-Id: I250cfed507a2805abba21e2c8ebfb025431cfb0d
2019-05-28{Q-DP2}: Add useful logs regarding channels and ATRGanesh Deva
Session and Terminal should output more logs helpful for the device development. This change adds logs for openBasicChannel(), openLogicalChannel() and getAtr(). New logs should be output only for debuggable build variants.
2019-03-19Add useful logs regarding channels and ATRYosuke Iwakura
Session and Terminal should output more logs helpful for the device development. This change adds logs for openBasicChannel(), openLogicalChannel() and getAtr(). New logs should be output only for debuggable build variants. Bug: 128686348 Test: Manually checked the logs. Change-Id: Ic0f3e16da9d03b46bb00053744de93d17949c0cb
2018-09-12Fix NFC service died while receiving HCI event from UICCGanesh Deva
catch illegalArguementException when UICC terminal is not available.
2018-08-07Revert "[artf555722]: DWP terminal added as part of OMAPI service."Ganesh Deva
This reverts commit e8eeaf2a3f809afdc530371b2a5129bc15a35d5f.
2018-08-07Revert "[artf581492]: DWP OMAPI is not working after NFC off and then on."Ganesh Deva
This reverts commit 51013385de2a4e6f4af3786b4339f84be0e91163.
2018-06-14DWP OMAPI is not working after NFC off and then on.Ganesh Deva
Added Broadcast listener for NFC Adapter state change. Durinf every NFC on, DWP terminal is added in OMAPI service. During Nfcoff service is de registered in NFC service.
2018-06-14DWP terminal added as part of OMAPI service.Ganesh Deva
Added delay to make sure DWP Terminal(NFC service) is up
2018-06-14(FN_AOSP->P_ROW): Code drop SecureElement OMAPI serviceSuhas Suresh
2018-04-07Receive callback when SE HAL died and obtain it againYoshiaki Naka
SecureElement application shall receive a callback when SE HAL died and attempt to obtain it again. To achieve it, the code to initialize SE HAL should be moved from SecureElementService to Terminal. Bug: 77606969 Test: Confirmed that Terminal can get SE HAL again after the accident. Change-Id: I76a02464874d82f75daec4b4b70be4211e2d19ad
2018-03-19Retry the initialization of the access control enforcerYoshiaki Naka
Even if the terminal once failed to retrieve the access rules from the secure element due to a kind of temporary failure like IO error or the lack of a logical channel available, it shall have a chance to attempt to do it again. Bug: 75236408 Test: Manually tested multiple scenarios with pseudo temporary failures. Change-Id: Id5c492b98e2f654e4fc833abb7f8a0c4e1cc4625
2018-03-13Full access should be permitted if no ARA applet exists on eSEYoshiaki Naka
Full access should be permitted if eSE does not have ARA applet. On the other hand, full access shall not be granted if it is uncertain whether access rule does not exist on the secure element. Bug: 73974445 Test: Executed manual test cases for UICC and eSE Change-Id: Id56f8dbdb153724a6fd654489acf7df751d2711c
2018-03-13Access to the default applet shall be blocked by the DUTYoshiaki Naka
OP-011 "access to the default applet is blocked by the DUT" is mandatory requirement according to GSMA NFC Handset Test Book. Bug: 73331557 Test: Confirmed that OMAPI TC 6.4.7 ID3b passed with this change. Change-Id: I0447e2763ec48a3149d2868edf8f3dd6986cb055
2018-03-12Access to the basic channel shall be blocked by the DUTYoshiaki Naka
OP-002 "access to the basic channel is blocked by the DUT" is mandatory requirement according to GSMA NFC Handset Test Book. Bug: 73331557 Test: Confirmed that OMAPI TC 6.4.6 ID7 passed with this change. Change-Id: Ic310b098227255d5653e466c052652eaf24d4244
2018-03-06IOError happened while opening channel for retrieving access rulesYoshiaki Naka
IOException shall be thrown to client application if communication problem happens between the terminal and the secure element while the terminal retrieves the access rules. That is the expected behavior described in the clause 6.2.7 (h) of Open Mobile API Specification. Bug: 74094356 Test: OMAPI TC 6.4.7 ID8 and TC 6.4.10 ID8 pass with this change. Change-Id: I5baae8356d2ab2f61b2e45647d7e6b6a297b2483
2018-02-01Open Mobile API for packages/apps/SecureElementJeremy O'Donoghue
This contribution is an implementation of the GlobalPlatform Open Mobile API for Android with some modifications to namespaces and packages to make it suitable as a core Android component. This contribution is based on: 0001-Open-Source-Contribution-of-Smartcard-Service-for-fr.patch which can be found in https://portland.source.codeaurora.org/patches/quic/la/PATCH_217881_OpenMobileAPI_20171208.tar.gz and 0001-Code-reorganization-of-Open-Mobile-API-packages-apps.patch which can be found in https://portland.source.codeaurora.org/patches/quic/la/PATCH_217881_OpenMobileAPI_20171206.tar.gz The first patch should be applied, followed by the second. The submitted patchs were originally derived from https://source.codeaurora.org/quic/la/platform/packages/apps/SmartCardService/commit/?h=LA.BF64.1.2.1&id=06ecea9abb8264049f52c7e31c0bc13330a425d5. Test: Basic functionality test on target device - Verify access rules are read from ARF on start-up - Verify that access rules are updated on refresh tag - Verify basic APDU transfer Test performed in conjunction with commit 0269d238c1fc1212c8e7eb1717b47977f8f3b1fa on frameworks/base Change-Id: Ia6c5b3657f83efa1551a067bd6aee03c68876c09 Signed-off-by: Jeremy O'Donoghue <jodonogh@codeaurora.org>