From c269f228edd353ba1d5f234d077c71c9e60caf9f Mon Sep 17 00:00:00 2001 From: Chaohui Wang Date: Mon, 16 May 2022 17:18:10 +0800 Subject: [PATCH] Clean up legacy androidx lib for SettingsLib Replace deprecated "androidx.legacy_legacy-support-v4" with the followings, "androidx.annotation_annotation" "androidx.coordinatorlayout_coordinatorlayout" "androidx.core_core" "androidx.fragment_fragment" "androidx.loader_loader" "androidx.localbroadcastmanager_localbroadcastmanager" Bug: 234570979 Test: make Change-Id: I076578f5b8915941784367e9202be39664d27db2 --- packages/SettingsLib/Android.bp | 25 +++++++++++++++---------- packages/SettingsLib/common.mk | 16 +++++++++------- 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/packages/SettingsLib/Android.bp b/packages/SettingsLib/Android.bp index 87e61b5274773..a83c090df7712 100644 --- a/packages/SettingsLib/Android.bp +++ b/packages/SettingsLib/Android.bp @@ -13,12 +13,15 @@ android_library { static_libs: [ "androidx.annotation_annotation", - "androidx.legacy_legacy-support-v4", - "androidx.recyclerview_recyclerview", - "androidx.preference_preference", "androidx.appcompat_appcompat", + "androidx.coordinatorlayout_coordinatorlayout", + "androidx.core_core", + "androidx.fragment_fragment", "androidx.lifecycle_lifecycle-runtime", - "androidx.mediarouter_mediarouter-nodeps", + "androidx.loader_loader", + "androidx.localbroadcastmanager_localbroadcastmanager", + "androidx.preference_preference", + "androidx.recyclerview_recyclerview", "com.google.android.material_material", "iconloader", @@ -74,13 +77,15 @@ java_defaults { name: "SettingsLibDefaults", static_libs: [ "androidx.annotation_annotation", - "androidx.lifecycle_lifecycle-common", - "androidx.legacy_legacy-support-v4", - "androidx.lifecycle_lifecycle-runtime", - "androidx.recyclerview_recyclerview", - "androidx.preference_preference", "androidx.appcompat_appcompat", - "androidx.legacy_legacy-preference-v14", + "androidx.coordinatorlayout_coordinatorlayout", + "androidx.core_core", + "androidx.fragment_fragment", + "androidx.lifecycle_lifecycle-runtime", + "androidx.loader_loader", + "androidx.localbroadcastmanager_localbroadcastmanager", + "androidx.preference_preference", + "androidx.recyclerview_recyclerview", "SettingsLib", ], } diff --git a/packages/SettingsLib/common.mk b/packages/SettingsLib/common.mk index 8c309ff97370a..d9596569a0da0 100644 --- a/packages/SettingsLib/common.mk +++ b/packages/SettingsLib/common.mk @@ -19,15 +19,17 @@ # NOTE: keep this file and ./Android.bp in sync. LOCAL_STATIC_JAVA_LIBRARIES += \ - androidx.annotation_annotation \ - androidx.lifecycle_lifecycle-common + androidx.annotation_annotation LOCAL_STATIC_ANDROID_LIBRARIES += \ - androidx.legacy_legacy-support-v4 \ - androidx.lifecycle_lifecycle-runtime \ - androidx.recyclerview_recyclerview \ - androidx.preference_preference \ androidx.appcompat_appcompat \ - androidx.legacy_legacy-preference-v14 \ + androidx.coordinatorlayout_coordinatorlayout \ + androidx.core_core \ + androidx.fragment_fragment \ + androidx.lifecycle_lifecycle-runtime \ + androidx.loader_loader \ + androidx.localbroadcastmanager_localbroadcastmanager \ + androidx.preference_preference \ + androidx.recyclerview_recyclerview \ SettingsLib