mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-09-08 18:44:54 +00:00
![Tad](/assets/img/avatar_default.png)
- 20.0: updated and enabled burnIn patch - 19.1: fixup apps having data restrictions wrongly applied Signed-off-by: Tad <tad@spotco.us>
28 lines
1.4 KiB
Diff
28 lines
1.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Oliver Scott <olivercscott@gmail.com>
|
|
Date: Mon, 17 Oct 2022 15:36:18 +0200
|
|
Subject: [PATCH] fixup! fw/b: Add support for allowing/disallowing apps on
|
|
cellular, vpn and wifi networks
|
|
|
|
Do not set apps without INTERNET permission as blocked by restricted networking mode
|
|
|
|
Issue: calyxos#1266
|
|
Change-Id: I11e30bc0c1f8c722d2b5941c17d430dba942594d
|
|
---
|
|
.../com/android/server/net/NetworkPolicyManagerService.java | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
|
|
index 7d70b6d73497..d7fa56e56e0b 100644
|
|
--- a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
|
|
+++ b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
|
|
@@ -4300,7 +4300,7 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
|
|
} else {
|
|
uidBlockedState.blockedReasons &= ~BLOCKED_REASON_RESTRICTED_MODE;
|
|
}
|
|
- if (hasRestrictedModeAccess(uid)) {
|
|
+ if (hasRestrictedModeAccess(uid) || !hasInternetPermissionUL(uid)) {
|
|
uidBlockedState.allowedReasons |= ALLOWED_REASON_RESTRICTED_MODE_PERMISSIONS;
|
|
} else {
|
|
uidBlockedState.allowedReasons &= ~ALLOWED_REASON_RESTRICTED_MODE_PERMISSIONS;
|