From 5f9f31c18b8989ef60a518f3470aadaaf82af286 Mon Sep 17 00:00:00 2001 From: Jooyung Han Date: Wed, 29 Apr 2020 02:43:30 +0900 Subject: [PATCH 1/2] Set min_sdk_version for updatable mainline modules Modules contributing mainline modules (APK/APEX) should set min_sdk_version as well as apex_available. For now setting min_sdk_version doesn't change build outputs. But build-time checks will be added soon. Bug: 145796956 Bug: 150999716 Test: m Merged-In: Ifaecb49a47a1f43edea3ea06e1cf704a177d1044 Change-Id: Ifaecb49a47a1f43edea3ea06e1cf704a177d1044 (cherry picked from commit 33aa294e96f13906f596e427b96652fe80cf199b) --- Tethering/Android.bp | 6 ++++++ Tethering/apex/Android.bp | 2 +- Tethering/common/TetheringLib/Android.bp | 6 ++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Tethering/Android.bp b/Tethering/Android.bp index cbc5e14139..735dd17933 100644 --- a/Tethering/Android.bp +++ b/Tethering/Android.bp @@ -51,6 +51,11 @@ android_library { cc_library { name: "libtetherutilsjni", sdk_version: "current", + apex_available: [ + "//apex_available:platform", // Used by InProcessTethering + "com.android.tethering", + ], + min_sdk_version: "current", srcs: [ "jni/android_net_util_TetheringUtils.cpp", ], @@ -123,4 +128,5 @@ android_app { // The permission configuration *must* be included to ensure security of the device required: ["NetworkPermissionConfig"], apex_available: ["com.android.tethering"], + min_sdk_version: "current", } diff --git a/Tethering/apex/Android.bp b/Tethering/apex/Android.bp index 20ccd2ad64..67097a79e5 100644 --- a/Tethering/apex/Android.bp +++ b/Tethering/apex/Android.bp @@ -17,7 +17,7 @@ apex { name: "com.android.tethering", updatable: true, - min_sdk_version: "R", + min_sdk_version: "current", java_libs: ["framework-tethering"], apps: ["Tethering"], manifest: "manifest.json", diff --git a/Tethering/common/TetheringLib/Android.bp b/Tethering/common/TetheringLib/Android.bp index d029d2bded..d03115a158 100644 --- a/Tethering/common/TetheringLib/Android.bp +++ b/Tethering/common/TetheringLib/Android.bp @@ -37,6 +37,12 @@ aidl_interface { cpp: { enabled: false, }, + java: { + apex_available: [ + "//apex_available:platform", + "com.android.tethering", + ], + }, }, } From 595adc05e839c9855298138e979210eef74cca69 Mon Sep 17 00:00:00 2001 From: Jooyung Han Date: Mon, 11 May 2020 13:18:29 +0900 Subject: [PATCH 2/2] InProcessTethering: set min_sdk_version Modules contributing mainline modules (APK/APEX) should set min_sdk_version as well as apex_available. InProcessTethering is a part of com.android.tethering.inprocess, therefore min_sdk_version is set. Exempt-From-Owner-Approval: CP from AOSP Bug: 145796956 Bug: 150999716 Test: m Merged-In: I655211e0b9aa4bd7cb3718b6f567f0aa1a0176a5 Change-Id: I655211e0b9aa4bd7cb3718b6f567f0aa1a0176a5 (cherry picked from commit ace605ef568fecfe148d2785f4681c9c858487aa) --- Tethering/Android.bp | 1 + 1 file changed, 1 insertion(+) diff --git a/Tethering/Android.bp b/Tethering/Android.bp index 735dd17933..1ee017be50 100644 --- a/Tethering/Android.bp +++ b/Tethering/Android.bp @@ -115,6 +115,7 @@ android_app { // InProcessTethering is a replacement for Tethering overrides: ["Tethering"], apex_available: ["com.android.tethering"], + min_sdk_version: "current", } // Updatable tethering packaged as an application