Merge remote-tracking branch 'goog/qcom/release/LA.UM.8.1.C9.09.00.00.518.343'

Bug: 146759211
Change-Id: I7e90b1f60353762b17bf0d1f5583767644cea12f
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..9ea668a
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,29 @@
+/*
+Copyright (c) 2013 - 2017, The Linux Foundation. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above
+      copyright notice, this list of conditions and the following
+      disclaimer in the documentation and/or other materials provided
+      with the distribution.
+    * Neither the name of The Linux Foundation nor the names of its
+      contributors may be used to endorse or promote products derived
+      from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
diff --git a/MODULE_LICENSE_BSD b/MODULE_LICENSE_BSD
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/MODULE_LICENSE_BSD
diff --git a/NOTICE b/NOTICE
new file mode 100644
index 0000000..9ea668a
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,29 @@
+/*
+Copyright (c) 2013 - 2017, The Linux Foundation. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above
+      copyright notice, this list of conditions and the following
+      disclaimer in the documentation and/or other materials provided
+      with the distribution.
+    * Neither the name of The Linux Foundation nor the names of its
+      contributors may be used to endorse or promote products derived
+      from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
diff --git a/hal/Android.mk b/hal/Android.mk
index 6ebca46..e588c68 100644
--- a/hal/Android.mk
+++ b/hal/Android.mk
@@ -14,7 +14,6 @@
 #LOCAL_CPP_FLAGS := -Wall -Werror
 LOCAL_SHARED_LIBRARIES := libhwbinder \
                         libhidlbase \
-                        libhidltransport \
                         liblog \
                         libcutils \
                         libdl \
diff --git a/ipacm/inc/IPACM_Netlink.h b/ipacm/inc/IPACM_Netlink.h
index 81f1968..7a1a939 100644
--- a/ipacm/inc/IPACM_Netlink.h
+++ b/ipacm/inc/IPACM_Netlink.h
@@ -52,8 +52,6 @@
 #include <sys/select.h>
 #include <sys/socket.h>
 #include <linux/socket.h>
-#include <inaddr.h>
-#define sockaddr_storage __kernel_sockaddr_storage
 #include <linux/if.h>
 #include <linux/if_addr.h>
 #include <linux/rtnetlink.h>
diff --git a/ipacm/src/Android.mk b/ipacm/src/Android.mk
index a4d6d98..634308a 100644
--- a/ipacm/src/Android.mk
+++ b/ipacm/src/Android.mk
@@ -40,15 +40,14 @@
 LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
 LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
 
-LOCAL_CFLAGS := -v
-LOCAL_CFLAGS += -DFEATURE_IPA_ANDROID
+LOCAL_CFLAGS := -DFEATURE_IPA_ANDROID
 LOCAL_CFLAGS += -DFEATURE_IPACM_RESTART
 
 ifeq ($(call is-board-platform-in-list,$(BOARD_ETH_BRIDGE_LIST)),true)
 LOCAL_CFLAGS += -DFEATURE_ETH_BRIDGE_LE
 endif
 
-LOCAL_CFLAGS += -DFEATURE_IPACM_HAL -Wall -Werror -Wno-error=macro-redefined
+LOCAL_CFLAGS += -DFEATURE_IPACM_HAL -Wall -Werror -Wno-error=macro-redefined -Wno-enum-compare
 ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
 LOCAL_CFLAGS += -DDEBUG
 endif
@@ -62,6 +61,9 @@
 filetoadd = bionic/libc/kernel/arch-arm/asm/byteorder.h
 LOCAL_CFLAGS += $(shell if [ -a $(filetoadd) ] ; then echo -include $(filetoadd) ; fi ;)
 
+# Allow warnings in IPACM_Main.cpp until they are fixed.
+LOCAL_CFLAGS += -Wno-error=implicit-fallthrough
+
 LOCAL_SRC_FILES := IPACM_Main.cpp \
 		IPACM_EvtDispatcher.cpp \
 		IPACM_Config.cpp \
@@ -96,7 +98,6 @@
 LOCAL_SHARED_LIBRARIES += libnetfilter_conntrack
 LOCAL_SHARED_LIBRARIES += libhwbinder \
                 libhidlbase \
-                libhidltransport \
                 liblog \
                 libcutils \
                 libdl \
diff --git a/ipacm/src/ipacm.rc b/ipacm/src/ipacm.rc
index c1c876b..b2658b6 100644
--- a/ipacm/src/ipacm.rc
+++ b/ipacm/src/ipacm.rc
@@ -30,5 +30,7 @@
     user radio
     group radio inet
 
-on post-fs
+on post-fs-data
+    mkdir /data/vendor/ipa 0770 radio radio
+    chmod 0770 /data/vendor/ipa
     start vendor.ipacm
diff --git a/os_pickup.bp b/os_pickup.bp
new file mode 100644
index 0000000..4cfddc8
--- /dev/null
+++ b/os_pickup.bp
@@ -0,0 +1,17 @@
+//hardware/qcom/sm8150/Android.bp links to this file
+bootstrap_go_package {
+    name: "soong-display_defaults",
+    pkgPath: "android/soong/hardware/qcom/sm8150/display",
+    deps: [
+        "blueprint",
+        "blueprint-pathtools",
+        "soong",
+        "soong-android",
+        "soong-cc",
+        "soong-genrule",
+    ],
+    srcs: [
+        "display/display_defaults.go",
+    ],
+    pluginFor: ["soong_build"],
+}
diff --git a/os_pickup.mk b/os_pickup.mk
new file mode 100644
index 0000000..b247490
--- /dev/null
+++ b/os_pickup.mk
@@ -0,0 +1,6 @@
+ifeq ($(PRODUCT_PLATFORM),sm8150)
+ifneq ($(BUILD_WITHOUT_VENDOR), true)
+LOCAL_PATH := $(call my-dir)
+include $(call first-makefiles-under,$(LOCAL_PATH))
+endif
+endif