Convert sysui to bp
Test: tests gonna test, builds gonna build
Change-Id: I7f1ef2e82ce2c74253c57de8d73079dcfe2d2264
diff --git a/packages/CarSystemUI/Android.bp b/packages/CarSystemUI/Android.bp
new file mode 100644
index 0000000..36ef04a
--- /dev/null
+++ b/packages/CarSystemUI/Android.bp
@@ -0,0 +1,76 @@
+//
+// Copyright (C) 2018 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: "CarSystemUI",
+
+ srcs: [
+ "src/**/*.java",
+ "src/**/I*.aidl",
+ ],
+
+ static_libs: [
+ "SystemUI-core",
+ "SystemUIPluginLib",
+ "SystemUISharedLib",
+ "SettingsLib",
+ "androidx.car_car",
+ "androidx.legacy_legacy-support-v4",
+ "androidx.recyclerview_recyclerview",
+ "androidx.preference_preference",
+ "androidx.appcompat_appcompat",
+ "androidx.mediarouter_mediarouter",
+ "androidx.palette_palette",
+ "androidx.legacy_legacy-preference-v14",
+ "androidx.leanback_leanback",
+ "androidx.slice_slice-core",
+ "androidx.slice_slice-view",
+ "androidx.slice_slice-builders",
+ "androidx.arch.core_core-runtime",
+ "androidx.lifecycle_lifecycle-extensions",
+ "SystemUI-tags",
+ "SystemUI-proto",
+ ],
+
+ libs: [
+ "telephony-common",
+ "android.car",
+ ],
+
+ manifest: "AndroidManifest.xml",
+
+ owner: "google",
+ platform_apis: true,
+ certificate: "platform",
+ privileged: true,
+
+ optimize: {
+ proguard_flags_files: [
+ "proguard.flags",
+ ],
+ },
+ resource_dirs: [
+ "res",
+ ],
+
+
+ dxflags: ["--multi-dex"],
+
+ aaptflags: [
+ "--extra-packages",
+ "com.android.keyguard",
+ ],
+
+}
diff --git a/packages/CarSystemUI/Android.mk b/packages/CarSystemUI/Android.mk
deleted file mode 100644
index 0d40b7f..0000000
--- a/packages/CarSystemUI/Android.mk
+++ /dev/null
@@ -1,86 +0,0 @@
-# LOCAL_PATH is not the current directory of this file.
-# If you need the local path, use CAR_SYSUI_PATH.
-# This tweak ensures that the resource overlay that is device-specific still works
-# which requires that LOCAL_PATH match the original path (which must be frameworks/base/packages/SystemUI).
-#
-# For clarity, we also define SYSTEM_UI_AOSP_PATH to frameworks/base/packages/SystemUI and refer to that
-SYSTEM_UI_AOSP_PATH := frameworks/base/packages/SystemUI
-SYSTEM_UI_CAR_PATH := frameworks/base/packages/CarSystemUI
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_USE_AAPT2 := true
-
-LOCAL_MODULE_TAGS := optional
-
-# The same as SYSTEM_UI_AOSP_PATH but based on the value of LOCAL_PATH which is
-# frameworks/base/packages/CarSystemUI.
-RELATIVE_SYSTEM_UI_AOSP_PATH := ../../../../$(SYSTEM_UI_AOSP_PATH)
-
-
-LOCAL_SRC_FILES := \
- $(call all-java-files-under, src) \
- $(call all-Iaidl-files-under, src) \
- $(call all-java-files-under, $(RELATIVE_SYSTEM_UI_AOSP_PATH)/src) \
- $(call all-Iaidl-files-under, $(RELATIVE_SYSTEM_UI_AOSP_PATH)/src)
-
-LOCAL_STATIC_ANDROID_LIBRARIES := \
- SystemUIPluginLib \
- SystemUISharedLib \
- androidx.car_car \
- androidx.legacy_legacy-support-v4 \
- androidx.recyclerview_recyclerview \
- androidx.preference_preference \
- androidx.appcompat_appcompat \
- androidx.mediarouter_mediarouter \
- androidx.palette_palette \
- androidx.legacy_legacy-preference-v14 \
- androidx.leanback_leanback \
- androidx.slice_slice-core \
- androidx.slice_slice-view \
- androidx.slice_slice-builders \
- androidx.arch.core_core-runtime \
- androidx.lifecycle_lifecycle-extensions \
-
-LOCAL_STATIC_JAVA_LIBRARIES := \
- SystemUI-tags \
- SystemUI-proto
-
-LOCAL_JAVA_LIBRARIES := telephony-common \
- android.car
-
-LOCAL_FULL_LIBS_MANIFEST_FILES := $(SYSTEM_UI_AOSP_PATH)/AndroidManifest.xml
-LOCAL_MANIFEST_FILE := AndroidManifest.xml
-
-LOCAL_MODULE_OWNER := google
-LOCAL_PACKAGE_NAME := CarSystemUI
-LOCAL_PRIVATE_PLATFORM_APIS := true
-LOCAL_CERTIFICATE := platform
-LOCAL_PRIVILEGED_MODULE := true
-
-LOCAL_PROGUARD_FLAG_FILES := $(RELATIVE_SYSTEM_UI_AOSP_PATH)/proguard.flags \
- proguard.flags
-
-LOCAL_RESOURCE_DIR := \
- $(LOCAL_PATH)/res \
- $(SYSTEM_UI_AOSP_PATH)/res-keyguard \
- $(SYSTEM_UI_AOSP_PATH)/res
-
-ifneq ($(INCREMENTAL_BUILDS),)
- LOCAL_PROGUARD_ENABLED := disabled
- LOCAL_JACK_ENABLED := incremental
-endif
-
-LOCAL_DX_FLAGS := --multi-dex
-LOCAL_JACK_FLAGS := --multi-dex native
-
-include frameworks/base/packages/SettingsLib/common.mk
-
-LOCAL_OVERRIDES_PACKAGES := SystemUI
-
-LOCAL_AAPT_FLAGS := --extra-packages com.android.keyguard
-
-include $(BUILD_PACKAGE)
-
-include $(call all-makefiles-under, $(SYSTEM_UI_CAR_PATH))
diff --git a/packages/CarSystemUI/proguard.flags b/packages/CarSystemUI/proguard.flags
index ceb037c..a81c7e0 100644
--- a/packages/CarSystemUI/proguard.flags
+++ b/packages/CarSystemUI/proguard.flags
@@ -1 +1,3 @@
-keep class com.android.systemui.CarSystemUIFactory
+
+-include ../SystemUI/proguard.flags