Loading core/java/android/nfc/INfcAdapter.aidl +5 −0 Original line number Diff line number Diff line /* * Copyright (c) 2015, The Linux Foundation. All rights reserved. * Not a Contribution. * * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); Loading Loading @@ -28,6 +31,7 @@ import android.nfc.INfcTag; import android.nfc.INfcCardEmulation; import android.nfc.INfcUnlockHandler; import android.os.Bundle; import android.os.IBinder; /** * @hide Loading @@ -37,6 +41,7 @@ interface INfcAdapter INfcTag getNfcTagInterface(); INfcCardEmulation getNfcCardEmulationInterface(); INfcAdapterExtras getNfcAdapterExtrasInterface(in String pkg); IBinder getNfcAdapterVendorInterface(in String vendor); int getState(); boolean disable(boolean saveState); Loading core/java/android/nfc/cardemulation/AidGroup.java +23 −4 Original line number Diff line number Diff line /* * Copyright (c) 2015, The Linux Foundation. All rights reserved. * Not a Contribution. * * Copyright (C) 2014 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.nfc.cardemulation; import java.io.IOException; Loading @@ -21,7 +40,7 @@ import android.util.Log; * * @hide */ public final class AidGroup implements Parcelable { public class AidGroup implements Parcelable { /** * The maximum number of AIDs that can be present in any one group. */ Loading @@ -29,9 +48,9 @@ public final class AidGroup implements Parcelable { static final String TAG = "AidGroup"; final List<String> aids; final String category; final String description; protected List<String> aids; protected String category; protected String description; /** * Creates a new AidGroup object. Loading core/java/android/nfc/tech/MifareClassic.java +6 −0 Original line number Diff line number Diff line /* * Copyright (C) 2015 NXP Semiconductors * The original Work has been changed by NXP Semiconductors. * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); Loading Loading @@ -173,6 +175,10 @@ public final class MifareClassic extends BasicTagTechnology { mType = TYPE_CLASSIC; mSize = SIZE_4K; break; case 0x19: mType = TYPE_CLASSIC; mSize = SIZE_2K; break; case 0x28: mType = TYPE_CLASSIC; mSize = SIZE_1K; Loading core/java/android/nfc/tech/NfcA.java +11 −2 Original line number Diff line number Diff line /* * Copyright (C) 2015 NXP Semiconductors * The original Work has been changed by NXP Semiconductors. * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); Loading Loading @@ -66,8 +68,15 @@ public final class NfcA extends BasicTagTechnology { /** @hide */ public NfcA(Tag tag) throws RemoteException { super(tag, TagTechnology.NFC_A); Bundle extras = tag.getTechExtras(TagTechnology.NFC_A); Bundle extras; mSak = 0; if(tag.hasTech(TagTechnology.MIFARE_CLASSIC)) { extras = tag.getTechExtras(TagTechnology.MIFARE_CLASSIC); mSak = extras.getShort(EXTRA_SAK); } extras = tag.getTechExtras(TagTechnology.NFC_A); mSak |= extras.getShort(EXTRA_SAK); mAtqa = extras.getByteArray(EXTRA_ATQA); } Loading Loading
core/java/android/nfc/INfcAdapter.aidl +5 −0 Original line number Diff line number Diff line /* * Copyright (c) 2015, The Linux Foundation. All rights reserved. * Not a Contribution. * * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); Loading Loading @@ -28,6 +31,7 @@ import android.nfc.INfcTag; import android.nfc.INfcCardEmulation; import android.nfc.INfcUnlockHandler; import android.os.Bundle; import android.os.IBinder; /** * @hide Loading @@ -37,6 +41,7 @@ interface INfcAdapter INfcTag getNfcTagInterface(); INfcCardEmulation getNfcCardEmulationInterface(); INfcAdapterExtras getNfcAdapterExtrasInterface(in String pkg); IBinder getNfcAdapterVendorInterface(in String vendor); int getState(); boolean disable(boolean saveState); Loading
core/java/android/nfc/cardemulation/AidGroup.java +23 −4 Original line number Diff line number Diff line /* * Copyright (c) 2015, The Linux Foundation. All rights reserved. * Not a Contribution. * * Copyright (C) 2014 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.nfc.cardemulation; import java.io.IOException; Loading @@ -21,7 +40,7 @@ import android.util.Log; * * @hide */ public final class AidGroup implements Parcelable { public class AidGroup implements Parcelable { /** * The maximum number of AIDs that can be present in any one group. */ Loading @@ -29,9 +48,9 @@ public final class AidGroup implements Parcelable { static final String TAG = "AidGroup"; final List<String> aids; final String category; final String description; protected List<String> aids; protected String category; protected String description; /** * Creates a new AidGroup object. Loading
core/java/android/nfc/tech/MifareClassic.java +6 −0 Original line number Diff line number Diff line /* * Copyright (C) 2015 NXP Semiconductors * The original Work has been changed by NXP Semiconductors. * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); Loading Loading @@ -173,6 +175,10 @@ public final class MifareClassic extends BasicTagTechnology { mType = TYPE_CLASSIC; mSize = SIZE_4K; break; case 0x19: mType = TYPE_CLASSIC; mSize = SIZE_2K; break; case 0x28: mType = TYPE_CLASSIC; mSize = SIZE_1K; Loading
core/java/android/nfc/tech/NfcA.java +11 −2 Original line number Diff line number Diff line /* * Copyright (C) 2015 NXP Semiconductors * The original Work has been changed by NXP Semiconductors. * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); Loading Loading @@ -66,8 +68,15 @@ public final class NfcA extends BasicTagTechnology { /** @hide */ public NfcA(Tag tag) throws RemoteException { super(tag, TagTechnology.NFC_A); Bundle extras = tag.getTechExtras(TagTechnology.NFC_A); Bundle extras; mSak = 0; if(tag.hasTech(TagTechnology.MIFARE_CLASSIC)) { extras = tag.getTechExtras(TagTechnology.MIFARE_CLASSIC); mSak = extras.getShort(EXTRA_SAK); } extras = tag.getTechExtras(TagTechnology.NFC_A); mSak |= extras.getShort(EXTRA_SAK); mAtqa = extras.getByteArray(EXTRA_ATQA); } Loading