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

Commit 0d8dc2ee authored by Yeabkal Wubshit's avatar Yeabkal Wubshit Committed by Android (Google) Code Review
Browse files

Merge "Fix checkNotNull error for missing Vpn service in Wear" into main

parents 7d70189e 7b806deb
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -468,6 +468,11 @@ public final class SystemServiceRegistry {
            public VpnManager createService(ContextImpl ctx) throws ServiceNotFoundException {
                IBinder b = ServiceManager.getService(Context.VPN_MANAGEMENT_SERVICE);
                IVpnManager service = IVpnManager.Stub.asInterface(b);
                if (service == null
                        && ctx.getPackageManager().hasSystemFeature(PackageManager.FEATURE_WATCH)
                        && android.server.Flags.allowRemovingVpnService()) {
                    throw new ServiceNotFoundException(Context.VPN_MANAGEMENT_SERVICE);
                }
                return new VpnManager(ctx, service);
            }});