lineage: Add goldfish privapp whitelist and move to common lineage makefile
Lineage GSIs now work.
Test: lunch lineage_arm64-eng; m -j systemimage
Change-Id: I416b184b4f601f12871f7c4da0181b189d91a21b
diff --git a/build/target/product/lineage_arm.mk b/build/target/product/lineage_arm.mk
index 4ce098e..97bbe3e 100644
--- a/build/target/product/lineage_arm.mk
+++ b/build/target/product/lineage_arm.mk
@@ -1,4 +1,4 @@
-# Copyright (C) 2018 The LineageOS Project
+# Copyright (C) 2018-2019 The LineageOS Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -13,10 +13,8 @@
# limitations under the License.
$(call inherit-product, build/target/product/aosp_arm.mk)
-$(call inherit-product, vendor/lineage/config/common.mk)
-# Allow building otatools
-TARGET_FORCE_OTA_PACKAGE := true
+include vendor/lineage/build/target/product/lineage_generic_target.mk
TARGET_USES_64_BIT_BINDER := true
diff --git a/build/target/product/lineage_arm64.mk b/build/target/product/lineage_arm64.mk
index d2d0bc0..b46c4e5 100644
--- a/build/target/product/lineage_arm64.mk
+++ b/build/target/product/lineage_arm64.mk
@@ -1,4 +1,4 @@
-# Copyright (C) 2018 The LineageOS Project
+# Copyright (C) 2018-2019 The LineageOS Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -13,9 +13,7 @@
# limitations under the License.
$(call inherit-product, build/target/product/aosp_arm64.mk)
-$(call inherit-product, vendor/lineage/config/common.mk)
-# Allow building otatools
-TARGET_FORCE_OTA_PACKAGE := true
+include vendor/lineage/build/target/product/lineage_generic_target.mk
PRODUCT_NAME := lineage_arm64
diff --git a/build/target/product/lineage_generic_target.mk b/build/target/product/lineage_generic_target.mk
new file mode 100644
index 0000000..9dc994e
--- /dev/null
+++ b/build/target/product/lineage_generic_target.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2019 The LineageOS 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.
+
+$(call inherit-product, vendor/lineage/config/common.mk)
+
+PRODUCT_COPY_FILES += \
+ device/generic/goldfish/data/etc/permissions/privapp-permissions-goldfish.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/permissions/privapp-permissions-goldfish.xml \
+
+# Allow building otatools
+TARGET_FORCE_OTA_PACKAGE := true
diff --git a/build/target/product/lineage_x86.mk b/build/target/product/lineage_x86.mk
index 51cf752..8dc7575 100644
--- a/build/target/product/lineage_x86.mk
+++ b/build/target/product/lineage_x86.mk
@@ -1,4 +1,4 @@
-# Copyright (C) 2018 The LineageOS Project
+# Copyright (C) 2018-2019 The LineageOS Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -13,10 +13,8 @@
# limitations under the License.
$(call inherit-product, build/target/product/aosp_x86.mk)
-$(call inherit-product, vendor/lineage/config/common.mk)
-# Allow building otatools
-TARGET_FORCE_OTA_PACKAGE := true
+include vendor/lineage/build/target/product/lineage_generic_target.mk
TARGET_USES_64_BIT_BINDER := true
diff --git a/build/target/product/lineage_x86_64.mk b/build/target/product/lineage_x86_64.mk
index 704917d..69418b1 100644
--- a/build/target/product/lineage_x86_64.mk
+++ b/build/target/product/lineage_x86_64.mk
@@ -1,4 +1,4 @@
-# Copyright (C) 2018 The LineageOS Project
+# Copyright (C) 2018-2019 The LineageOS Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -13,9 +13,7 @@
# limitations under the License.
$(call inherit-product, build/target/product/aosp_x86_64.mk)
-$(call inherit-product, vendor/lineage/config/common.mk)
-# Allow building otatools
-TARGET_FORCE_OTA_PACKAGE := true
+include vendor/lineage/build/target/product/lineage_generic_target.mk
PRODUCT_NAME := lineage_x86_64