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

Commit 94af8f82 authored by Chirayu Desai's avatar Chirayu Desai Committed by Michael Bestas
Browse files

restricted-networking: Always log newly installed apps being added to the allowlist

* This way we can try to track down rare issues noticed where
  sometimes an app didn't get added to the allowlist, or it got
  added when it shouldn't have.

Change-Id: Ib95f80918feb5db95766837e5708ad070f2d1070
parent 8ba3b2ec
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1158,10 +1158,10 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
            if (ACTION_PACKAGE_ADDED.equals(action)) {
            if (ACTION_PACKAGE_ADDED.equals(action)) {
                // update rules for UID, since it might be subject to
                // update rules for UID, since it might be subject to
                // global background data policy
                // global background data policy
                if (LOGV) Slog.v(TAG, "ACTION_PACKAGE_ADDED for uid=" + uid);
                // Clear the cache for the app
                // Clear the cache for the app
                synchronized (mUidRulesFirstLock) {
                synchronized (mUidRulesFirstLock) {
                    if (hasInternetPermissionUL(uid)) {
                    if (hasInternetPermissionUL(uid)) {
                        Slog.i(TAG, "ACTION_PACKAGE_ADDED for uid=" + uid);
                        Set<Integer> uids =
                        Set<Integer> uids =
                                ConnectivitySettingsManager.getUidsAllowedOnRestrictedNetworks(
                                ConnectivitySettingsManager.getUidsAllowedOnRestrictedNetworks(
                                        context);
                                        context);