19 Commits

Author SHA1 Message Date
Jiyong Park
863f353865 Fix link-type check warning on com.android.nfc_extras
The library has been built without SDK, and is used by an app
NfcExtrasTests that is built with SDK. Such this SDK -> non-SDK
dependency has been causing link-type check warnings, which will turn
into errors soon.

This change fixes the warning by making a stub library
com.android.nfc_extras.stubs from the runtime library and let the app to
link against the stub library. Since the stubs library does not use any
private APIs, it is built with SDK.

Bug: 69899800
Test: m -j NfcExtrasTests is successful and does not show any link-type
check warning.

Merged-In: I57980ccbc9036d7cc6df114a975a384d10a2962b
Change-Id: I57980ccbc9036d7cc6df114a975a384d10a2962b
(cherry picked from commit ded4fd729b50d5298e77199194996d22d3b573cf)
2018-04-27 12:39:45 +09:00
Paul Duffin
1f0b6c816f Fixed nfc-extras build files
The com.android.nfc_extras target was including the test class.
The nfc-extras/tests/Android.mk file was not being included so
was not being built by continuous build and could not be built
using make NfcExtrasTests.

Bug: 38487370
Bug: 30188076
Test: make checkbuild
Change-Id: I17f6723b899f26de329a2e74177bd02ba864b7b2
2017-05-23 11:51:15 +01:00
Paul Duffin
ccb0445027 Prepare for removal of legacy-test from default targets
In preparation for removing junit classes from the Android API
the legacy-test target will be removed from the
TARGET_DEFAULT_JAVA_LIBRARIES. This change adds explicit
dependencies on junit and/or legacy-android-test to ensure that
modules will compile properly once it is removed.

(cherry picked from 6387604f9e672ece85e07c4bcbd7be396867f06f)

Bug: 30188076
Test: make checkbuild
Merged-In: I13e88297731253420e4e5f5291d503f13a39a156
Change-Id: I58446eb8c45d8ac2bcdbc9fa40d1321e811bdd4b
2017-01-19 09:43:05 +00:00
Ying Wang
13e3f1ca24 Clean up dist files.
Change-Id: I921267de67aaab81dbde53751bbea392a862b62b
2013-05-21 12:38:22 -07:00
Martijn Coenen
dd6b959546 Add exception types for NfcEe operations.
To allow apps to present a better UI in the
different failure cases.

Bug: 4304698
Change-Id: Ia378cc5530c1a7488f38a4be84f9fed8c2aa8c86
2013-02-12 13:43:30 -08:00
mike wakerly
f74df47fc9 NfcAdapterExtras: expose driver name.
Bug: 7276355
Change-Id: I65597f732c2ccb749f8fc5ef1793bacf5de8b592
2012-10-03 14:14:23 -07:00
Nick Pelly
09588f64a2 Fix BasicNfcEeTest java package.
It was in com.android.nfc_extras, which caused it to get bundled with
com.android.nfc_extras.jar, which caused all kinds of confusion when
trying to push new versions of the test.

It should be in com.android.nfc_extras.tests

Also fix getContext() -> getTargetContext().

Change-Id: I1e3afa150809a3ed8c4f88531f039fe7797aca1d
2011-12-09 14:35:32 -08:00
Nick Pelly
314252360b Move nfc-extras tests into frameworks/base/nfc-extras/tests.
The new NFC Extras access control allows us to run these tests
without a vendor specific certificate.

Change-Id: I9425e08e557214cf6a74276622402c5682bbaef4
2011-11-14 15:28:47 -08:00
Nick Pelly
678a7025dd Enforce 1-1 relationship between context and NfcAdapterExtras.
This fixes a bug where NfcExecutionEnvironment.close() would NPE
if you called it on a different EE to the one you opened. We now
always return the same EE in the same contet.

Change-Id: I949998dc2ee738527ee281cae46ae50ea6950a2c
2011-11-14 14:24:37 -08:00
Jeff Hamilton
bb951c8939 Changes for access control.
The package name is now required when using the
NFC extras APIs so the context is stored away
and used to derive the package name to be sent
to the NfcService.

Bug: 4515759
Change-Id: I1a3aba3fc026e0090a914b0686fc4b8dec25b927
2011-11-11 08:55:26 -08:00
Robert Tsai
15bc894aae Preserve invariant that sService is not null (although NfcAdapter.get() can return null)
Change-Id: I85fcbc5e79549835dac255ce614bd5d65d39fc25
2011-07-09 23:57:22 -07:00
mike wakerly
2f9ad8b499 Add intent actions for new firmware events.
Change-Id: I8129b7812c0d551111f0c85eacc9535a441e5453
2011-06-27 18:46:31 -07:00
Nick Pelly
17523abb45 NFC Adapter Extras API update.
Remove
o registerTearDownApdus()
o deregisterTearDownApdus()
They were already NO-OPS, and don't work in the general case.

Add
o authenticate(byte[] token)
This future proofs us for a more flexible access control scheme.

Change-Id: I4cb67ceeb63d61cbc333c9b244a96d8687402168
2011-06-17 14:51:40 -07:00
Nick Pelly
cc9ee72bd4 Implement dead service recovery in NFC extras library.
Change-Id: I4f1d714c625470df4cda2c4c9aacb8d27bfabb10
2011-04-26 16:38:00 -07:00
Jason parks
ab8f48c2ee Implement teardown script.
Change-Id: I1a3feda3b1007b08fcaa24c3f8dd21abf1efd885
2011-04-01 14:41:18 -05:00
mike wakerly
0bddf0dcfb NfcAdapterExtras: reset singleton state if initialization fails.
Change-Id: I9c319925008070cc5ea93d5dd3941c9396072a8c
2011-03-21 16:51:06 -07:00
Ying Wang
bf079216c6 Dist classes.jar with full class files inside
Instead of the final jar with classes.dex inside.

Change-Id: I2bc7eb6faedf328a93a6e2eacc4334d87761f597
2011-03-14 13:35:59 -07:00
Ying Wang
89b959b46f Dist com.android.nfc_extras.jar.
Change-Id: I409106d641a3a68ef1c6885b36d226411c8fe356
2011-03-10 18:04:54 -08:00
Nick Pelly
367f41f8f6 Implement new NFC-EE API's as shared library (frameworks/base).
Change-Id: I45c4eaf59ec78167fc236fdd59676465a5e1bcb7
2011-03-10 16:03:46 -08:00