Merge "[MultiDisplay] Convert the Android.mk to Android.bp"
diff --git a/MultiDisplayProvider/Android.bp b/MultiDisplayProvider/Android.bp
new file mode 100644
index 0000000..635207d
--- /dev/null
+++ b/MultiDisplayProvider/Android.bp
@@ -0,0 +1,26 @@
+// 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.
+
+android_app {
+    name: "MultiDisplayProvider",
+
+    // Build the application.
+
+    privileged: true,
+    srcs: ["src/**/*.java"],
+    platform_apis: true,
+    certificate: "platform",
+    resource_dirs: ["res"],
+    jni_libs: ["libemulator_multidisplay_jni"],
+}
diff --git a/MultiDisplayProvider/Android.mk b/MultiDisplayProvider/Android.mk
deleted file mode 100644
index 21918a8..0000000
--- a/MultiDisplayProvider/Android.mk
+++ /dev/null
@@ -1,28 +0,0 @@
-# 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.
-
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-# Build the application.
-LOCAL_MODULE_TAGS := optional
-LOCAL_PRIVILEGED_MODULE := true
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-LOCAL_PACKAGE_NAME := MultiDisplayProvider
-LOCAL_PRIVATE_PLATFORM_APIS := true
-LOCAL_CERTIFICATE := platform
-LOCAL_RESOURCE_DIR = $(LOCAL_PATH)/res
-LOCAL_JNI_SHARED_LIBRARIES := libemulator_multidisplay_jni
-include $(BUILD_PACKAGE)
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/MultiDisplayProvider/jni/Android.bp b/MultiDisplayProvider/jni/Android.bp
new file mode 100644
index 0000000..4e8c06c
--- /dev/null
+++ b/MultiDisplayProvider/jni/Android.bp
@@ -0,0 +1,37 @@
+// 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.
+
+cc_library_shared {
+    name: "libemulator_multidisplay_jni",
+
+    srcs: ["com_android_emulator_multidisplay.cpp"],
+
+    include_dirs: ["system/core/base/include"],
+
+    shared_libs: [
+        "libandroid_runtime",
+        "libnativehelper",
+        "libcutils",
+        "libutils",
+        "liblog",
+        "libui",
+        "libgui",
+    ],
+
+    cflags: [
+        "-Wall",
+        "-Wextra",
+        "-Wno-unused-parameter",
+    ],
+}
diff --git a/MultiDisplayProvider/jni/Android.mk b/MultiDisplayProvider/jni/Android.mk
deleted file mode 100644
index 7ab3c03..0000000
--- a/MultiDisplayProvider/jni/Android.mk
+++ /dev/null
@@ -1,41 +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_SRC_FILES:= \
-    com_android_emulator_multidisplay.cpp
-
-LOCAL_C_INCLUDES += \
-    $(JNI_H_INCLUDE) \
-    system/core/base/include \
-
-LOCAL_SHARED_LIBRARIES := \
-    libandroid_runtime \
-    libnativehelper \
-    libcutils \
-    libutils \
-    liblog \
-    libui \
-    libgui \
-
-LOCAL_CFLAGS += -Wall -Wextra -Wno-unused-parameter
-
-LOCAL_MODULE := libemulator_multidisplay_jni
-LOCAL_MODULE_TAGS := optional
-LOCAL_PROGUARD_ENABLED := disabled
-
-include $(BUILD_SHARED_LIBRARY)