Merge branch 'caf/android_ncihalx/br_android_ncihalx_11' into nfc.sys.lnx.2.0

* caf/android_ncihalx/br_android_ncihalx_11:
  Updated readme for - NFC_AR_00_6000_11.02.00_OpnSrc
  Android Q 10.00.13 patch integration [QSSI]: Added support for NfcFRouteSet API.
  Android Q 10.00.13 patch integration [MCR]: Add support to Mifare classic reader. The NFC MW shall support Mifare Classic Reader over eSE.
  Android Q 10.00.13 patch integration esolved Coverity warnings. Warnings Resolved: NULL_RETURN
  Android Q 10.00.13 patch integration Fix exception during SEMS ELF upgrade test
  Android Q 10.00.13 patch integration Callback not received from client during error recovery

Change-Id: Id3a89677ab2a48c54f975f919fdc6525991fcab8
diff --git a/Android.bp b/Android.bp
old mode 100755
new mode 100644
index 8c875dd..b85e6f0
--- a/Android.bp
+++ b/Android.bp
@@ -1,18 +1,24 @@
-
-
 //#######################################
-// com.nxp.nfc - library
+// com.nxp.nfc.nq - library
 //#######################################
 java_library {
-
-    name: "com.nxp.nfc",
+    name: "com.nxp.nfc.nq",
     installable: true,
-    required: ["com.nxp.nfc.xml"],
+    required: ["com.nxp.nfc.nq.xml"],
+    system_ext_specific: true,
 
     srcs: [
         "com/**/I*.aidl",
         "com/**/*.java",
         "android/**/*.java",
     ],
+}
 
-}
\ No newline at end of file
+// ====  permissions ========================
+prebuilt_etc {
+    name: "com.nxp.nfc.nq.xml",
+    src: "com.nxp.nfc.nq.xml",
+    system_ext_specific: true,
+    // Install to /system/etc/permissions
+    sub_dir: "permissions",
+}
diff --git a/README.md b/README.md
index f1f7a97..e2d3d5f 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,19 @@
 # nfcandroid_frameworks
 
 
+#### Supported Versions on "br_android_ncihalx_q branch
+
+| Android Version        | NXP Release          | NXP Tag  |
+| :-------------: |:---------------------:| :-----:|
+| aosp-master                |  10.00.04 (SN100x) |  NFC_AR_00_2000_10.00.04_OpnSrc  |
+| aosp-master                |  10.00.06 (SN100x) |  NFC_AR_00_6000_10.00.06_OpnSrc  |
+| aosp-master              |  10.00.08 (SN100x) |  NFC_AR_00_6000_10.00.08_OpnSrc |
+| aosp-master              |  10.00.0A (SN110) |  NFC_AR_00_6000_10.00.0A_OpnSrc |
+| aosp-master              |  10.00.0B (SN100) |  NFC_AR_00_6000_10.00.0B_OpnSrc |
+| aosp-master              |  10.00.0C (SN110) |  NFC_AR_00_6000_10.00.0C_OpnSrc |
+| android-10.0.0_r2              |  10.00.0D (SN110) |  NFC_AR_00_6000_10.00.0D_OpnSrc |
+| android-10.0.0_r2              |  10.00.0F (SN110) |  NFC_AR_00_6000_10.00.0F_OpnSrc |
+
 #### Supported Version on "br_android_ncihalx_11" branch
 | Android Version        | NXP Release          | NXP Tag  |
 | :-------------: |:---------------------:| :-----:|
@@ -30,11 +43,3 @@
 
 
 
-
-
-
-
-
-
-
-
diff --git a/android/nfc/cardemulation/NfcAidGroup.aidl b/android/nfc/cardemulation/NfcAidGroup.aidl
index 283226d..cbea4b0 100644
--- a/android/nfc/cardemulation/NfcAidGroup.aidl
+++ b/android/nfc/cardemulation/NfcAidGroup.aidl
@@ -1,18 +1,20 @@
 /*
-* Copyright (C) 2015 NXP Semiconductors
-*
-* 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.
-*/
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Copyright (C) 2015 NXP Semiconductors
+ *
+ * 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;
 
