Merge remote-tracking branch 'origin/sm7225_r_fp4' into fp4-r-rebase

Change-Id: Ie00e47b477e1c62853a98c368c9e2933aaf66698
diff --git a/aw882xx_cali b/aw882xx_cali
new file mode 100644
index 0000000..2889502
--- /dev/null
+++ b/aw882xx_cali
Binary files differ
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
index 1356e2e..5c289c5 100644
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -37,4 +37,20 @@
        <item>"wifi_br0"</item>
    </string-array>
 
+    <!-- List of biometric sensors on the device, in decreasing strength. Consumed by AuthService
+         when registering authenticators with BiometricService. Format must be ID:Modality:Strength,
+         where: IDs are unique per device, Modality as defined in BiometricAuthenticator.java,
+         and Strength as defined in Authenticators.java -->
+    <string-array name="config_biometric_sensors" translatable="false" >
+        <item>0:2:15</item>  <!-- ID0:Fingerprint:Strong -->
+    </string-array>
+
+    <!--[BUG]-Modify-Begin by shaopan.tang 2021-08-23 [FP4-2574]NULL DeviceCapabilities in AC -->
+    <string-array translatable="false" name="config_telephonyEuiccDeviceCapabilities">
+        <item>"gsm,9"</item>
+        <item>"utran,10"</item>
+        <item>"eutran,15"</item>
+    </string-array>
+    <!--[BUG]-Modify-End by shaopan.tang -->
+
 </resources>
diff --git a/qssi.mk b/qssi.mk
index c037c97..55a3919 100644
--- a/qssi.mk
+++ b/qssi.mk
@@ -97,8 +97,17 @@
 
 PRODUCT_NAME := $(VENDOR_QTI_DEVICE)
 PRODUCT_DEVICE := $(VENDOR_QTI_DEVICE)
-PRODUCT_BRAND := qti
-PRODUCT_MODEL := qssi system image for arm64
+PRODUCT_BRAND := Fairphone
+PRODUCT_MODEL := FP4
+PRODUCT_MANUFACTURER := Fairphone
+
+MAINLINE_PATCH_LEVEL_1 := true
+
+# MODIFIED-BEGIN by Gu xiaocong, 2019-12-04,BUG-8671753
+# OVERRIDE_TARGET_PRODUCT change
+OVERRIDE_TARGET_PRODUCT := FP4eea
+OVERRIDE_TARGET_DEVICE := FP4
+# MODIFIED-END by Gu xiaocong,BUG-8671753
 
 #Initial bringup flags
 TARGET_USES_AOSP := false
@@ -108,8 +117,12 @@
 # RRO configuration
 TARGET_USES_RRO := true
 
-TARGET_USES_NQ_NFC := true
+# change density to 400
+ro.sf.lcd_density=400
 
+#[BUGFIX]-MOD-BEGIN by T2M.ZhangJie,12/08/2020,10277814,
+TARGET_USES_NQ_NFC := false
+#[BUGFIX]-MOD-END by T2M.ZhangJie
 
 # default is nosdcard, S/W button enabled in resource
 PRODUCT_CHARACTERISTICS := nosdcard
@@ -143,15 +156,18 @@
 # Audio configuration file
 -include $(TOPDIR)vendor/qcom/opensource/audio-hal/primary-hal/configs/qssi/qssi.mk
 -include $(TOPDIR)vendor/qcom/opensource/commonsys/audio/configs/qssi/qssi.mk
+-include $(TOPDIR)vendor/st/nfc/st21nfc/NfcDeviceConfig.mk
 AUDIO_FEATURE_ENABLED_SVA_MULTI_STAGE := true
 USE_LIB_PROCESS_GROUP := true
 
 PRODUCT_PACKAGES += fs_config_files
 
+# [TCT-NB][FOTA] MODIFIED-BEGIN by JI.Chen,2021/07/21, add update_engine_sideload for recovery mode
 ifeq ($(ENABLE_AB), true)
 #A/B related packages
 PRODUCT_PACKAGES += update_engine \
     update_engine_client \
+    update_engine_sideload \
     update_verifier \
     bootctrl.msmnile \
     android.hardware.boot@1.0-impl \
@@ -199,6 +215,36 @@
 PRODUCT_PROPERTY_OVERRIDES += \
     persist.vendor.qfp=true
 
