Snap for 6610691 from 40b9508f2f9c1bf45e2b4b04339170488a263597 to rvc-release

Change-Id: I280687a78f5ef56cde0a2274b28ab0d58d7b392e
diff --git a/nci/jni/NativeNfcManager.cpp b/nci/jni/NativeNfcManager.cpp
index c99e982..5048262 100644
--- a/nci/jni/NativeNfcManager.cpp
+++ b/nci/jni/NativeNfcManager.cpp
@@ -234,12 +234,19 @@
     // there is more discovery notification coming
     return;
   }
-  if (natTag.getNumDiscNtf() > 1) {
-    natTag.setMultiProtocolTagSupport(true);
-  }
 
   bool isP2p = natTag.isP2pDiscovered();
-  if (!sReaderModeEnabled && isP2p) {
+
+  if (natTag.getNumDiscNtf() > 1) {
+    natTag.setMultiProtocolTagSupport(true);
+    if (isP2p) {
+      // Remove NFC_DEP NTF count
+      // Skip NFC_DEP protocol in MultiProtocolTag select.
+      natTag.setNumDiscNtf(natTag.getNumDiscNtf() - 1);
+    }
+  }
+
+  if (sP2pEnabled && !sReaderModeEnabled && isP2p) {
     // select the peer that supports P2P
     natTag.selectP2p();
   } else {
diff --git a/nci/jni/NfcTag.cpp b/nci/jni/NfcTag.cpp
index 6f5f9b8..b9d8d55 100755
--- a/nci/jni/NfcTag.cpp
+++ b/nci/jni/NfcTag.cpp
@@ -1013,8 +1013,8 @@
   static const char fn[] = "NfcTag::isP2pDiscovered";
   bool retval = false;
 
-  for (int i = 0; i < mNumTechList; i++) {
-    if (mTechLibNfcTypes[i] == NFA_PROTOCOL_NFC_DEP) {
+  for (int i = 0; i < mNumDiscTechList; i++) {
+    if (mTechLibNfcTypesDiscData[i] == NFA_PROTOCOL_NFC_DEP) {
       // if remote device supports P2P
       DLOG_IF(INFO, nfc_debug_enabled)
           << StringPrintf("%s: discovered P2P", fn);
diff --git a/res/values-eu/strings.xml b/res/values-eu/strings.xml
index 2c5e01a..afdb783 100644
--- a/res/values-eu/strings.xml
+++ b/res/values-eu/strings.xml
@@ -42,7 +42,7 @@
     <string name="prompt_connect_to_network" msgid="8511683573657516114">"<xliff:g id="NETWORK_SSID">%1$s</xliff:g> sarera konektatu nahi duzu?"</string>
     <string name="beam_requires_nfc_enabled" msgid="2800366967218600534">"Android Beam erabiltzeko NFC gaitu behar da. Gaitu egin nahi duzu?"</string>
     <string name="android_beam" msgid="1666446406999492763">"Android Beam"</string>
-    <string name="beam_requires_external_storage_permission" msgid="8798337545702206901">"Aplikazioak ez dauka kanpoko biltegiak atzitzeko baimenik. Baimen hori behar da fitxategia NFC bidez partekatzeko."</string>
+    <string name="beam_requires_external_storage_permission" msgid="8798337545702206901">"Aplikazioak ez dauka kanpoko memoria atzitzeko baimenik. Fitxategia NFC bidez partekatzeko da beharrezkoa baimen hori."</string>
     <string name="title_confirm_url_open" msgid="8069968913244794478">"Esteka ireki nahi duzu?"</string>
     <string name="summary_confirm_url_open" product="tablet" msgid="3353502750736192055">"Esteka bat jaso duzu tabletan NFC bidez:"</string>
     <string name="summary_confirm_url_open" product="default" msgid="1246398412196449226">"Esteka bat jaso duzu telefonoan NFC bidez:"</string>