Remove references to libchrome
Removed dependencies on libchrome which was used mostly for logging
and switched over to standard Android log macros.
Bug: None
Test: `m -j32` still succeeds
Change-Id: I0a841c19c15c02f9a031af200e82837f9450d88a
diff --git a/libs/vr/libgvr/Android.mk b/libs/vr/libgvr/Android.mk
index 0fcf94b..be78605 100644
--- a/libs/vr/libgvr/Android.mk
+++ b/libs/vr/libgvr/Android.mk
@@ -68,14 +68,12 @@
libhardware \
liblog \
libsync \
- libevent \
libprotobuf-cpp-full
LOCAL_STATIC_LIBRARIES := \
libdisplay \
libbufferhub \
libbufferhubqueue \
- libchrome \
libdvrcommon \
libeds \
libdvrgraphics \
@@ -125,7 +123,6 @@
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
LOCAL_SRC_FILES := dummy_gvr_ext.cpp
-LOCAL_STATIC_LIBRARIES := libchrome
LOCAL_LDLIBS := -llog
LOCAL_MODULE_TAGS := optional
LOCAL_SHARED_LIBRARIES += libgvr
diff --git a/libs/vr/libgvr/dummy_gvr_ext.cpp b/libs/vr/libgvr/dummy_gvr_ext.cpp
index c507038..f73838d 100644
--- a/libs/vr/libgvr/dummy_gvr_ext.cpp
+++ b/libs/vr/libgvr/dummy_gvr_ext.cpp
@@ -1,4 +1,4 @@
-#include <base/logging.h>
+#include <log/log.h>
#include <vr/gvr/capi/include/gvr.h>
#include <vr/gvr/capi/include/gvr_ext.h>
#include <vr/gvr/capi/include/gvr_types.h>
@@ -14,8 +14,8 @@
gvr_mat4f gvr_get_6dof_head_pose_in_start_space(gvr_context* gvr,
uint32_t /* vsync_count */) {
- LOG(FATAL) << "gvr_get_6dof_head_pose_in_start_space is not implemented. "
- << "Use gvr_get_head_space_from_start_space_pose instead.";
+ LOG_ALWAYS_FATAL("gvr_get_6dof_head_pose_in_start_space is not implemented. "
+ "Use gvr_get_head_space_from_start_space_pose instead.");
return gvr_mat4f({{{1.0f, 0.0f, 0.0f, 0.0f},
{0.0f, 1.0f, 0.0f, 0.0f},
{0.0f, 0.0f, 1.0f, 0.0f},
@@ -25,5 +25,5 @@
void gvr_wait_next_frame(gvr_swap_chain* /* swap_chain */,
int64_t /* sched_offset_nanos */,
gvr_frame_schedule* /* out_next_frame_schedule */) {
- LOG(FATAL) << "gvr_wait_next_frame is not implemented.";
+ LOG_ALWAYS_FATAL("gvr_wait_next_frame is not implemented.");
}
diff --git a/libs/vr/libgvr/shim_gvr.cpp b/libs/vr/libgvr/shim_gvr.cpp
index 264952e..fa8a655 100644
--- a/libs/vr/libgvr/shim_gvr.cpp
+++ b/libs/vr/libgvr/shim_gvr.cpp
@@ -19,10 +19,10 @@
#endif
#endif
-#include <cutils/log.h>
#include <dvr/graphics.h>
#include <dvr/performance_client_api.h>
#include <dvr/pose_client.h>
+#include <log/log.h>
#include <private/dvr/buffer_hub_queue_core.h>
#include <private/dvr/buffer_hub_queue_producer.h>
#include <private/dvr/clock_ns.h>
@@ -1326,14 +1326,14 @@
}
void* gvr_external_surface_get_surface(const gvr_external_surface* surface) {
- CHECK(surface->swap_chain != nullptr &&
- surface->swap_chain->context != nullptr &&
- surface->swap_chain->context->jni_env_ != nullptr)
- << "gvr_external_surface_get_surface: Surface must be constructed within "
- << "a JNIEnv. Check |gvr_create| call.";
+ LOG_ALWAYS_FATAL_IF(surface->swap_chain == nullptr ||
+ surface->swap_chain->context == nullptr ||
+ surface->swap_chain->context->jni_env_ == nullptr,
+ "gvr_external_surface_get_surface: Surface must be "
+ "constructed within a JNIEnv. Check |gvr_create| call.");
- CHECK(surface->video_surface != nullptr)
- << "gvr_external_surface_get_surface: Invalid surface.";
+ LOG_ALWAYS_FATAL_IF(surface->video_surface == nullptr,
+ "gvr_external_surface_get_surface: Invalid surface.");
std::shared_ptr<android::dvr::ProducerQueue> producer_queue =
surface->video_surface->client->GetProducerQueue();
diff --git a/libs/vr/libgvr/shim_gvr_controller.cpp b/libs/vr/libgvr/shim_gvr_controller.cpp
index 54bc270..0f55903 100644
--- a/libs/vr/libgvr/shim_gvr_controller.cpp
+++ b/libs/vr/libgvr/shim_gvr_controller.cpp
@@ -1,6 +1,6 @@
#define LOG_TAG "libgvr_controller_shim"
-#include <cutils/log.h>
+#include <log/log.h>
#include <vr/gvr/capi/include/gvr_controller.h>
#include <vr/gvr/capi/include/gvr_types.h>
diff --git a/libs/vr/libgvr/shim_gvr_private.cpp b/libs/vr/libgvr/shim_gvr_private.cpp
index 6ab6971..25a5110 100644
--- a/libs/vr/libgvr/shim_gvr_private.cpp
+++ b/libs/vr/libgvr/shim_gvr_private.cpp
@@ -1,6 +1,6 @@
#define LOG_TAG "libgvr_shim_private"
-#include <cutils/log.h>
+#include <log/log.h>
#include <private/dvr/display_rpc.h>
#include <private/dvr/internal_types.h>
#include <vr/gvr/capi/include/gvr.h>
@@ -42,7 +42,7 @@
serialized_viewer_params_size_bytes);
std::unique_ptr<proto::DeviceParams> device_params(new proto::DeviceParams);
if (!device_params->ParseFromString(serialized_device_params_string)) {
- LOG(ERROR) << "Invalid serialized Cardboard DeviceParams";
+ ALOGE("Invalid serialized Cardboard DeviceParams");
return false;
}