Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b4963e42 authored by Yeabkal Wubshit's avatar Yeabkal Wubshit
Browse files

Skip starting VpnManagerService for Wear devices

VPN management is not currently working/supported on Wear, so we do not
need start to SystemService. The SystemService was also not started in
the previous Wear OS version.

Bug: 340928692
Test: manual
Flag: android.server.allow_removing_vpn_service
Change-Id: I3e0ef16287658e4f36b142d7c7738bf200f695a1
parent 9b69eeee
Loading
Loading
Loading
Loading
+13 −7
Original line number Diff line number Diff line
@@ -2134,6 +2134,7 @@ public final class SystemServer implements Dumpable {
            }
            t.traceEnd();

            if (!isWatch || !android.server.Flags.allowRemovingVpnService()) {
                t.traceBegin("StartVpnManagerService");
                try {
                    vpnManager = VpnManagerService.create(context);
@@ -2142,6 +2143,11 @@ public final class SystemServer implements Dumpable {
                    reportWtf("starting VPN Manager Service", e);
                }
                t.traceEnd();
            } else {
                // VPN management currently does not work in Wear, so skip starting the
                // VPN manager SystemService.
                Slog.i(TAG, "Not starting VpnManagerService");
            }

            t.traceBegin("StartVcnManagementService");
            try {
+7 −0
Original line number Diff line number Diff line
@@ -22,3 +22,10 @@ flag {
     description: "Remove WearableSensingManagerService on Wear"
     bug: "340929916"
}

flag {
     name: "allow_removing_vpn_service"
     namespace: "wear_frameworks"
     description: "Allow removing VpnManagerService"
     bug: "340928692"
}
 No newline at end of file