nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 1 | /****************************************************************************** |
nxf24591 | dc0bc2c | 2018-02-21 17:33:08 +0530 | [diff] [blame] | 2 | * |
| 3 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | * you may not use this file except in compliance with the License. |
| 5 | * You may obtain a copy of the License at |
| 6 | * |
| 7 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | * |
| 9 | * Unless required by applicable law or agreed to in writing, software |
| 10 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | * See the License for the specific language governing permissions and |
| 13 | * limitations under the License. |
| 14 | * |
| 15 | * Copyright 2018 NXP |
| 16 | * |
| 17 | ******************************************************************************/ |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 18 | |
nxf24591 | dc0bc2c | 2018-02-21 17:33:08 +0530 | [diff] [blame] | 19 | #include <android-base/stringprintf.h> |
| 20 | #include <base/logging.h> |
| 21 | #include "PowerSwitch.h" |
| 22 | #include "RoutingManager.h" |
| 23 | #include <nativehelper/ScopedPrimitiveArray.h> |
| 24 | #include <nativehelper/ScopedUtfChars.h> |
| 25 | #include <nativehelper/ScopedLocalRef.h> |
| 26 | #include "JavaClassConstants.h" |
| 27 | #include "NfcJniUtil.h" |
| 28 | #include "config.h" |
| 29 | #include "phNxpConfig.h" |
| 30 | #include "SecureElement.h" |
| 31 | |
| 32 | using android::base::StringPrintf; |
| 33 | |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 34 | namespace android |
| 35 | { |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 36 | static const int EE_ERROR_INIT = -3; |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 37 | /******************************************************************************* |
| 38 | ** |
| 39 | ** Function: nativeNfcSecureElement_doOpenSecureElementConnection |
| 40 | ** |
| 41 | ** Description: Connect to the secure element. |
| 42 | ** e: JVM environment. |
| 43 | ** o: Java object. |
| 44 | ** |
| 45 | ** Returns: Handle of secure element. values < 0 represent failure. |
| 46 | ** |
| 47 | *******************************************************************************/ |
| 48 | static jint nativeNfcSecureElement_doOpenSecureElementConnection (JNIEnv*, jobject) |
| 49 | { |
nxf24591 | dc0bc2c | 2018-02-21 17:33:08 +0530 | [diff] [blame] | 50 | LOG(INFO) << StringPrintf("%s: Enter; ", __func__); |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 51 | bool stat = false; |
| 52 | jint secElemHandle = EE_ERROR_INIT; |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 53 | NFCSTATUS status = NFCSTATUS_FAILED; |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 54 | SecureElement &se = SecureElement::getInstance(); |
nxpandroid | 7d44e57 | 2016-08-01 19:11:04 +0530 | [diff] [blame] | 55 | |
nxf24591 | dc0bc2c | 2018-02-21 17:33:08 +0530 | [diff] [blame] | 56 | /* Tell the controller to power up to get ready for sec elem operations */ |
| 57 | PowerSwitch::getInstance ().setLevel (PowerSwitch::FULL_POWER); |
| 58 | PowerSwitch::getInstance ().setModeOn (PowerSwitch::SE_CONNECTED); |
nxpandroid | 0f06fde | 2017-08-14 11:25:28 +0530 | [diff] [blame] | 59 | |
nxf24591 | dc0bc2c | 2018-02-21 17:33:08 +0530 | [diff] [blame] | 60 | /* If controller is not routing AND there is no pipe connected, |
| 61 | then turn on the sec elem */ |
| 62 | stat = se.activate(SecureElement::ESE_ID); // It is to get the current activated handle. |
nxpandroid | 0f06fde | 2017-08-14 11:25:28 +0530 | [diff] [blame] | 63 | |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 64 | if (stat) |
| 65 | { |
nxpandroid | 0f06fde | 2017-08-14 11:25:28 +0530 | [diff] [blame] | 66 | secElemHandle = se.mActiveEeHandle; |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 67 | } |
nxpandroid | 6fd9cdb | 2017-07-12 18:25:41 +0530 | [diff] [blame] | 68 | |
nxf24591 | dc0bc2c | 2018-02-21 17:33:08 +0530 | [diff] [blame] | 69 | if((stat) && (nfcFL.eseFL._NCI_NFCEE_PWR_LINK_CMD)) |
nxpandroid | 0f06fde | 2017-08-14 11:25:28 +0530 | [diff] [blame] | 70 | { |
nxf24591 | dc0bc2c | 2018-02-21 17:33:08 +0530 | [diff] [blame] | 71 | status = se.setNfccPwrConfig(se.POWER_ALWAYS_ON|se.COMM_LINK_ACTIVE); |
nxpandroid | 7d44e57 | 2016-08-01 19:11:04 +0530 | [diff] [blame] | 72 | } |
nxpandroid | 0f06fde | 2017-08-14 11:25:28 +0530 | [diff] [blame] | 73 | if(status != NFA_STATUS_OK) |
| 74 | { |
nxf24591 | dc0bc2c | 2018-02-21 17:33:08 +0530 | [diff] [blame] | 75 | LOG(INFO) << StringPrintf("%s: power link command failed", __func__); |
| 76 | stat =false; |
nxpandroid | 0f06fde | 2017-08-14 11:25:28 +0530 | [diff] [blame] | 77 | } |
| 78 | else |
| 79 | { |
nxpandroid | 82f7e9e | 2018-04-05 14:54:41 +0530 | [diff] [blame] | 80 | stat = se.SecEle_Modeset(se.NFCEE_ENABLE); |
nxf24591 | dc0bc2c | 2018-02-21 17:33:08 +0530 | [diff] [blame] | 81 | se.mIsWiredModeOpen = true; |
nxpandroid | 0f06fde | 2017-08-14 11:25:28 +0530 | [diff] [blame] | 82 | } |
nxpandroid | 0f06fde | 2017-08-14 11:25:28 +0530 | [diff] [blame] | 83 | |
nxf24591 | dc0bc2c | 2018-02-21 17:33:08 +0530 | [diff] [blame] | 84 | /* if code fails to connect to the secure element, and nothing is active, then |
| 85 | * tell the controller to power down |
| 86 | */ |
| 87 | if ((!stat) && (! PowerSwitch::getInstance ().setModeOff (PowerSwitch::SE_CONNECTED))) |
| 88 | { |
| 89 | LOG(INFO) << StringPrintf("%s: stat fails; ", __func__); |
| 90 | PowerSwitch::getInstance ().setLevel (PowerSwitch::LOW_POWER); |
| 91 | se.deactivate(SecureElement::ESE_ID); |
| 92 | se.mIsWiredModeOpen = false; |
| 93 | stat = false; |
| 94 | } |
| 95 | LOG(INFO) << StringPrintf("%s: exit; return handle=0x%X", __func__, secElemHandle); |
| 96 | return secElemHandle; |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 97 | } |
| 98 | |
| 99 | |
| 100 | /******************************************************************************* |
| 101 | ** |
| 102 | ** Function: nativeNfcSecureElement_doDisconnectSecureElementConnection |
| 103 | ** |
| 104 | ** Description: Disconnect from the secure element. |
| 105 | ** e: JVM environment. |
| 106 | ** o: Java object. |
| 107 | ** handle: Handle of secure element. |
| 108 | ** |
| 109 | ** Returns: True if ok. |
| 110 | ** |
| 111 | *******************************************************************************/ |
| 112 | static jboolean nativeNfcSecureElement_doDisconnectSecureElementConnection (JNIEnv*, jobject, jint handle) |
| 113 | { |
nxf24591 | dc0bc2c | 2018-02-21 17:33:08 +0530 | [diff] [blame] | 114 | LOG(INFO) << StringPrintf("%s: enter; handle=0x%04x", __func__, handle); |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 115 | bool stat = false; |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 116 | NFCSTATUS status = NFCSTATUS_FAILED; |
hariprasad nalacheruvu | c72531a | 2018-03-23 15:36:52 +0530 | [diff] [blame] | 117 | const int32_t recvBufferMaxSize = 1024; |
| 118 | uint8_t recvBuffer [recvBufferMaxSize]; |
| 119 | int32_t recvBufferActualSize = 0; |
nxpandroid | 34627bd | 2016-05-27 15:52:30 +0530 | [diff] [blame] | 120 | SecureElement &se = SecureElement::getInstance(); |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 121 | |
nxf24591 | dc0bc2c | 2018-02-21 17:33:08 +0530 | [diff] [blame] | 122 | if(!se.mIsWiredModeOpen) |
| 123 | return false; |
nxpandroid | 7d44e57 | 2016-08-01 19:11:04 +0530 | [diff] [blame] | 124 | |
nxf24591 | dc0bc2c | 2018-02-21 17:33:08 +0530 | [diff] [blame] | 125 | status = se.setNfccPwrConfig(se.POWER_ALWAYS_ON); |
| 126 | if(status != NFA_STATUS_OK) |
| 127 | { |
| 128 | LOG(INFO) << StringPrintf("%s: power link command failed", __func__); |
nxpandroid | 0f06fde | 2017-08-14 11:25:28 +0530 | [diff] [blame] | 129 | } |
nxf24591 | dc0bc2c | 2018-02-21 17:33:08 +0530 | [diff] [blame] | 130 | else |
| 131 | { |
hariprasad nalacheruvu | c72531a | 2018-03-23 15:36:52 +0530 | [diff] [blame] | 132 | /*status = se.sendEvent(SecureElement::EVT_END_OF_APDU_TRANSFER); |
nxf24591 | dc0bc2c | 2018-02-21 17:33:08 +0530 | [diff] [blame] | 133 | if(status == NFA_STATUS_OK) |
hariprasad nalacheruvu | c72531a | 2018-03-23 15:36:52 +0530 | [diff] [blame] | 134 | stat = true;*/ |
| 135 | stat = se.getAtr(handle, recvBuffer, &recvBufferActualSize); |
nxf24591 | dc0bc2c | 2018-02-21 17:33:08 +0530 | [diff] [blame] | 136 | } |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 137 | |
nxpandroid | 5d64ce9 | 2016-11-18 19:48:53 +0530 | [diff] [blame] | 138 | /* if nothing is active after this, then tell the controller to power down */ |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 139 | if (! PowerSwitch::getInstance ().setModeOff (PowerSwitch::SE_CONNECTED)) |
| 140 | PowerSwitch::getInstance ().setLevel (PowerSwitch::LOW_POWER); |
nxf24591 | dc0bc2c | 2018-02-21 17:33:08 +0530 | [diff] [blame] | 141 | LOG(INFO) << StringPrintf("%s: exit", __func__); |
nxpandroid | 0f06fde | 2017-08-14 11:25:28 +0530 | [diff] [blame] | 142 | |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 143 | return stat ? JNI_TRUE : JNI_FALSE; |
| 144 | } |
| 145 | /******************************************************************************* |
| 146 | ** |
| 147 | ** Function: nativeNfcSecureElement_doResetSecureElement |
| 148 | ** |
| 149 | ** Description: Reset the secure element. |
| 150 | ** e: JVM environment. |
| 151 | ** o: Java object. |
| 152 | ** handle: Handle of secure element. |
| 153 | ** |
| 154 | ** Returns: True if ok. |
| 155 | ** |
| 156 | *******************************************************************************/ |
| 157 | static jboolean nativeNfcSecureElement_doResetSecureElement (JNIEnv*, jobject, jint handle) |
| 158 | { |
| 159 | bool stat = false; |
nxf24591 | dc0bc2c | 2018-02-21 17:33:08 +0530 | [diff] [blame] | 160 | NFCSTATUS status = NFCSTATUS_FAILED; |
| 161 | SecureElement &se = SecureElement::getInstance(); |
| 162 | if(!se.mIsWiredModeOpen) |
| 163 | return false; |
nxpandroid | ebf53fb | 2016-12-22 18:48:59 +0530 | [diff] [blame] | 164 | |
nxf24591 | dc0bc2c | 2018-02-21 17:33:08 +0530 | [diff] [blame] | 165 | if( nfcFL.nfcNxpEse) { |
| 166 | LOG(INFO) << StringPrintf("%s: enter; handle=0x%04x", __func__, handle); |
nxpandroid | 0f06fde | 2017-08-14 11:25:28 +0530 | [diff] [blame] | 167 | if(!se.mIsWiredModeOpen) |
| 168 | { |
nxf24591 | dc0bc2c | 2018-02-21 17:33:08 +0530 | [diff] [blame] | 169 | LOG(ERROR) << StringPrintf("wired mode is not open"); |
nxpandroid | 0f06fde | 2017-08-14 11:25:28 +0530 | [diff] [blame] | 170 | return stat; |
| 171 | } |
nxf24591 | dc0bc2c | 2018-02-21 17:33:08 +0530 | [diff] [blame] | 172 | status = se.setNfccPwrConfig(se.NFCC_DECIDES); |
| 173 | if(status != NFA_STATUS_OK) |
nxpandroid | 5d64ce9 | 2016-11-18 19:48:53 +0530 | [diff] [blame] | 174 | { |
nxf24591 | dc0bc2c | 2018-02-21 17:33:08 +0530 | [diff] [blame] | 175 | LOG(INFO) << StringPrintf("%s: power link command failed", __func__); |
nxpandroid | 7d44e57 | 2016-08-01 19:11:04 +0530 | [diff] [blame] | 176 | } |
nxf24591 | dc0bc2c | 2018-02-21 17:33:08 +0530 | [diff] [blame] | 177 | else { |
nxpandroid | 82f7e9e | 2018-04-05 14:54:41 +0530 | [diff] [blame] | 178 | stat = se.SecEle_Modeset(se.NFCEE_DISABLE); |
nxf24591 | dc0bc2c | 2018-02-21 17:33:08 +0530 | [diff] [blame] | 179 | usleep(2000 * 1000); |
nxpandroid | 6c999f0 | 2017-02-24 15:45:35 +0530 | [diff] [blame] | 180 | } |
nxf24591 | dc0bc2c | 2018-02-21 17:33:08 +0530 | [diff] [blame] | 181 | status = se.setNfccPwrConfig(se.POWER_ALWAYS_ON|se.COMM_LINK_ACTIVE); |
| 182 | if(status != NFA_STATUS_OK) |
| 183 | { |
| 184 | LOG(INFO) << StringPrintf("%s: power link command failed", __func__); |
| 185 | } |
| 186 | else { |
nxpandroid | 82f7e9e | 2018-04-05 14:54:41 +0530 | [diff] [blame] | 187 | stat = se.SecEle_Modeset(se.NFCEE_ENABLE); |
nxf24591 | dc0bc2c | 2018-02-21 17:33:08 +0530 | [diff] [blame] | 188 | usleep(2000 * 1000); |
| 189 | } |
nxpandroid | 7d44e57 | 2016-08-01 19:11:04 +0530 | [diff] [blame] | 190 | } |
nxf24591 | dc0bc2c | 2018-02-21 17:33:08 +0530 | [diff] [blame] | 191 | LOG(INFO) << StringPrintf("%s: exit", __func__); |
nxpandroid | 0f06fde | 2017-08-14 11:25:28 +0530 | [diff] [blame] | 192 | return stat ? JNI_TRUE : JNI_FALSE; |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 193 | } |
| 194 | |
| 195 | /******************************************************************************* |
| 196 | ** |
| 197 | ** Function: nativeNfcSecureElement_doGetAtr |
| 198 | ** |
| 199 | ** Description: GetAtr from the connected eSE. |
| 200 | ** e: JVM environment. |
| 201 | ** o: Java object. |
| 202 | ** handle: Handle of secure element. |
| 203 | ** |
| 204 | ** Returns: Buffer of received data. |
| 205 | ** |
| 206 | *******************************************************************************/ |
| 207 | static jbyteArray nativeNfcSecureElement_doGetAtr (JNIEnv* e, jobject, jint handle) |
| 208 | { |
| 209 | bool stat = false; |
nxpandroid | 6fd9cdb | 2017-07-12 18:25:41 +0530 | [diff] [blame] | 210 | const int32_t recvBufferMaxSize = 1024; |
| 211 | uint8_t recvBuffer [recvBufferMaxSize]; |
| 212 | int32_t recvBufferActualSize = 0; |
nxf24591 | dc0bc2c | 2018-02-21 17:33:08 +0530 | [diff] [blame] | 213 | LOG(INFO) << StringPrintf("%s: enter; handle=0x%04x", __func__, handle); |
| 214 | SecureElement &se = SecureElement::getInstance(); |
| 215 | if(!se.mIsWiredModeOpen) |
| 216 | return NULL; |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 217 | |
nxf24591 | dc0bc2c | 2018-02-21 17:33:08 +0530 | [diff] [blame] | 218 | stat = se.getAtr(handle, recvBuffer, &recvBufferActualSize); |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 219 | |
nxf24591 | dc0bc2c | 2018-02-21 17:33:08 +0530 | [diff] [blame] | 220 | //copy results back to java |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 221 | jbyteArray result = e->NewByteArray(recvBufferActualSize); |
| 222 | if (result != NULL) { |
| 223 | e->SetByteArrayRegion(result, 0, recvBufferActualSize, (jbyte *) recvBuffer); |
| 224 | } |
| 225 | |
nxf24591 | dc0bc2c | 2018-02-21 17:33:08 +0530 | [diff] [blame] | 226 | LOG(INFO) << StringPrintf("%s: exit: recv len=%d", __func__, recvBufferActualSize); |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 227 | |
| 228 | return result; |
| 229 | } |
| 230 | |
| 231 | /******************************************************************************* |
| 232 | ** |
| 233 | ** Function: nativeNfcSecureElement_doTransceive |
| 234 | ** |
| 235 | ** Description: Send data to the secure element; retrieve response. |
| 236 | ** e: JVM environment. |
| 237 | ** o: Java object. |
| 238 | ** handle: Secure element's handle. |
| 239 | ** data: Data to send. |
| 240 | ** |
| 241 | ** Returns: Buffer of received data. |
| 242 | ** |
| 243 | *******************************************************************************/ |
| 244 | static jbyteArray nativeNfcSecureElement_doTransceive (JNIEnv* e, jobject, jint handle, jbyteArray data) |
| 245 | { |
nxpandroid | 6fd9cdb | 2017-07-12 18:25:41 +0530 | [diff] [blame] | 246 | const int32_t recvBufferMaxSize = 0x8800;//1024; 34k |
| 247 | uint8_t recvBuffer [recvBufferMaxSize]; |
| 248 | int32_t recvBufferActualSize = 0; |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 249 | ScopedByteArrayRW bytes(e, data); |
nxf24591 | dc0bc2c | 2018-02-21 17:33:08 +0530 | [diff] [blame] | 250 | LOG(INFO) << StringPrintf("%s: enter; handle=0x%X; buf len=%zu", __func__, handle, bytes.size()); |
| 251 | |
| 252 | SecureElement &se = SecureElement::getInstance(); |
| 253 | if(!se.mIsWiredModeOpen) |
| 254 | return NULL; |
| 255 | |
Sreenivas | 426138e | 2018-04-04 14:56:08 +0530 | [diff] [blame^] | 256 | se.transceive(reinterpret_cast<uint8_t*>(&bytes[0]), bytes.size(), recvBuffer, recvBufferMaxSize, recvBufferActualSize, se.SmbTransceiveTimeOutVal); |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 257 | |
nxpandroid | a9a68ba | 2016-01-14 21:12:17 +0530 | [diff] [blame] | 258 | //copy results back to java |
| 259 | jbyteArray result = e->NewByteArray(recvBufferActualSize); |
| 260 | if (result != NULL) |
nxpandroid | 7d44e57 | 2016-08-01 19:11:04 +0530 | [diff] [blame] | 261 | { |
nxpandroid | a9a68ba | 2016-01-14 21:12:17 +0530 | [diff] [blame] | 262 | e->SetByteArrayRegion(result, 0, recvBufferActualSize, (jbyte *) recvBuffer); |
nxpandroid | 7d44e57 | 2016-08-01 19:11:04 +0530 | [diff] [blame] | 263 | } |
nxf24591 | dc0bc2c | 2018-02-21 17:33:08 +0530 | [diff] [blame] | 264 | |
| 265 | LOG(INFO) << StringPrintf("%s: exit: recv len=%d", __func__, recvBufferActualSize); |
nxpandroid | a9a68ba | 2016-01-14 21:12:17 +0530 | [diff] [blame] | 266 | return result; |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 267 | } |
| 268 | |
| 269 | /***************************************************************************** |
| 270 | ** |
| 271 | ** Description: JNI functions |
| 272 | ** |
| 273 | *****************************************************************************/ |
| 274 | static JNINativeMethod gMethods[] = |
| 275 | { |
nxf24591 | dc0bc2c | 2018-02-21 17:33:08 +0530 | [diff] [blame] | 276 | {"doNativeOpenSecureElementConnection", "()I", (void *) nativeNfcSecureElement_doOpenSecureElementConnection}, |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 277 | {"doNativeDisconnectSecureElementConnection", "(I)Z", (void *) nativeNfcSecureElement_doDisconnectSecureElementConnection}, |
| 278 | {"doNativeResetSecureElement", "(I)Z", (void *) nativeNfcSecureElement_doResetSecureElement}, |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 279 | {"doTransceive", "(I[B)[B", (void *) nativeNfcSecureElement_doTransceive}, |
| 280 | {"doNativeGetAtr", "(I)[B", (void *) nativeNfcSecureElement_doGetAtr}, |
| 281 | }; |
| 282 | |
| 283 | |
| 284 | /******************************************************************************* |
| 285 | ** |
| 286 | ** Function: register_com_android_nfc_NativeNfcSecureElement |
| 287 | ** |
| 288 | ** Description: Regisgter JNI functions with Java Virtual Machine. |
| 289 | ** e: Environment of JVM. |
| 290 | ** |
| 291 | ** Returns: Status of registration. |
| 292 | ** |
| 293 | *******************************************************************************/ |
| 294 | int register_com_android_nfc_NativeNfcSecureElement(JNIEnv *e) |
| 295 | { |
| 296 | return jniRegisterNativeMethods(e, gNativeNfcSecureElementClassName, |
| 297 | gMethods, NELEM(gMethods)); |
| 298 | } |
| 299 | |
nxpandroid | 64fd68c | 2015-09-23 16:45:15 +0530 | [diff] [blame] | 300 | } // namespace android |