FMRadio: androidx conversion, cleanup makefiles
* We cannot move to Android.bp because Soong modules cannot depend on
Kati modules, and libfmjni cannot be converted to Soong due to the
guards.
Change-Id: I614bf9960b4cdc554b27309150dab134393f316b
diff --git a/Android.mk b/Android.mk
index 86b479b..5d77cdc 100644
--- a/Android.mk
+++ b/Android.mk
@@ -15,37 +15,26 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
-LOCAL_MODULE := FMRadio_static
-LOCAL_SRC_FILES := $(filter-out src/com/android/fmradio/%Activity.java src/com/android/fmradio/dialogs/% src/com/android/fmradio/views/%, $(call all-java-files-under, src))
-LOCAL_RESOURCE_DIR = $(LOCAL_PATH)/res
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-LOCAL_CERTIFICATE := platform
-
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := FMRadio
+LOCAL_MODULE_TAGS := optional
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+LOCAL_CERTIFICATE := platform
LOCAL_PRIVATE_PLATFORM_APIS := true
+LOCAL_PRIVILEGED_MODULE := true
LOCAL_JNI_SHARED_LIBRARIES := libfmjni
-LOCAL_PROGUARD_ENABLED := disabled
-LOCAL_PRIVILEGED_MODULE := true
-
-LOCAL_STATIC_ANDROID_LIBRARIES := \
- android-support-v7-cardview \
-
-LOCAL_RESOURCE_DIR = $(LOCAL_PATH)/res
-
-LOCAL_USE_AAPT2 := true
-
-LOCAL_AAPT_FLAGS := --auto-add-overlay
-
LOCAL_REQUIRED_MODULES := privapp_whitelist_com.android.fmradio.xml
+LOCAL_STATIC_ANDROID_LIBRARIES := \
+ androidx.cardview_cardview
+
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_USE_AAPT2 := true
+LOCAL_AAPT_FLAGS := --auto-add-overlay
include $(BUILD_PACKAGE)
diff --git a/jni/fmr/Android.mk b/jni/fmr/Android.mk
index 0076900..e21289e 100644
--- a/jni/fmr/Android.mk
+++ b/jni/fmr/Android.mk
@@ -21,13 +21,17 @@
include $(CLEAR_VARS)
+LOCAL_MODULE := libfmjni
+LOCAL_MODULE_TAGS := optional
+
LOCAL_SRC_FILES := \
fmr_core.cpp \
fmr_err.cpp \
libfm_jni.cpp \
common.cpp
-LOCAL_C_INCLUDES := $(JNI_H_INCLUDE) \
+LOCAL_C_INCLUDES := \
+ $(JNI_H_INCLUDE) \
frameworks/base/include/media
LOCAL_SHARED_LIBRARIES := \
@@ -36,9 +40,6 @@
libmedia \
liblog
-LOCAL_MODULE := libfmjni
-LOCAL_MODULE_TAGS := optional
-
include $(BUILD_SHARED_LIBRARY)
endif # BOARD_HAVE_MTK_FM
diff --git a/res/layout/favorite_gridview_item.xml b/res/layout/favorite_gridview_item.xml
index 1ada73f..7cfd16b 100644
--- a/res/layout/favorite_gridview_item.xml
+++ b/res/layout/favorite_gridview_item.xml
@@ -15,7 +15,7 @@
limitations under the License.
-->
-<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
+<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/card_view"
android:layout_width="wrap_content"
android:layout_height="88dip"
@@ -88,4 +88,4 @@
android:textSize="12dip" />
</RelativeLayout>
-</android.support.v7.widget.CardView>
\ No newline at end of file
+</androidx.cardview.widget.CardView>