am 7bcd2c62: New API added in NfcAdapter to enable/disable SE card emulation
* commit '7bcd2c62ebfad640e8082c1dc700c9d8c57aba81': New API added in NfcAdapter to enable/disable SE card emulation
This commit is contained in:
@@ -702,4 +702,28 @@ public final class NfcAdapter {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* To change the Secure Element Card Emulation state (ON/OFF)
|
||||
* @hide
|
||||
*/
|
||||
public void changeNfcSecureElementCardEmulationState(boolean state)
|
||||
{
|
||||
int seId = 11259375;
|
||||
if(state){
|
||||
/* Enable card emulation */
|
||||
try {
|
||||
sService.selectSecureElement(seId);
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG, "Enable card emulation failed", e);
|
||||
}
|
||||
}else{
|
||||
/* Disable card emulation */
|
||||
try {
|
||||
sService.deselectSecureElement();
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG, " card emulation failed", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user