+#FP4-263, mfg_util, liquan.zhou.t2m, 20210510
+PRODUCT_PACKAGES += mfg_util
+PRODUCT_PACKAGES += mfg_utild
+PRODUCT_PACKAGES += fpconfig_util
+
+# add for mmitest in user version
+ifeq ($(TARGET_BUILD_VARIANT),user)
+PRODUCT_PACKAGES += mm-audio-ftm
+endif
+# end
+
+#MMITest
+PRODUCT_PACKAGES += MMITest
+
+#EmailPartnerProvider
+PRODUCT_PACKAGES += EmailPartnerProvider
+
+ifeq ($(TARGET_BUILD_MMITEST),false)
+PRODUCT_COPY_FILES += \
+frameworks/native/data/etc/android.hardware.telephony.euicc.xml:system/etc/permissions/android.hardware.telephony.euicc.xml \
+frameworks/native/data/etc/com_google_lens_feature.xml:system/etc/permissions/com_google_lens_feature.xml
+
+PRODUCT_PACKAGES += EuiccGoogle T2mEuiccOverlay
+endif
+
+PRODUCT_COPY_FILES += device/qcom/lito/fp4/google_clientidbase_config/google_clientidbase.rc:$(TARGET_COPY_OUT_SYSTEM)/etc/init/google_clientidbase.rc
+
+
+#Iris
+PRODUCT_PACKAGES += Iris
 
 # USB default HAL
 PRODUCT_PACKAGES += \
@@ -226,6 +272,13 @@
 PRODUCT_COPY_FILES += \
     device/qcom/qssi/public.libraries.system_ext-qti.txt:$(TARGET_COPY_OUT_SYSTEM_EXT)/etc/public.libraries-qti.txt
 
+PRODUCT_COPY_FILES += \
+    device/qcom/qssi/aw882xx_cali:system/bin/aw882xx_cali
+
+#zxz add for qnovo qns 3rd part charge algorithm service
+PRODUCT_COPY_FILES += \
+    device/qcom/lito/fp4/qnovo/qns:system/bin/qns
+
 #Enable full treble flag
 PRODUCT_FULL_TREBLE_OVERRIDE := true
 PRODUCT_VENDOR_MOVE_ENABLED := true
@@ -235,10 +288,18 @@
 DEVICE_PACKAGE_OVERLAYS += device/qcom/qssi/overlay
 endif
 
+PRODUCT_PACKAGES += FairphoneActivator
 
 #Enable vndk-sp Libraries
 PRODUCT_PACKAGES += vndk_package
 
+#Enable sysrilcmd
+PRODUCT_PACKAGES += \
+		    qcrilhook \
+		    qcrilhook.xml \
+		    sysrilcmd \
+		    sysrilcmd.xml
+
 PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE:=true
 
 
@@ -258,10 +319,23 @@
 AUDIO_FEATURE_ENABLED_DLKM := false
 endif
 
+ifeq ($(TARGET_BUILD_MMITEST),false)
+$(call inherit-product, vendor/partner_gms/products/gms_eea_v2_type4c.mk)
+$(call inherit-product-if-exists, vendor/partner_modules/build/mainline_modules.mk)
+endif
+
 ifeq ($(ENABLE_VIRTUAL_AB), true)
     $(call inherit-product, $(SRC_TARGET_DIR)/product/virtual_ab_ota.mk)
 endif
 
+PRODUCT_PACKAGES += WallpaperPicker
+PRODUCT_PACKAGES += FPCamera
+PRODUCT_PACKAGES += PlayAutoInstallStub
+PRODUCT_PACKAGES += MyFairPhone
+PRODUCT_PACKAGES += QuickAccessWallet
+
+
+PRODUCT_PACKAGES += SetupWizardOverlay
 # Include mainline components and QSSI whitelist
 ifeq (true,$(call math_gt_or_eq,$(SHIPPING_API_LEVEL),29))
   $(call inherit-product, device/qcom/qssi/qssi_whitelist.mk)
@@ -269,9 +343,49 @@
   PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := true
 endif
 
