Updater: Convert to blueprint

Drop "UpdaterStudio" module while at it, considering that aidegen
can be used to compile Lineage Updater with Android Studio.

Change-Id: I828338461d0277992bfb301c2f785116c12dfc8a
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..b4c6611
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,55 @@
+//
+// Copyright (C) 2022 The LineageOS 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: "Updater",
+
+    // Include SettingsLib and its dependencies
+    defaults: ["SettingsLibDefaults"],
+
+    srcs: ["src/**/*.java"],
+    resource_dirs: ["res"],
+
+    static_libs: [
+        "com.google.android.material_material",
+        "androidx.core_core",
+        "androidx.appcompat_appcompat",
+        "androidx.cardview_cardview",
+        "androidx.localbroadcastmanager_localbroadcastmanager",
+        "androidx.preference_preference",
+        "androidx.recyclerview_recyclerview",
+    ],
+
+    platform_apis: true,
+    privileged: true,
+    certificate: "platform",
+    system_ext_specific: true,
+    optimize: {
+        proguard_flags_files: ["proguard.flags"],
+    },
+
+    required: ["privapp_whitelist_org.lineageos.updater.xml"],
+
+}
+
+prebuilt_etc {
+    name: "privapp_whitelist_org.lineageos.updater.xml",
+
+    system_ext_specific: true,
+    src: "privapp_whitelist_org.lineageos.updater.xml",
+    sub_dir: "permissions",
+
+}
diff --git a/Android.mk b/Android.mk
deleted file mode 100644
index fe16f70..0000000
--- a/Android.mk
+++ /dev/null
@@ -1,60 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_USE_AAPT2 := true
-
-LOCAL_STATIC_ANDROID_LIBRARIES := \
-    com.google.android.material_material \
-    androidx.core_core \
-    androidx.appcompat_appcompat \
-    androidx.cardview_cardview \
-    androidx.localbroadcastmanager_localbroadcastmanager \
-    androidx.preference_preference \
-    androidx.recyclerview_recyclerview \
-    SettingsLib
-
-LOCAL_RESOURCE_DIR := \
-    $(LOCAL_PATH)/res
-
-LOCAL_PACKAGE_NAME := Updater
-LOCAL_PRIVATE_PLATFORM_APIS := true
-LOCAL_PRIVILEGED_MODULE := true
-LOCAL_CERTIFICATE := platform
-LOCAL_SYSTEM_EXT_MODULE := true
-LOCAL_PROGUARD_FLAG_FILES := proguard.flags
-
-LOCAL_REQUIRED_MODULES := privapp_whitelist_org.lineageos.updater.xml
-
-include $(BUILD_PACKAGE)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := privapp_whitelist_org.lineageos.updater.xml
-LOCAL_MODULE_CLASS := ETC
-LOCAL_MODULE_TAGS := optional
-LOCAL_MODULE_PATH := $(TARGET_OUT_SYSTEM_EXT_ETC)/permissions
-LOCAL_SYSTEM_EXT_MODULE := true
-LOCAL_SRC_FILES := $(LOCAL_MODULE)
-include $(BUILD_PREBUILT)
-
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := UpdaterStudio
-LOCAL_MODULE_CLASS := FAKE
-LOCAL_MODULE_SUFFIX := -timestamp
-updater_system_deps := $(call java-lib-deps,framework)
-updater_system_libs_path := $(abspath $(LOCAL_PATH))/system_libs
-
-include $(BUILD_SYSTEM)/base_rules.mk
-
-$(LOCAL_BUILT_MODULE): $(updater_system_deps)
-	$(hide) mkdir -p $(updater_system_libs_path)
-	$(hide) rm -rf $(updater_system_libs_path)/*.jar
-	$(hide) cp $(updater_system_deps) $(updater_system_libs_path)/framework.jar
-	$(hide) echo "Fake: $@"
-	$(hide) mkdir -p $(dir $@)
-	$(hide) touch $@