Move nearby apex to tethering
Nearby will be merged together with the tethering/connectivity APEX, so
that module maintenance efforts can be reduced, and the two codebases
can evolve the interfaces that they expose to each other over time.
Bug: 189355156
Test: m
Change-Id: I7c34466a850cb437171ea15367a24f84305bd3f7
diff --git a/nearby/halfsheet/Android.bp b/nearby/halfsheet/Android.bp
index 82d0933..3f4f258 100644
--- a/nearby/halfsheet/Android.bp
+++ b/nearby/halfsheet/Android.bp
@@ -20,14 +20,15 @@
name: "HalfSheetDefaults",
srcs: ["src/**/*.java"],
sdk_version: "module_current",
- min_sdk_version: "current",
+ // This is included in tethering apex, which uses min SDK 30
+ min_sdk_version: "30",
target_sdk_version: "current",
manifest: "AndroidManifest.xml",
plugins: ["java_api_finder"],
jarjar_rules: ":nearby-jarjar-rules",
libs: [
"framework-bluetooth",
- "framework-nearby-pre-jarjar",
+ "framework-connectivity-tiramisu",
"nearby-service-string",
],
static_libs: [
@@ -49,7 +50,7 @@
static_libs: [
"com.google.android.material_material",
],
- apex_available: ["com.android.nearby",],
+ apex_available: ["com.android.tethering",],
}
android_app_certificate {
diff --git a/nearby/halfsheet/res/values/colors.xml b/nearby/halfsheet/res/values/colors.xml
index 2a2ed41..b066665 100644
--- a/nearby/halfsheet/res/values/colors.xml
+++ b/nearby/halfsheet/res/values/colors.xml
@@ -1,14 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<resources
- xmlns:android="http://schemas.android.com/apk/res/android">
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools">
<!-- Use original background color -->
<color name="fast_pair_notification_background">#00000000</color>
- <color name="fast_pair_half_sheet_button_color">@android:color/system_accent1_100</color>
- <color name="fast_pair_half_sheet_button_text">@android:color/system_neutral1_900</color>
- <color name="fast_pair_half_sheet_button_accent_text">@android:color/system_neutral1_900</color>
- <color name="fast_pair_progress_color">@android:color/system_accent1_600</color>
- <color name="fast_pair_half_sheet_subtitle_color">@android:color/system_neutral2_700</color>
- <color name="fast_pair_half_sheet_text_color">@android:color/system_neutral1_900</color>
+ <!-- Ignores NewApi as below system colors are available since API 31, and HalfSheet is always
+ running on T+ even though it has min_sdk 30 to match its containing APEX -->
+ <color name="fast_pair_half_sheet_button_color" tools:ignore="NewApi">@android:color/system_accent1_100</color>
+ <color name="fast_pair_half_sheet_button_text" tools:ignore="NewApi">@android:color/system_neutral1_900</color>
+ <color name="fast_pair_half_sheet_button_accent_text" tools:ignore="NewApi">@android:color/system_neutral1_900</color>
+ <color name="fast_pair_progress_color" tools:ignore="NewApi">@android:color/system_accent1_600</color>
+ <color name="fast_pair_half_sheet_subtitle_color" tools:ignore="NewApi">@android:color/system_neutral2_700</color>
+ <color name="fast_pair_half_sheet_text_color" tools:ignore="NewApi">@android:color/system_neutral1_900</color>
<!-- Nearby Discoverer -->
<color name="discovery_activity_accent">#4285F4</color>