summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Yan Yan <evitayan@google.com> 2025-03-14 16:15:05 -0700
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2025-03-14 16:15:05 -0700
commitb9c5e6797e868791d3e67b75f1586527c9059e5c (patch)
treeb3f191ad16088b30d35f09e7518e7b5454b17830
parentb212459ee07b081349af240589212c06189fafdc (diff)
parent7feff348359220d2c1e5088b55312523484f3a98 (diff)
Merge "Register VCN in ConnectivityServiceInitializer when it is in mainline" into main am: f3fee7d47b am: 7feff34835
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/3464047 Change-Id: If9025da291840a69dfbf4dca1b8338bd37759e45 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--services/java/com/android/server/SystemServer.java31
1 files changed, 20 insertions, 11 deletions
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 788b3b883160..56ec27a0ba87 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -121,6 +121,7 @@ import com.android.internal.util.EmergencyAffordanceManager;
import com.android.internal.util.FrameworkStatsLog;
import com.android.internal.widget.ILockSettings;
import com.android.internal.widget.LockSettingsInternal;
+import com.android.modules.utils.build.SdkLevel;
import com.android.server.accessibility.AccessibilityManagerService;
import com.android.server.accounts.AccountManagerService;
import com.android.server.adb.AdbService;
@@ -2265,19 +2266,27 @@ public final class SystemServer implements Dumpable {
Slog.i(TAG, "Not starting VpnManagerService");
}
- t.traceBegin("StartVcnManagementService");
- try {
- if (VcnLocation.IS_VCN_IN_MAINLINE) {
- mSystemServiceManager.startServiceFromJar(
- CONNECTIVITY_SERVICE_INITIALIZER_B_CLASS,
- CONNECTIVITY_SERVICE_APEX_PATH);
- } else {
- mSystemServiceManager.startService(CONNECTIVITY_SERVICE_INITIALIZER_B_CLASS);
+ // TODO: b/374174952 In the end state, VCN registration will be moved to Tethering
+ // module. Thus the following code block should be removed after Baklava is released
+ if (!VcnLocation.IS_VCN_IN_MAINLINE || !SdkLevel.isAtLeastB()) {
+ t.traceBegin("StartVcnManagementService");
+
+ try {
+ if (!VcnLocation.IS_VCN_IN_MAINLINE) {
+ mSystemServiceManager.startService(
+ CONNECTIVITY_SERVICE_INITIALIZER_B_CLASS);
+ } else {
+ // When VCN is in mainline but the SDK level is B-, start the service with
+ // the apex path. This path can only be hit on an unfinalized B platform
+ mSystemServiceManager.startServiceFromJar(
+ CONNECTIVITY_SERVICE_INITIALIZER_B_CLASS,
+ CONNECTIVITY_SERVICE_APEX_PATH);
+ }
+ } catch (Throwable e) {
+ reportWtf("starting VCN Management Service", e);
}
- } catch (Throwable e) {
- reportWtf("starting VCN Management Service", e);
+ t.traceEnd();
}
- t.traceEnd();
t.traceBegin("StartSystemUpdateManagerService");
try {