From 1a635493140b446358b7888f593fd034d3607528 Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Wed, 19 Feb 2020 16:11:02 +0000 Subject: [PATCH] Stop exposing generated AIDL from Tethering We don't want new modules exposing stable aidl directly. APIs should be defined as java @SystemApi. It also seems like nothing actually depend on these interfaces, except one simple exception. Bug: 147200698 Test: m Change-Id: Ia4222fa35a9a2f3c75cebb12f75c536f27e2fe16 Merged-In: Ia4222fa35a9a2f3c75cebb12f75c536f27e2fe16 --- packages/Tethering/common/TetheringLib/Android.bp | 1 - services/java/com/android/server/SystemServer.java | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/Tethering/common/TetheringLib/Android.bp b/packages/Tethering/common/TetheringLib/Android.bp index cb0de7a860ac4..1a3d5b659ee37 100644 --- a/packages/Tethering/common/TetheringLib/Android.bp +++ b/packages/Tethering/common/TetheringLib/Android.bp @@ -83,7 +83,6 @@ java_library { name: "framework-tethering-stubs", srcs: [":framework-tethering-stubs-sources"], libs: ["framework-all"], - static_libs: ["tethering-aidl-interfaces-java"], sdk_version: "core_platform", } diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index b93365ad0ad5b..de7ae5509a189 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -41,7 +41,6 @@ import android.database.sqlite.SQLiteCompatibilityWalFlags; import android.database.sqlite.SQLiteGlobal; import android.hardware.display.DisplayManagerInternal; import android.net.ConnectivityModuleConnector; -import android.net.ITetheringConnector; import android.net.NetworkStackClient; import android.os.BaseBundle; import android.os.Binder; @@ -286,6 +285,8 @@ public final class SystemServer { private static final String CONTENT_SUGGESTIONS_SERVICE_CLASS = "com.android.server.contentsuggestions.ContentSuggestionsManagerService"; + private static final String TETHERING_CONNECTOR_CLASS = "android.net.ITetheringConnector"; + private static final String PERSISTENT_DATA_BLOCK_PROP = "ro.frp.pst"; private static final String UNCRYPT_PACKAGE_FILE = "/cache/recovery/uncrypt_file"; @@ -2226,7 +2227,7 @@ public final class SystemServer { try { // TODO: hide implementation details, b/146312721. ConnectivityModuleConnector.getInstance().startModuleService( - ITetheringConnector.class.getName(), + TETHERING_CONNECTOR_CLASS, PERMISSION_MAINLINE_NETWORK_STACK, service -> { ServiceManager.addService(Context.TETHERING_SERVICE, service, false /* allowIsolated */,