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/service/Android.bp b/nearby/service/Android.bp
index 5b0028e..1e1af20 100644
--- a/nearby/service/Android.bp
+++ b/nearby/service/Android.bp
@@ -47,15 +47,12 @@
srcs: [":nearby-service-srcs"],
defaults: [
- "nearby-module-sdk-version-defaults",
"framework-system-server-module-defaults"
],
libs: [
- // pre-jarjar symbols are needed so that nearby-service can reference the original class
- // names at compile time
- "framework-nearby-pre-jarjar",
"framework-bluetooth.stubs.module_lib", // TODO(b/215722418): Change to framework-bluetooth once fixed
"error_prone_annotations",
+ "framework-connectivity-tiramisu.impl",
],
static_libs: [
"androidx.annotation_annotation",
@@ -70,13 +67,12 @@
"modules-utils-backgroundthread",
],
sdk_version: "system_server_current",
+ // This is included in service-connectivity which is 30+
+ // TODO: allow APEXes to have service jars with higher min_sdk than the APEX
+ // (service-connectivity is only used on 31+) and use 31 here
+ min_sdk_version: "30",
installable: true,
- optimize: {
- enabled: true,
- shrink: true,
- proguard_flags_files: ["proguard.flags"],
- },
dex_preopt: {
enabled: false,
app_image: false,
@@ -85,6 +81,6 @@
"//packages/modules/Nearby/apex",
],
apex_available: [
- "com.android.nearby",
+ "com.android.tethering",
],
}
diff --git a/nearby/service/proguard.flags b/nearby/service/proguard.flags
deleted file mode 100644
index 55c963f..0000000
--- a/nearby/service/proguard.flags
+++ /dev/null
@@ -1,5 +0,0 @@
-# Prevent proguard from stripping out any nearby-service.
-# TODO: This could be optimized in the future to only keep the critical
-# entry points and then let proguard strip out any unused code within
-# the service.
--keep class com.android.server.nearby.** { *; }
diff --git a/nearby/service/proto/Android.bp b/nearby/service/proto/Android.bp
index 9eca51d..d8c059e 100644
--- a/nearby/service/proto/Android.bp
+++ b/nearby/service/proto/Android.bp
@@ -25,7 +25,7 @@
min_sdk_version: "30",
srcs: ["src/*/*.proto"],
apex_available: [
- "com.android.nearby",
+ "com.android.tethering",
],
}