Ensure the product model sticks to FP2

Make sure the build.prop will use the proper product model
instead of the fancy flavour name.

Issue: FP2N-161
Issue: FP2P-182
Change-Id: Ie3dd23e97ec750869a4e0c4ff560b6a7cd61d42c
Depends-On: Ie4224d608b7bcb0c2087bd77bc954f8f5f9b6495
Depends-On: Ib4de30ef59c89eef248279592d174d8647ab269b
(cherry picked from commit d3b3be959155b32d0435e3f69ecb81b5b576cc84)
diff --git a/device.mk b/device.mk
index 2073d67..ff5e31b 100644
--- a/device.mk
+++ b/device.mk
@@ -42,11 +42,16 @@
 TARGET_ENABLE_QC_AV_ENHANCEMENTS := true
 endif #TARGET_USES_QCOM_BSP
 
-PRODUCT_NAME := FP2
 PRODUCT_DEVICE := FP2
 PRODUCT_BRAND := Fairphone
 PRODUCT_MANUFACTURER := Fairphone
 
+# The product flavors will set PRODUCT_NAME and PRODUCT_MODEL to something else
+# but really, we are not allowed to change it because it was certified like this.
+# To not break the build system and still have some properties set with the fancy
+# flavour name, we only override the variables in the generated build.prop file.
+PRODUCT_BUILD_PROP_OVERRIDES += PRODUCT_MODEL=FP2 PRODUCT_NAME=FP2
+
 # Define the build number based on the product flavour and on the build manifest
 # revision
 ifneq (,$(strip $(PRODUCT_FLAVOR)))