Convert Android.mk file to Android.bp.

See build/soong/README.md for more information.

Bug: 122333222
Test: treehugger
Change-Id: I4adefe19b3001206f3b080ae7b551115a8df62cc
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..1fab3bc
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,17 @@
+android_app {
+    name: "BlockedNumberProvider",
+
+    // Only compile source java files in this apk.
+    srcs: ["src/**/*.java"],
+    static_libs: [
+        "android-common",
+        "guava",
+    ],
+    jacoco: {
+        include_filter: ["com.android.providers.blockednumber.*"],
+    },
+    platform_apis: true,
+    certificate: "shared",
+    privileged: true,
+
+}
diff --git a/Android.mk b/Android.mk
deleted file mode 100644
index e5afdfb..0000000
--- a/Android.mk
+++ /dev/null
@@ -1,21 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-# Only compile source java files in this apk.
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_STATIC_JAVA_LIBRARIES += android-common guava
-
-LOCAL_JACK_COVERAGE_INCLUDE_FILTER := com.android.providers.blockednumber.*
-
-LOCAL_PACKAGE_NAME := BlockedNumberProvider
-LOCAL_PRIVATE_PLATFORM_APIS := true
-LOCAL_CERTIFICATE := shared
-LOCAL_PRIVILEGED_MODULE := true
-
-include $(BUILD_PACKAGE)
-
-# Use the following include to make our test apk.
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/tests/Android.bp b/tests/Android.bp
new file mode 100644
index 0000000..e4e57ed
--- /dev/null
+++ b/tests/Android.bp
@@ -0,0 +1,21 @@
+android_test {
+    name: "BlockedNumberProviderTest",
+    static_libs: [
+        "mockito-target-minus-junit4",
+        "android-support-test",
+    ],
+    libs: [
+        "android.test.runner",
+        "android.test.base",
+        "android.test.mock",
+    ],
+    // Only compile source java files in this apk.
+    srcs: ["src/**/*.java"],
+    platform_apis: true,
+    test_suites: ["device-tests"],
+    instrumentation_for: "BlockedNumberProvider",
+    certificate: "shared",
+    optimize: {
+        enabled: false,
+    },
+}
diff --git a/tests/Android.mk b/tests/Android.mk
deleted file mode 100644
index 379f7b8..0000000
--- a/tests/Android.mk
+++ /dev/null
@@ -1,25 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-# We only want this apk build for tests.
-LOCAL_MODULE_TAGS := tests
-
-LOCAL_STATIC_JAVA_LIBRARIES := \
-    mockito-target-minus-junit4 \
-    android-support-test
-
-LOCAL_JAVA_LIBRARIES := android.test.runner android.test.base android.test.mock
-
-# Only compile source java files in this apk.
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_PACKAGE_NAME := BlockedNumberProviderTest
-LOCAL_PRIVATE_PLATFORM_APIS := true
-LOCAL_COMPATIBILITY_SUITE := device-tests
-
-LOCAL_INSTRUMENTATION_FOR := BlockedNumberProvider
-LOCAL_CERTIFICATE := shared
-
-LOCAL_PROGUARD_ENABLED := disabled
-
-include $(BUILD_PACKAGE)