Merge "Add system partition check for vpn dialogs" into klp-dev-plus-aosp
This commit is contained in:
committed by
Android (Google) Code Review
commit
7a670250c9
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user