summaryrefslogtreecommitdiff
path: root/services/java/com/android
diff options
context:
space:
mode:
authorAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2019-12-20 14:00:29 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2019-12-20 14:00:29 +0000
commit08074c62b05801c3d2fc94a8d59cc3cde6d04a26 (patch)
treed5fea2e21c2e5ee956d0a3dfb10290aa19ef4ef5 /services/java/com/android
parent4870a488d4bd0de23dbfa01669d07061eeff46ee (diff)
parent25cc1f47c5423f0e72f9a7d1bfba4c40206e7210 (diff)
Merge "[Tether13] Move TetheringManager into framework" am: 2410d67357 am: 25cc1f47c5
Change-Id: I9ec25eb984e3b534ddcc9313836a319b21526998
Diffstat (limited to 'services/java/com/android')
-rw-r--r--services/java/com/android/server/SystemServer.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index ae773ca6d506..e58f51325351 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -16,6 +16,7 @@
package com.android.server;
+import static android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK;
import static android.os.IServiceManager.DUMP_FLAG_PRIORITY_CRITICAL;
import static android.os.IServiceManager.DUMP_FLAG_PRIORITY_HIGH;
import static android.os.IServiceManager.DUMP_FLAG_PRIORITY_NORMAL;
@@ -40,8 +41,8 @@ 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.net.TetheringManager;
import android.os.BaseBundle;
import android.os.Binder;
import android.os.Build;
@@ -2214,8 +2215,14 @@ public final class SystemServer {
traceBeginAndSlog("StartTethering");
try {
- // Tethering must start after ConnectivityService and NetworkStack.
- TetheringManager.getInstance().start();
+ // TODO: hide implementation details, b/146312721.
+ ConnectivityModuleConnector.getInstance().startModuleService(
+ ITetheringConnector.class.getName(),
+ PERMISSION_MAINLINE_NETWORK_STACK, service -> {
+ ServiceManager.addService(Context.TETHERING_SERVICE, service,
+ false /* allowIsolated */,
+ DUMP_FLAG_PRIORITY_HIGH | DUMP_FLAG_PRIORITY_NORMAL);
+ });
} catch (Throwable e) {
reportWtf("starting Tethering", e);
}