+ifeq ($(TARGET_BUILD_MMITEST),true)
+PRODUCT_PACKAGES += Robust \
+     robustd \
+     memtester \
+     libwifi_robust_jni \
+     libwifitestmodejni \
+     TctWlanTestMode
+endif
+
+PRODUCT_PACKAGES += libexif
+
+PRODUCT_PACKAGES += \
+      smcd \
+      OneTouchFeedback
+
+PRODUCT_COPY_FILES +=\
+        device/qcom/lito/tuxera/exfatck:system/bin/exfatck \
+        device/qcom/lito/tuxera/exfatdebug:system/bin/exfatdebug \
+        device/qcom/lito/tuxera/exfatlabel:system/bin/exfatlabel \
+        device/qcom/lito/tuxera/exfatvsn:system/bin/exfatvsn \
+        device/qcom/lito/tuxera/mkexfat:system/bin/mkexfat
+
+ifeq ($(TARGET_BUILD_VARIANT),user)
+    $(warning "exFat kernel module in user Build")
+    $(shell cp -f device/qcom/lito/tuxera/texfat.user.unsigned.ko device/qcom/lito/tuxera/texfat.unsigned.ko)
+else
+    $(warning "exFat kernel module in userdebug Build")
+    $(shell cp -f device/qcom/lito/tuxera/texfat.userdebug.unsigned.ko device/qcom/lito/tuxera/texfat.unsigned.ko)
+endif
+
+#PSI config
+PRODUCT_PACKAGES += \
+      PSI \
+      psi_config.json
+
+PRODUCT_COPY_FILES += \
+      device/qcom/lito/splash/bootanimation.zip:system/media/bootanimation.zip
+
 ###################################################################################
 # This is the End of target.mk file.
 # Now, Pickup other split product.mk files:
 ###################################################################################
 $(call inherit-product-if-exists, vendor/qcom/defs/product-defs/system/*.mk)
 ###################################################################################
+
+$(call inherit-product-if-exists, vendor/customer_carrier/customer_carrier.mk)
diff --git a/system.prop b/system.prop
old mode 100644
new mode 100755
index ca41b53..627813b
--- a/system.prop
+++ b/system.prop
@@ -16,7 +16,8 @@
 ril.subscription.types=NV,RUIM
 DEVICE_PROVISIONED=1
 # Set network mode to (NR_LTE_TDSCDMA_CDMA_EVDO_GSM_WCDMA, NR_LTE_TDSCDMA_CDMA_EVDO_GSM_WCDMA) for 8+8 mode device on DSDS mode
-ro.telephony.default_network=33,33
+#Modify by zhangrenjie [FP4-1669]Device is defaulted to 4G preferred instead of 5G/NR
+ro.telephony.default_network=26,26
 
 dalvik.vm.heapsize=36m
 dev.pm.dyn_samplingrate=1
@@ -128,7 +129,7 @@
 qemu.hw.mainkeys=0
 
 #Expose aux camera for below packages
-vendor.camera.aux.packagelist=org.codeaurora.snapcam
+vendor.camera.aux.packagelist=org.codeaurora.snapcam,com.android.mmi,com.fp.camera
 
 #Add snapcam in privapp list
 persist.vendor.camera.privapp.list=org.codeaurora.snapcam
@@ -139,6 +140,9 @@
 # Property for backup NTP Server
 persist.backup.ntpServer="0.pool.ntp.org"
 
+# Enable in-band ring
+persist.bluetooth.disableinbandringing=false
+
 #Property to enable Mag filter
 persist.vendor.sensors.enable.mag_filter=true
 
@@ -154,3 +158,28 @@
 #Battery Property
 ro.charger.enable_suspend = 1
 
+#for double sensor to control screen 
+ro.config.double_lightsensor=true
+
+ro.com.google.clientidbase=android-alcatel
+
+#Modify begin by shaopan.tang 2021-06-01 [FP4-429]vowifi not work
+persist.vendor.data.iwlan.enable=true
+
+#Modify by shaopan.tang 2021-06-15 [FP4-870]Disable VT
+persist.dbg.vt_avail_ovr=0
+
+#Modify by shaopan.tang 2021-07-21 [FP4-1539]esim removed after factory reset
+masterclear.allow_retain_esim_profiles_after_fdr=1
+
+#Modify by renjie.zhang  [FP4-2125][GCF_FT]F51_3 IPv6 Privacy Extension verification
+persist.vendor.data.profile_update=true
+
+#FP4-2872, disable ramdump
+persist.vendor.ssr.restart_level=ALL_ENABLE
+
+# FP4-3340 Google Lens integration 
+ro.com.google.lens.oem_image_package=com.fp.camera
+
+# FP4-3383 Google Lens integration 
+ro.com.google.lens.oem_camera_package=com.fp.camera