diff --git a/android/nfc/cardemulation/NfcAidGroup.java b/android/nfc/cardemulation/NfcAidGroup.java
index 7bd218a..2463a42 100644
--- a/android/nfc/cardemulation/NfcAidGroup.java
+++ b/android/nfc/cardemulation/NfcAidGroup.java
@@ -1,5 +1,10 @@
 /*
+ * Copyright (c) 2016, The Linux Foundation. All rights reserved.
+ * Not a Contribution.
+ *
  * Copyright (C) 2015-2019 NXP Semiconductors
+ * The original Work has been changed by NXP Semiconductors.
+ * Copyright (C) 2015 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.
diff --git a/android/nfc/cardemulation/NfcApduServiceInfo.aidl b/android/nfc/cardemulation/NfcApduServiceInfo.aidl
index 5a99233..72316bc 100644
--- a/android/nfc/cardemulation/NfcApduServiceInfo.aidl
+++ b/android/nfc/cardemulation/NfcApduServiceInfo.aidl
@@ -1,18 +1,23 @@
 /*
-* Copyright (C) 2015 NXP Semiconductors
-*
-* 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.
-*/
+ * Copyright (c) 2015, The Linux Foundation. All rights reserved.
+ * Not a Contribution.
+ *
+ * Copyright (C) 2015 NXP Semiconductors
+ *
+ * Copyright (C) 2013 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;
 
diff --git a/android/nfc/cardemulation/NfcApduServiceInfo.java b/android/nfc/cardemulation/NfcApduServiceInfo.java
index 5aac979..208a3e1 100644
--- a/android/nfc/cardemulation/NfcApduServiceInfo.java
+++ b/android/nfc/cardemulation/NfcApduServiceInfo.java
@@ -1,18 +1,21 @@
 /*
- * Copyright (C) 2015-2019 NXP Semiconductors
- *
- * 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.
- */
+* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
+* Not a Contribution.
+*
+* Copyright (C) 2015-2019 NXP Semiconductors
+*
+* 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;
 
@@ -53,9 +56,8 @@
 /**
  * @hide
  */
-public final class NfcApduServiceInfo
-    extends ApduServiceInfo implements Parcelable {
-  static final String TAG = "NfcApduServiceInfo";
+public class NfcApduServiceInfo extends ApduServiceInfo implements Parcelable {
+    static final String TAG = "NfcApduServiceInfo";
 
   // name of secure element
   static final String SECURE_ELEMENT_ESE = "eSE";
@@ -122,7 +124,7 @@
                             boolean requiresUnlock, int bannerResource, int uid,
                             String settingsActivityName, ESeInfo seExtension,
                             boolean modifiable) {
-    super(info, description, nfcAidGroups2AidGroups(staticNfcAidGroups),
+    super(info, onHost, description, nfcAidGroups2AidGroups(staticNfcAidGroups),
           nfcAidGroups2AidGroups(dynamicNfcAidGroups), requiresUnlock,
           bannerResource, uid, settingsActivityName, null, null);
     this.mModifiable = modifiable;
@@ -366,7 +368,7 @@
    */
   public ApduServiceInfo createApduServiceInfo() {
     return new ApduServiceInfo(
-        this.getResolveInfo(), this.getDescription(),
+        this.getResolveInfo(), this.isOnHost(), this.getDescription(),
         nfcAidGroups2AidGroups(this.getStaticNfcAidGroups()),
         nfcAidGroups2AidGroups(this.getDynamicNfcAidGroups()),
         this.requiresUnlock(), this.getBannerId(), this.getUid(),
@@ -825,4 +827,4 @@
           }
         };
   }
-}
\ No newline at end of file
+}
diff --git a/com.nxp.nfc.nq.xml b/com.nxp.nfc.nq.xml
new file mode 100644
index 0000000..18a2c62
--- /dev/null
+++ b/com.nxp.nfc.nq.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright (c) 2015, The Linux Foundation. All rights reserved.
+-->
+
+<!-- Assist library for NQ NFC extensions. -->
+<permissions>
+    <library name="com.nxp.nfc.nq"
+        file="/system/system_ext/framework/com.nxp.nfc.nq.jar" />
+</permissions>
diff --git a/com/nxp/nfc/INxpNfcAdapterExtras.aidl b/com/nxp/nfc/INxpNfcAdapterExtras.aidl
old mode 100755
new mode 100644
diff --git a/sems/Android.bp b/sems/Android.bp
deleted file mode 100644
index 2b4aac7..0000000
--- a/sems/Android.bp
+++ /dev/null
@@ -1,17 +0,0 @@
-//#######################################
-// com.nxp.ls - library
-//#######################################
-java_library {
-
-    name: "com.nxp.sems",
-    installable: true,
-    sdk_version: "29",
-    vendor: true,
-    required: ["com.nxp.sems.xml"],
-
-    srcs: [
-        "com/**/I*.aidl",
-        "com/**/*.java",
-    ],
-
-}