Merge "Migrate dumpstate hal's Android.mk to Android.bp" into cuttlefish-testing
diff --git a/guest/Android.bp b/guest/Android.bp
index ba07c2e..f96426d 100644
--- a/guest/Android.bp
+++ b/guest/Android.bp
@@ -17,4 +17,5 @@
"commands",
"hals/health",
"hals/hwcomposer",
+ "monitoring/dumpstate_ext",
]
diff --git a/guest/monitoring/dumpstate_ext/Android.bp b/guest/monitoring/dumpstate_ext/Android.bp
new file mode 100644
index 0000000..03f7b9f
--- /dev/null
+++ b/guest/monitoring/dumpstate_ext/Android.bp
@@ -0,0 +1,41 @@
+//
+// Copyright (C) 2019 The Android Open Source 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.
+
+cc_binary {
+ name: "android.hardware.dumpstate@1.0-service.cuttlefish",
+ srcs: [
+ "dumpstate_device.cpp",
+ "service.cpp",
+ ],
+ shared_libs: [
+ "android.hardware.dumpstate@1.0",
+ "libbase",
+ "libcutils",
+ "libdumpstateutil",
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "liblog",
+ "libutils",
+ ],
+ cflags: [
+ "-DLOG_TAG=\"VSoC-dumpstate\"",
+ ],
+ relative_install_path: "hw",
+ init_rc: [
+ "android.hardware.dumpstate@1.0-service.cuttlefish.rc",
+ ],
+ defaults: ["cuttlefish_guest_only"]
+}
diff --git a/guest/monitoring/dumpstate_ext/Android.mk b/guest/monitoring/dumpstate_ext/Android.mk
deleted file mode 100644
index d425821..0000000
--- a/guest/monitoring/dumpstate_ext/Android.mk
+++ /dev/null
@@ -1,59 +0,0 @@
-# Copyright (C) 2017 The Android Open Source 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.
-
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_C_INCLUDES := \
- device/google/cuttlefish_common
-LOCAL_CFLAGS := $(VSOC_VERSION_CFLAGS) -DLOG_TAG=\"VSoC-dumpstate\"
-LOCAL_SRC_FILES := dumpstate.cpp
-LOCAL_MODULE := libdumpstate.vsoc
-LOCAL_MODULE_TAGS := optional
-LOCAL_SHARED_LIBRARIES := \
- libbase \
- libdumpstateaidl \
- libdumpstateutil \
- libziparchive \
- libz
-include $(BUILD_STATIC_LIBRARY)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := android.hardware.dumpstate@1.0-service.cuttlefish
-LOCAL_INIT_RC := android.hardware.dumpstate@1.0-service.cuttlefish.rc
-LOCAL_MODULE_RELATIVE_PATH := hw
-LOCAL_SRC_FILES := \
- dumpstate_device.cpp \
- service.cpp
-LOCAL_CFLAGS := $(VSOC_VERSION_CFLAGS) -DLOG_TAG=\"VSoC-dumpstate\"
-LOCAL_SHARED_LIBRARIES := \
- android.hardware.dumpstate@1.0 \
- libbase \
- libcutils \
- libdumpstateutil \
- libhidlbase \
- libhidltransport \
- libhwbinder \
- liblog \
- libutils
-LOCAL_C_INCLUDES := \
- device/google/cuttlefish_common \
- frameworks/native/cmds/dumpstate
-
-LOCAL_MODULE_TAGS := optional
-LOCAL_PROPRIETARY_MODULE := true
-LOCAL_VENDOR_MODULE := true
-include $(BUILD_EXECUTABLE)
diff --git a/guest/monitoring/dumpstate_ext/dumpstate.cpp b/guest/monitoring/dumpstate_ext/dumpstate.cpp
deleted file mode 100644
index 89e820b..0000000
--- a/guest/monitoring/dumpstate_ext/dumpstate.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source 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.
- */
-#include "guest/libs/platform_support/api_level_fixes.h"
-
-#if VSOC_PLATFORM_SDK_BEFORE(N)
-extern "C" {
-#endif
-#include <dumpstate.h>
-#if VSOC_PLATFORM_SDK_BEFORE(N)
-}
-#endif
-
-void dumpstate_board() { Dumpstate& ds = Dumpstate::GetInstance(); };