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

Commit 7a670250 authored by Nick Kralevich's avatar Nick Kralevich Committed by Android (Google) Code Review
Browse files

Merge "Add system partition check for vpn dialogs" into klp-dev-plus-aosp

parents 10f03972 212a195f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -597,10 +597,10 @@ public class Vpn extends BaseNetworkStateTracker {
        int appId = UserHandle.getAppId(Binder.getCallingUid());
        final long token = Binder.clearCallingIdentity();
        try {
            // System dialogs are also allowed to control VPN.
            // System VPN dialogs are also allowed to control VPN.
            PackageManager pm = mContext.getPackageManager();
            ApplicationInfo app = pm.getApplicationInfo(VpnConfig.DIALOGS_PACKAGE, 0);
            if (appId == app.uid) {
            if (((app.flags & ApplicationInfo.FLAG_SYSTEM) != 0) && (appId == app.uid)) {
                return;
            }
        } catch (Exception e) {