Commit Graph

19 Commits

Author SHA1 Message Date
Jack Yu
286dc55bc9 Merge "Add intent to notify applications when the secure element state changed" 2021-01-22 02:58:28 +00:00
Jack Yu
f04aa64e6d Add intent to notify applications when the secure element state changed
Bug: 175850569
Test: check broadcast intent is triggered when the secure element state
changed

Change-Id: Iaf9f6bd5e964e1e3ef559afa7adbefd2cbd8d596
2021-01-21 10:31:44 +08:00
Jack Yu
8d518bef1f Correct OMAPI OWNERS
The OMAPI is owned by NFC team.

Test: manual
Change-Id: I9792d1c9a8e35693ef6d5341ab6507f887da9228
2021-01-15 10:26:21 +08:00
Jeff Sharkey
fab0ab3c9c Improve OWNERS coverage across frameworks/base/.
As general background, OWNERS files expedite code reviews by helping
code authors quickly find relevant reviewers, and they also ensure
that stakeholders are involved in code changes in their areas.

Some teams under frameworks/base/ have been using OWNERS files
successfully for many years, and we're ready to expand them to cover
more areas.  Here's the historical coverage statistics for the last
two years of changes before these new OWNERS changes land:

-- 56% of changes are fully covered by OWNERS
-- 17% of changes are partially covered by OWNERS
-- 25% of changes have no OWNERS coverage

Working closely with team leads, we've now identified clear OWNERS on
a per-package basis, and we're using "include" directives whenever
possible to to simplify future maintenance.  With this extensive
effort, we've now improved our coverage as follows:

-- 98% of changes are fully covered by OWNERS
-- 1% of changes are partially covered by OWNERS
-- 1% of changes have no OWNERS coverage

This specific change is automatically generated by a script from
detailed ownership information confirmed by team leads.

Bug: 174932174
Test: manual
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Merged-In: I9789c97c1de8e5d962b48c29c57d82fe83729eba
Change-Id: I9789c97c1de8e5d962b48c29c57d82fe83729eba
2020-12-08 08:36:27 -07:00
Jeff Sharkey
a8cec413b6 Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Test: none
Bug: 168334533
Exempt-From-Owner-Approval: docs updates
Change-Id: I245b8d9cac722da76ea67983738a3cbb9deb68df
2020-09-14 10:00:07 -06:00
Jack Yu
1743401728 Change naming to be more specific
Change SECURE_ELEMENT_PRIVILEGED to SECURE_ELEMENT_PRIVILEGED_OPERATION.

Bug: 150877612
Test: build pass
Change-Id: I2b567c4dc978d5246b9d3d1481d395c6ad6448d0
2020-03-10 15:27:01 +08:00
Treehugger Robot
48cbd0cfbc Merge "Add a system api to reset secure element" 2020-01-23 02:00:02 +00:00
Jack Yu
7ee5c99bc7 Add a system api to reset secure element
Bug: 142495673
Test:build pass
Change-Id: Icbc94a3bc65be703152bb257d06b98fd8a8c48c8
2020-01-16 16:06:29 +00:00
Jack Yu
4f44abe8e9 New system api to get UICC terminal based on slot number
Bug: 139701995
Test: Manual
Change-Id: Ia25293ef59c6a920cd683cf59bb25022a0bcfa56
2020-01-13 16:29:50 +08:00
Jack Yu
a2f18d1b0a Do not throw exception when there is no omapi reader supported
Add cts tests to make sure the result of getReaders() aligns omapi feature
flags. Do not throw exception when there is no omapi readers.

Bug: 131062577
Test: atest CtsOmapiTestCases
Change-Id: I2ad0057adb975ffcbf9bd5d6a9788bc79bd860e3
2020-01-03 15:25:18 +08:00
Jack Yu
3fd7f89490 Do not call to SecureElement Service if device does not support any OMAPI readers
Bug: 131062577
Test: CTS OMAPI
Change-Id: Ifde59f1a25054e3e057ca7cfee93712fbdeede2a
2019-12-04 12:47:39 +00:00
Ruchi Kandoi
c46670ddbd Update the Open Mobile API version
The current implementation is inline with OMAPI version 3.3

Test: None
Bug: 64994044
Change-Id: I22f969e99f4dfc677931adf3494b47d6972d026d
2018-04-26 02:34:27 -07:00
Ruchi Kandoi
cf8bc65bca Add an Executor for the onConnectedListener
Test: Run CtsOmapiTestCases
Bug: 76448978
Change-Id: Ieb30b8935961db25bd058e1c41c127fa5a4437ff
2018-04-02 15:09:52 -07:00
Ruchi Kandoi
f0082409b5 Make OMAPI stricter
- Channel implements java.nio.Channels.Channel.
- openBasicChannel(aid) and openLogicalChannel(aid) is added back.
- Add finalizers for the classes.
- SecureElementListener -> onConnectedListener

Bug: 76448978
Test: CtsOmapiTestCases
Change-Id: I7f92c4dcb5c08a72d32ac9440872ab853badec1d
2018-03-30 23:08:42 +00:00
Ruchi Kandoi
d785fc4f6d Modify Open Mobile API to follow Android API guidelines
- Add @Nullable/@NonNull to input arguments for APIs
- Remove deprecated methods openBasicChannel(aid) and
  openLogicalChannel(aid)
- SecureElementListener is converted to a stand-alone interface
- serviceConnected() callback is renamed to onServiceConnected()

Bug: 64994044
Test: Run Cts Test
Change-Id: I503044a26a81dae8befb87fb8e8ac96d19de883b
2018-03-26 23:28:26 +00:00
Yoshiaki Naka
71dad9a276 Remove the UICC specific code from android.se.omapi
It is better to remove the UICC specific code from frameworks/base. The
code will be moved to SecureElementSession.openLogicalChannel().

Bug: 73331557
Test: Confirmed that OMAPI TC 6.4.7 ID3b passed with this change.

Change-Id: I1dda1d741306b417b1b886cdcee5ef89f86390e3
2018-03-12 14:28:00 +09:00
Ruchi Kandoi
0b0b183f24 Wrap raw binder interface into public classes
Test: Dummy application using the API
Bug: 73751309
Change-Id: If697100ed28b6b5217367d9988ed45f8baa14c34
2018-02-22 16:59:36 -08:00
Ruchi Kandoi
816a053400 Add ServiceSpecificExceptions for SecureElementService.
Open Mobile API expects NoSuchElementException and IOException to be
thrown in certain scenarios. ServiceSpecificExceptions are added to
fulfil that.

Bug: 64994044
Test: Throw fake errors and test with sample app
Change-Id: Iec5a85a5444360616d0857817f71c721f26c53bc
2018-02-01 16:27:37 -08:00
Ruchi Kandoi
a1f9401a22 Open Mobile API for frameworks/base
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_20171206.tar.gz

The submitted patch was derived from
https://source.codeaurora.org/quic/la/platform/packages/apps/SmartCardService/commit/?h=LA.BF64.1.2.1&id=06ecea9abb8264049f52c7e31c0bc13330a425d5.

Test: Sample Application; open Channels and transmit APDUs

Change-Id: Iac5206bd84798ca0fcdb504c89e1da5383012a5a
Signed-off-by: Jeremy O'Donoghue <jodonogh@codeaurora.org>
2018-01-25 18:04:17 +00:00