Merge "[Tether13] Move TetheringManager into framework" am: 2410d67357 am: 25cc1f47c5

Change-Id: I9ec25eb984e3b534ddcc9313836a319b21526998
This commit is contained in:
Automerger Merge Worker
2019-12-20 14:00:29 +00:00
35 changed files with 933 additions and 835 deletions

View File

@@ -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);
}