summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Liz Prucka <lizprucka@google.com> 2025-04-21 15:32:42 +0000
committer Android Build Coastguard Worker <android-build-coastguard-worker@google.com> 2025-04-22 18:31:06 -0700
commite45d057739584cca2a3219f332bd246fab98d213 (patch)
treef3df321bc544026852f2552b09b665f7ae0ba120
parent1144bcaee5c28ce4261865af197990b7b77f8e28 (diff)
[Intrusion Logging] Fix INetdEventCallback in disable
The INetdEventCallback CALLBACK_CALLER_DEVICE_POLICY is registered, but the incorrect callback was removed. Bugfix so the correct callback is toggled. Bug: 412330307 Test: atest android.security.cts.IntrusionDetectionManagerTest Ignore-AOSP-First: security feature Flag: EXEMPT: bugfix in localized component (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:609dd77d532761620249061b93850e596915c518) Merged-In: I46ee5844dc2ebf3d4e41af699d93fede5c70dd7c Change-Id: I46ee5844dc2ebf3d4e41af699d93fede5c70dd7c
-rw-r--r--services/core/java/com/android/server/security/intrusiondetection/NetworkLogSource.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/security/intrusiondetection/NetworkLogSource.java b/services/core/java/com/android/server/security/intrusiondetection/NetworkLogSource.java
index fe0cf80a48f2..f2edaf1fd623 100644
--- a/services/core/java/com/android/server/security/intrusiondetection/NetworkLogSource.java
+++ b/services/core/java/com/android/server/security/intrusiondetection/NetworkLogSource.java
@@ -83,11 +83,11 @@ public class NetworkLogSource implements DataSource {
}
try {
if (!mIpConnectivityMetrics.removeNetdEventCallback(
- INetdEventCallback.CALLBACK_CALLER_NETWORK_WATCHLIST)) {
+ INetdEventCallback.CALLBACK_CALLER_DEVICE_POLICY)) {
mIsNetworkLoggingEnabled.set(false);
} else {
- Slog.e(TAG, "Failed to enable network logging; invalid callback");
+ Slog.e(TAG, "Failed to disable network logging; invalid callback");
}
} catch (RemoteException e) {
Slog.e(TAG, "Failed to disable network logging; ", e);