Merge 'goog/master' into gce-dev

Test: TreeHugger
Change-Id: I461a47f02f7dd7b443aa3d1edb0ce2254fef5a11
diff --git a/Android.bp b/Android.bp
index 74c5fa5..e63080d 100644
--- a/Android.bp
+++ b/Android.bp
@@ -21,6 +21,7 @@
 
 cc_library_headers {
     name: "cuttlefish_common_headers",
+    vendor: true,
     export_include_dirs: ["."],
     host_supported: true,
 }
@@ -28,6 +29,7 @@
 // TODO(b/67435044) Update the include paths and remove this
 cc_library_headers {
     name: "cuttlefish_glog",
+    vendor: true,
     export_include_dirs: ["common/libs"],
     host_supported: true,
 }
@@ -45,7 +47,6 @@
             cflags: ["-DCUTTLEFISH_HOST"],
         },
         // We don't need 32 bit host-side builds
-        // TODO(ghartman): linux_glibc on master
         linux_x86: {
             enabled: false,
         },
@@ -104,7 +105,6 @@
         "liblog",
     ],
     target: {
-        //TODO(ghartman): linux_glibc on master
         linux: {
             srcs: [
                 "host/vsoc/lib/gralloc_buffer_region_view.cpp",
diff --git a/guest/commands/wifirouter/Android.bp b/guest/commands/wifirouter/Android.bp
index 1bb89af..741ca7c 100644
--- a/guest/commands/wifirouter/Android.bp
+++ b/guest/commands/wifirouter/Android.bp
@@ -20,9 +20,11 @@
     static_libs: [
         "libbase",
         "libgflags",
-        "liblog",
         "libnl",
     ],
+    shared_libs: [
+        "liblog",
+    ],
     header_libs: [
         "cuttlefish_common_headers",
         "cuttlefish_glog",
diff --git a/guest/hals/camera/Android.mk b/guest/hals/camera/Android.mk
index ced3f91..e1314b8 100644
--- a/guest/hals/camera/Android.mk
+++ b/guest/hals/camera/Android.mk
@@ -108,12 +108,23 @@
 jpeg_module_relative_path := hw
 jpeg_cflags := -fno-short-enums
 jpeg_cflags += -Wno-unused-parameter
+ifeq (0, $(shell test $(PLATFORM_SDK_VERSION) -lt 27 ; echo $$?))
+GCE_HWUI_LIB:=libskia
+GCE_HWUI_INCLUDE:=external/skia/include/core
+else ifeq (0, $(shell test $(PLATFORM_SDK_VERSION) -eq 27 -a $(PLATFORM_PREVIEW_SDK_VERSION) -eq 0; echo $$?))
+GCE_HWUI_LIB:=libskia
+GCE_HWUI_INCLUDE:=external/skia/include/core
+else
+GCE_HWUI_LIB:=libhwui
+GCE_HWUI_INCLUDE:=
+endif
+
 jpeg_clang_flags += -Wno-c++11-narrowing
 jpeg_shared_libraries := \
     libbase \
     libcutils \
     liblog \
-    libskia \
+    $(GCE_HWUI_LIB) \
     libjpeg \
     libandroid_runtime \
     cuttlefish_auto_resources
@@ -121,7 +132,7 @@
 jpeg_c_includes := \
     device/google/cuttlefish_common \
     external/libyuv/files/include \
-    external/skia/include/core/ \
+    $(GCE_HWUI_INCLUDE) \
     frameworks/base/core/jni/android/graphics \
     frameworks/native/include
 jpeg_src := \
diff --git a/guest/hals/camera/CallbackNotifier.cpp b/guest/hals/camera/CallbackNotifier.cpp
old mode 100755
new mode 100644
diff --git a/guest/hals/camera/CallbackNotifier.h b/guest/hals/camera/CallbackNotifier.h
old mode 100755
new mode 100644
diff --git a/guest/hals/camera/Converters.cpp b/guest/hals/camera/Converters.cpp
old mode 100755
new mode 100644
diff --git a/guest/hals/camera/Converters.h b/guest/hals/camera/Converters.h
old mode 100755
new mode 100644
diff --git a/guest/hals/camera/EmulatedCamera.cpp b/guest/hals/camera/EmulatedCamera.cpp
old mode 100755
new mode 100644
diff --git a/guest/hals/camera/EmulatedCamera.h b/guest/hals/camera/EmulatedCamera.h
old mode 100755
new mode 100644
diff --git a/guest/hals/camera/EmulatedCameraCommon.h b/guest/hals/camera/EmulatedCameraCommon.h
old mode 100755
new mode 100644
diff --git a/guest/hals/camera/EmulatedCameraDevice.cpp b/guest/hals/camera/EmulatedCameraDevice.cpp
old mode 100755
new mode 100644
diff --git a/guest/hals/camera/EmulatedCameraDevice.h b/guest/hals/camera/EmulatedCameraDevice.h
old mode 100755
new mode 100644
diff --git a/guest/hals/camera/EmulatedCameraFactory.cpp b/guest/hals/camera/EmulatedCameraFactory.cpp
old mode 100755
new mode 100644
diff --git a/guest/hals/camera/EmulatedCameraFactory.h b/guest/hals/camera/EmulatedCameraFactory.h
old mode 100755
new mode 100644
diff --git a/guest/hals/camera/EmulatedCameraHal.cpp b/guest/hals/camera/EmulatedCameraHal.cpp
old mode 100755
new mode 100644
diff --git a/guest/hals/camera/EmulatedFakeCamera.cpp b/guest/hals/camera/EmulatedFakeCamera.cpp
old mode 100755
new mode 100644
diff --git a/guest/hals/camera/EmulatedFakeCamera.h b/guest/hals/camera/EmulatedFakeCamera.h
old mode 100755
new mode 100644
diff --git a/guest/hals/camera/EmulatedFakeCameraDevice.cpp b/guest/hals/camera/EmulatedFakeCameraDevice.cpp
old mode 100755
new mode 100644
diff --git a/guest/hals/camera/EmulatedFakeCameraDevice.h b/guest/hals/camera/EmulatedFakeCameraDevice.h
old mode 100755
new mode 100644
diff --git a/guest/hals/camera/EmulatedQemuCamera.cpp b/guest/hals/camera/EmulatedQemuCamera.cpp
old mode 100755
new mode 100644
diff --git a/guest/hals/camera/EmulatedQemuCamera.h b/guest/hals/camera/EmulatedQemuCamera.h
old mode 100755
new mode 100644
diff --git a/guest/hals/camera/EmulatedQemuCameraDevice.cpp b/guest/hals/camera/EmulatedQemuCameraDevice.cpp
old mode 100755
new mode 100644
diff --git a/guest/hals/camera/EmulatedQemuCameraDevice.h b/guest/hals/camera/EmulatedQemuCameraDevice.h
old mode 100755
new mode 100644
diff --git a/guest/hals/camera/PreviewWindow.cpp b/guest/hals/camera/PreviewWindow.cpp
old mode 100755
new mode 100644
diff --git a/guest/hals/camera/PreviewWindow.h b/guest/hals/camera/PreviewWindow.h
old mode 100755
new mode 100644
diff --git a/guest/hals/camera/QemuClient.cpp b/guest/hals/camera/QemuClient.cpp
old mode 100755
new mode 100644
diff --git a/guest/hals/camera/QemuClient.h b/guest/hals/camera/QemuClient.h
old mode 100755
new mode 100644
diff --git a/guest/libs/legacy_framebuffer/vsoc_framebuffer.h b/guest/libs/legacy_framebuffer/vsoc_framebuffer.h
index 9f1d405..873c2fc 100644
--- a/guest/libs/legacy_framebuffer/vsoc_framebuffer.h
+++ b/guest/libs/legacy_framebuffer/vsoc_framebuffer.h
@@ -15,7 +15,6 @@
  * limitations under the License.
  */
 
-#include <UniquePtr.h>
 #include <pthread.h>
 #include <sys/mman.h>
 #include <climits>
@@ -36,6 +35,8 @@
 class VSoCFrameBuffer {
 public:
   static const VSoCFrameBuffer& getInstance();
+  VSoCFrameBuffer(const VSoCFrameBuffer&) = delete;
+  VSoCFrameBuffer& operator=(const VSoCFrameBuffer&) = delete;
 
   static int align(int input, int alignment = kAlignment) {
     return (input + alignment - 1) & -alignment;
@@ -104,7 +105,6 @@
   static const int kBitsPerPixel = sizeof(Pixel) * CHAR_BIT;
   // Length of a scan-line in bytes.
   int line_length_;
-  DISALLOW_COPY_AND_ASSIGN(VSoCFrameBuffer);
 };
 
 const char* pixel_format_to_string(int format);
diff --git a/guest/monitoring/dumpstate_ext/Android.mk b/guest/monitoring/dumpstate_ext/Android.mk
index 3fcd22f..d425821 100644
--- a/guest/monitoring/dumpstate_ext/Android.mk
+++ b/guest/monitoring/dumpstate_ext/Android.mk
@@ -26,6 +26,7 @@
     libbase \
     libdumpstateaidl \
     libdumpstateutil \
+    libziparchive \
     libz
 include $(BUILD_STATIC_LIBRARY)
 
diff --git a/host/libs/config/guest_config.h b/host/libs/config/guest_config.h
index 5d4c566..462ed6c 100644
--- a/host/libs/config/guest_config.h
+++ b/host/libs/config/guest_config.h
@@ -17,6 +17,7 @@
 
 #include <libxml/tree.h>
 #include <memory>
+#include <string>
 
 namespace config {
 // GuestConfig builds XML document describing target VM.