diff options
-rwxr-xr-x | AndroidManifest.xml | 1 | ||||
-rwxr-xr-x | nci/jni/NativeNfcManager.cpp | 17 | ||||
-rw-r--r-- | nci/jni/PeerToPeer.cpp | 2 | ||||
-rwxr-xr-x | nci/jni/SecureElement.cpp | 4 | ||||
-rw-r--r-- | src/com/android/nfc/FireflyRenderer.java | 1 | ||||
-rw-r--r-- | src/com/android/nfc/SendUi.java | 2 |
6 files changed, 18 insertions, 9 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 3157598..710e2ee 100755 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -22,6 +22,7 @@ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" /> <uses-permission android:name="android.permission.MANAGE_USERS" /> + <uses-permission android:name="android.permission.INTERNAL_SYSTEM_WINDOW" /> <uses-permission android:name="com.android.permission.WHITELIST_BLUETOOTH_DEVICE" /> <uses-permission android:name="com.android.permission.HANDOVER_STATUS" /> <application android:name=".NfcApplication" diff --git a/nci/jni/NativeNfcManager.cpp b/nci/jni/NativeNfcManager.cpp index 814f49b..f15c92f 100755 --- a/nci/jni/NativeNfcManager.cpp +++ b/nci/jni/NativeNfcManager.cpp @@ -339,16 +339,17 @@ static void nfaConnectionCallback (UINT8 connEvent, tNFA_CONN_EVT_DATA* eventDat case NFA_DEACTIVATED_EVT: // NFC link/protocol deactivated ALOGD("%s: NFA_DEACTIVATED_EVT Type: %u, gIsTagDeactivating: %d", __FUNCTION__, eventData->deactivated.type,gIsTagDeactivating); NfcTag::getInstance().setDeactivationState (eventData->deactivated); - if (gIsTagDeactivating || gIsSelectingRfInterface) + if (eventData->deactivated.type != NFA_DEACTIVATE_TYPE_SLEEP) { - if (gIsTagDeactivating) - nativeNfcTag_doDeactivateStatus(0); - break; + nativeNfcTag_resetPresenceCheck(); + NfcTag::getInstance().connectionEventHandler (connEvent, eventData); + nativeNfcTag_abortWaits(); + NfcTag::getInstance().abort (); + } + else if (gIsTagDeactivating) + { + nativeNfcTag_doDeactivateStatus(0); } - nativeNfcTag_resetPresenceCheck(); - NfcTag::getInstance().connectionEventHandler (connEvent, eventData); - nativeNfcTag_abortWaits(); - NfcTag::getInstance().abort (); // If RF is activated for what we think is a Secure Element transaction // and it is deactivated to either IDLE or DISCOVERY mode, notify w/event. diff --git a/nci/jni/PeerToPeer.cpp b/nci/jni/PeerToPeer.cpp index 13b5a60..7994e2a 100644 --- a/nci/jni/PeerToPeer.cpp +++ b/nci/jni/PeerToPeer.cpp @@ -1590,7 +1590,7 @@ bool P2pServer::registerWithStack() - Data link connection timeout (LLCP_DATA_LINK_CONNECTION_TOUT) - Delay timeout to send first PDU as initiator (LLCP_DELAY_TIME_TO_SEND_FIRST_PDU) ************************/ - stat = NFA_P2pSetLLCPConfig (LLCP_MIU, + stat = NFA_P2pSetLLCPConfig (LLCP_MAX_MIU, LLCP_OPT_VALUE, LLCP_WAITING_TIME, LLCP_LTO_VALUE, diff --git a/nci/jni/SecureElement.cpp b/nci/jni/SecureElement.cpp index f6b2721..6c52030 100755 --- a/nci/jni/SecureElement.cpp +++ b/nci/jni/SecureElement.cpp @@ -2129,6 +2129,7 @@ bool SecureElement::routeToDefault () tNFA_STATUS nfaStat = NFA_STATUS_FAILED; bool retval = false; + ALOGD ("%s: enter", fn); if (! mIsInit) { ALOGE ("%s: not init", fn); @@ -2141,6 +2142,7 @@ bool SecureElement::routeToDefault () return true; } + if (mActiveEeHandle != NFA_HANDLE_INVALID) { ALOGD ("%s: stop UICC listen; EE h=0x%X", fn, mActiveEeHandle); SyncEventGuard guard (mUiccListenEvent); @@ -2153,6 +2155,8 @@ bool SecureElement::routeToDefault () else ALOGE ("%s: fail to stop UICC listen", fn); } + else + retval = true; adjustRoutes (DefaultRoute); diff --git a/src/com/android/nfc/FireflyRenderer.java b/src/com/android/nfc/FireflyRenderer.java index 4ce58b4..40c931d 100644 --- a/src/com/android/nfc/FireflyRenderer.java +++ b/src/com/android/nfc/FireflyRenderer.java @@ -200,6 +200,7 @@ public class FireflyRenderer { for (int i = 0; i < 3; i++) { // Call eglSwapBuffers 3 times - this will allocate the necessary // buffers, and make sure the animation looks smooth from the start. + mGL.glClear(GL10.GL_COLOR_BUFFER_BIT); if (!mEgl.eglSwapBuffers(mEglDisplay, mEglSurface)) { Log.e(LOG_TAG, "Could not swap buffers"); mFinished = true; diff --git a/src/com/android/nfc/SendUi.java b/src/com/android/nfc/SendUi.java index c54f54e..a12aabb 100644 --- a/src/com/android/nfc/SendUi.java +++ b/src/com/android/nfc/SendUi.java @@ -194,6 +194,8 @@ public class SendUi implements Animator.AnimatorListener, View.OnTouchListener, | hwAccelerationFlags | WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN, PixelFormat.OPAQUE); + mWindowLayoutParams.privateFlags |= + WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS; mWindowLayoutParams.token = new Binder(); mFrameCounterAnimator = new TimeAnimator(); |